diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000000..a539230ce1 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +rustflags = ["--cfg", "tracing_unstable"] diff --git a/Cargo.lock b/Cargo.lock index b9987901d9..0f16153150 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -64,7 +64,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cipher", "cpufeatures", ] @@ -100,7 +100,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "getrandom 0.2.12", "once_cell", "version_check", @@ -134,25 +134,46 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ba1c79677c9ce51c8d45e20845b05e6fb070ea2c863fba03ad6af2c778474bd" dependencies = [ - "alloy-consensus", - "alloy-contract", - "alloy-core", - "alloy-eips", - "alloy-genesis", - "alloy-network", - "alloy-provider", + "alloy-consensus 0.1.4", + "alloy-contract 0.1.4", + "alloy-core 0.7.7", + "alloy-eips 0.1.4", + "alloy-genesis 0.1.4", + "alloy-network 0.1.4", + "alloy-provider 0.1.4", "alloy-pubsub", - "alloy-rpc-client", + "alloy-rpc-client 0.1.4", "alloy-rpc-types", - "alloy-serde", - "alloy-signer", - "alloy-signer-local", - "alloy-transport", - "alloy-transport-http", + "alloy-serde 0.1.4", + "alloy-signer 0.1.4", + "alloy-signer-local 0.1.4", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", "alloy-transport-ipc", "alloy-transport-ws", ] +[[package]] +name = "alloy" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "056f2c01b2aed86e15b43c47d109bfc8b82553dc34e66452875e51247ec31ab2" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-contract 0.4.2", + "alloy-core 0.8.8", + "alloy-eips 0.4.2", + "alloy-genesis 0.4.2", + "alloy-network 0.4.2", + "alloy-provider 0.4.2", + "alloy-rpc-client 0.4.2", + "alloy-serde 0.4.2", + "alloy-signer 0.4.2", + "alloy-signer-local 0.4.2", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", +] + [[package]] name = "alloy-chains" version = "0.1.24" @@ -169,11 +190,27 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da374e868f54c7f4ad2ad56829827badca388efd645f8cf5fccc61c2b5343504" dependencies = [ - "alloy-eips", - "alloy-primitives", + "alloy-eips 0.1.4", + "alloy-primitives 0.7.7", + "alloy-rlp", + "alloy-serde 0.1.4", + "c-kzg", + "serde", +] + +[[package]] +name = "alloy-consensus" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" +dependencies = [ + "alloy-eips 0.4.2", + "alloy-primitives 0.8.8", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.4.2", + "auto_impl", "c-kzg", + "derive_more 1.0.0", "serde", ] @@ -183,15 +220,35 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dc6957ff706f9e5f6fd42f52a93e4bce476b726c92d077b348de28c4a76730c" dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-network", - "alloy-primitives", - "alloy-provider", + "alloy-dyn-abi 0.7.7", + "alloy-json-abi 0.7.7", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", "alloy-pubsub", - "alloy-rpc-types-eth", - "alloy-sol-types", - "alloy-transport", + "alloy-rpc-types-eth 0.1.4", + "alloy-sol-types 0.7.7", + "alloy-transport 0.1.4", + "futures", + "futures-util", + "thiserror", +] + +[[package]] +name = "alloy-contract" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" +dependencies = [ + "alloy-dyn-abi 0.8.8", + "alloy-json-abi 0.8.8", + "alloy-network 0.4.2", + "alloy-network-primitives", + "alloy-primitives 0.8.8", + "alloy-provider 0.4.2", + "alloy-rpc-types-eth 0.4.2", + "alloy-sol-types 0.8.8", + "alloy-transport 0.4.2", "futures", "futures-util", "thiserror", @@ -203,10 +260,23 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "529fc6310dc1126c8de51c376cbc59c79c7f662bd742be7dc67055d5421a81b4" dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-types", + "alloy-dyn-abi 0.7.7", + "alloy-json-abi 0.7.7", + "alloy-primitives 0.7.7", + "alloy-sol-types 0.7.7", +] + +[[package]] +name = "alloy-core" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a54c7158ea4a394bef220d82d8fdd412fb9b1ca2d6024db539070b7bc01b6401" +dependencies = [ + "alloy-dyn-abi 0.8.8", + "alloy-json-abi 0.8.8", + "alloy-primitives 0.8.8", + "alloy-rlp", + "alloy-sol-types 0.8.8", ] [[package]] @@ -215,10 +285,27 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413902aa18a97569e60f679c23f46a18db1656d87ab4d4e49d0e1e52042f66df" dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-type-parser", - "alloy-sol-types", + "alloy-json-abi 0.7.7", + "alloy-primitives 0.7.7", + "alloy-sol-type-parser 0.7.7", + "alloy-sol-types 0.7.7", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow 0.6.5", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6228abfc751a29cde117b0879b805a3e0b3b641358f063272c83ca459a56886" +dependencies = [ + "alloy-json-abi 0.8.8", + "alloy-primitives 0.8.8", + "alloy-sol-type-parser 0.8.8", + "alloy-sol-types 0.8.8", "const-hex", "itoa", "serde", @@ -226,17 +313,57 @@ dependencies = [ "winnow 0.6.5", ] +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives 0.8.8", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +dependencies = [ + "alloy-primitives 0.8.8", + "alloy-rlp", + "serde", +] + [[package]] name = "alloy-eips" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f76ecab54890cdea1e4808fc0891c7e6cfcf71fe1a9fe26810c7280ef768f4ed" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", + "alloy-rlp", + "alloy-serde 0.1.4", + "c-kzg", + "derive_more 0.99.18", + "once_cell", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-eips" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives 0.8.8", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.4.2", "c-kzg", - "derive_more 0.99.17", + "derive_more 1.0.0", "once_cell", "serde", "sha2 0.10.8", @@ -248,8 +375,19 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bca15afde1b6d15e3fc1c97421262b1bbb37aee45752e3c8b6d6f13f776554ff" dependencies = [ - "alloy-primitives", - "alloy-serde", + "alloy-primitives 0.7.7", + "alloy-serde 0.1.4", + "serde", +] + +[[package]] +name = "alloy-genesis" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8429cf4554eed9b40feec7f4451113e76596086447550275e3def933faf47ce3" +dependencies = [ + "alloy-primitives 0.8.8", + "alloy-serde 0.4.2", "serde", ] @@ -259,8 +397,20 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc05b04ac331a9f07e3a4036ef7926e49a8bf84a99a1ccfc7e2ab55a5fcbb372" dependencies = [ - "alloy-primitives", - "alloy-sol-type-parser", + "alloy-primitives 0.7.7", + "alloy-sol-type-parser 0.7.7", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-abi" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d46eb5871592c216d39192499c95a99f7175cb94104f88c307e6dc960676d9f1" +dependencies = [ + "alloy-primitives 0.8.8", + "alloy-sol-type-parser 0.8.8", "serde", "serde_json", ] @@ -271,7 +421,21 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d6f34930b7e3e2744bcc79056c217f00cb2abb33bc5d4ff88da7623c5bb078b" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fa8a1a3c4cbd221f2b8e3693aeb328fca79a757fe556ed08e47bbbc2a70db7" +dependencies = [ + "alloy-primitives 0.8.8", + "alloy-sol-types 0.8.8", "serde", "serde_json", "thiserror", @@ -284,20 +448,54 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25f6895fc31b48fa12306ef9b4f78b7764f8bd6d7d91cdb0a40e233704a0f23f" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", - "alloy-signer", - "alloy-sol-types", + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", + "alloy-rpc-types-eth 0.1.4", + "alloy-serde 0.1.4", + "alloy-signer 0.1.4", + "alloy-sol-types 0.7.7", "async-trait", "auto_impl", "futures-utils-wasm", "thiserror", ] +[[package]] +name = "alloy-network" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85fa23a6a9d612b52e402c995f2d582c25165ec03ac6edf64c861a76bc5b87cd" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-json-rpc 0.4.2", + "alloy-network-primitives", + "alloy-primitives 0.8.8", + "alloy-rpc-types-eth 0.4.2", + "alloy-serde 0.4.2", + "alloy-signer 0.4.2", + "alloy-sol-types 0.8.8", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-primitives 0.8.8", + "alloy-serde 0.4.2", + "serde", +] + [[package]] name = "alloy-primitives" version = "0.7.7" @@ -306,9 +504,9 @@ checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" dependencies = [ "alloy-rlp", "bytes", - "cfg-if 1.0.0", + "cfg-if", "const-hex", - "derive_more 0.99.17", + "derive_more 0.99.18", "hex-literal", "itoa", "k256", @@ -320,6 +518,34 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-primitives" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f35429a652765189c1c5092870d8360ee7b7769b09b06d89ebaefd34676446" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 1.0.0", + "foldhash", + "hashbrown 0.15.0", + "hex-literal", + "indexmap 2.6.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.8.5", + "ruint", + "rustc-hash 2.0.0", + "serde", + "sha3 0.10.8", + "tiny-keccak", +] + [[package]] name = "alloy-provider" version = "0.1.4" @@ -327,22 +553,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c538bfa893d07e27cb4f3c1ab5f451592b7c526d511d62b576a2ce59e146e4a" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network", - "alloy-primitives", + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-json-rpc 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", "alloy-pubsub", - "alloy-rpc-client", - "alloy-rpc-types-eth", - "alloy-transport", - "alloy-transport-http", + "alloy-rpc-client 0.1.4", + "alloy-rpc-types-eth 0.1.4", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", "alloy-transport-ipc", "alloy-transport-ws", "async-stream", "async-trait", "auto_impl", - "dashmap", + "dashmap 5.5.3", + "futures", + "futures-utils-wasm", + "lru 0.12.3", + "pin-project", + "reqwest 0.12.5", + "serde", + "serde_json", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "alloy-provider" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcfaa4ffec0af04e3555686b8aacbcdf7d13638133a0672749209069750f78a6" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-json-rpc 0.4.2", + "alloy-network 0.4.2", + "alloy-network-primitives", + "alloy-primitives 0.8.8", + "alloy-rpc-client 0.4.2", + "alloy-rpc-types-eth 0.4.2", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", + "async-stream", + "async-trait", + "auto_impl", + "dashmap 6.1.0", "futures", "futures-utils-wasm", "lru 0.12.3", @@ -350,6 +609,7 @@ dependencies = [ "reqwest 0.12.5", "serde", "serde_json", + "thiserror", "tokio", "tracing", "url", @@ -361,16 +621,16 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a7341322d9bc0e49f6e9fd9f2eb8e30f73806f2dd12cbb3d6bab2694c921f87" dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-transport", + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", + "alloy-transport 0.1.4", "bimap", "futures", "serde", "serde_json", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tracing", ] @@ -402,11 +662,11 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ba31bae67773fd5a60020bea900231f8396202b7feca4d0c70c6b59308ab4a8" dependencies = [ - "alloy-json-rpc", - "alloy-primitives", + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", "alloy-pubsub", - "alloy-transport", - "alloy-transport-http", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", "alloy-transport-ipc", "alloy-transport-ws", "futures", @@ -416,7 +676,29 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "370143ed581aace6e663342d21d209c6b2e34ee6142f7d6675adb518deeaf0dc" +dependencies = [ + "alloy-json-rpc 0.4.2", + "alloy-primitives 0.8.8", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", + "futures", + "pin-project", + "reqwest 0.12.5", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.0", "tracing", "url", ] @@ -428,8 +710,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "184a7a42c7ba9141cc9e76368356168c282c3bc3d9e5d78f3556bdfe39343447" dependencies = [ "alloy-rpc-types-engine", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.1.4", + "alloy-serde 0.1.4", ] [[package]] @@ -438,12 +720,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e765962e3b82fd6f276a0873b5bd897e5d75a25f78fa9a6a21bd350d8e98a4e" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-primitives 0.7.7", "alloy-rlp", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.1.4", + "alloy-serde 0.1.4", "jsonwebtoken 9.3.0", "rand 0.8.5", "serde", @@ -456,25 +738,55 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab4123ee21f99ba4bd31bfa36ba89112a18a500f8b452f02b35708b1b951e2b9" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-primitives 0.7.7", "alloy-rlp", - "alloy-serde", - "alloy-sol-types", + "alloy-serde 0.1.4", + "alloy-sol-types 0.7.7", "itertools 0.13.0", "serde", "serde_json", "thiserror", ] +[[package]] +name = "alloy-rpc-types-eth" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413f4aa3ccf2c3e4234a047c5fa4727916d7daf25a89f9b765df0ba09784fd87" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-network-primitives", + "alloy-primitives 0.8.8", + "alloy-rlp", + "alloy-serde 0.4.2", + "alloy-sol-types 0.8.8", + "derive_more 1.0.0", + "itertools 0.13.0", + "serde", + "serde_json", +] + [[package]] name = "alloy-serde" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9416c52959e66ead795a11f4a86c248410e9e368a0765710e57055b8a1774dd6" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" +dependencies = [ + "alloy-primitives 0.8.8", "serde", "serde_json", ] @@ -485,7 +797,21 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b33753c09fa1ad85e5b092b8dc2372f1e337a42e84b9b4cff9fede75ba4adb32" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd4e0ad79c81a27ca659be5d176ca12399141659fef2bcbfdc848da478f4504" +dependencies = [ + "alloy-primitives 0.8.8", "async-trait", "auto_impl", "elliptic-curve", @@ -499,10 +825,26 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dfc9c26fe6c6f1bad818c9a976de9044dd12e1f75f1f156a801ee3e8148c1b6" dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", + "alloy-consensus 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-signer 0.1.4", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror", +] + +[[package]] +name = "alloy-signer-local" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494e0a256f3e99f2426f994bcd1be312c02cb8f88260088dacb33a8b8936475f" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-network 0.4.2", + "alloy-primitives 0.8.8", + "alloy-signer 0.4.2", "async-trait", "k256", "rand 0.8.5", @@ -515,30 +857,63 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" dependencies = [ - "alloy-sol-macro-expander", - "alloy-sol-macro-input", + "alloy-sol-macro-expander 0.7.7", + "alloy-sol-macro-input 0.7.7", "proc-macro-error", "proc-macro2", "quote", "syn 2.0.77", ] +[[package]] +name = "alloy-sol-macro" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2395336745358cc47207442127c47c63801a7065ecc0aa928da844f8bb5576" +dependencies = [ + "alloy-sol-macro-expander 0.8.8", + "alloy-sol-macro-input 0.8.8", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "alloy-sol-macro-expander" version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" dependencies = [ - "alloy-json-abi", - "alloy-sol-macro-input", + "alloy-json-abi 0.7.7", + "alloy-sol-macro-input 0.7.7", "const-hex", "heck 0.5.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "proc-macro-error", "proc-macro2", "quote", "syn 2.0.77", - "syn-solidity", + "syn-solidity 0.7.7", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed5047c9a241df94327879c2b0729155b58b941eae7805a7ada2e19436e6b39" +dependencies = [ + "alloy-json-abi 0.8.8", + "alloy-sol-macro-input 0.8.8", + "const-hex", + "heck 0.5.0", + "indexmap 2.6.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.77", + "syn-solidity 0.8.8", "tiny-keccak", ] @@ -548,7 +923,7 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" dependencies = [ - "alloy-json-abi", + "alloy-json-abi 0.7.7", "const-hex", "dunce", "heck 0.5.0", @@ -556,7 +931,24 @@ dependencies = [ "quote", "serde_json", "syn 2.0.77", - "syn-solidity", + "syn-solidity 0.7.7", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dee02a81f529c415082235129f0df8b8e60aa1601b9c9298ffe54d75f57210b" +dependencies = [ + "alloy-json-abi 0.8.8", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.77", + "syn-solidity 0.8.8", ] [[package]] @@ -569,15 +961,38 @@ dependencies = [ "winnow 0.6.5", ] +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f631f0bd9a9d79619b27c91b6b1ab2c4ef4e606a65192369a1ee05d40dcf81cc" +dependencies = [ + "serde", + "winnow 0.6.5", +] + [[package]] name = "alloy-sol-types" version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-macro", + "alloy-json-abi 0.7.7", + "alloy-primitives 0.7.7", + "alloy-sol-macro 0.7.7", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-sol-types" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2841af22d99e2c0f82a78fe107b6481be3dd20b89bfb067290092794734343a" +dependencies = [ + "alloy-json-abi 0.8.8", + "alloy-primitives 0.8.8", + "alloy-sol-macro 0.8.8", "const-hex", "serde", ] @@ -588,7 +1003,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01b51a291f949f755e6165c3ed562883175c97423703703355f4faa4b7d0a57c" dependencies = [ - "alloy-json-rpc", + "alloy-json-rpc 0.1.4", "base64 0.22.1", "futures-util", "futures-utils-wasm", @@ -596,7 +1011,26 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tower", + "tower 0.4.13", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac3e97dad3d31770db0fc89bd6a63b789fbae78963086733f960cf32c483904" +dependencies = [ + "alloy-json-rpc 0.4.2", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.5.0", "tracing", "url", ] @@ -607,11 +1041,26 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86d65871f9f1cafe1ed25cde2f1303be83e6473e995a2d56c275ae4fcce6119c" dependencies = [ - "alloy-json-rpc", - "alloy-transport", + "alloy-json-rpc 0.1.4", + "alloy-transport 0.1.4", "reqwest 0.12.5", "serde_json", - "tower", + "tower 0.4.13", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b367dcccada5b28987c2296717ee04b9a5637aacd78eacb1726ef211678b5212" +dependencies = [ + "alloy-json-rpc 0.4.2", + "alloy-transport 0.4.2", + "reqwest 0.12.5", + "serde_json", + "tower 0.5.0", "tracing", "url", ] @@ -622,9 +1071,9 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd7fbc8b6282ce41b01cbddef7bffb133fe6e1bf65dcd39770d45a905c051179" dependencies = [ - "alloy-json-rpc", + "alloy-json-rpc 0.1.4", "alloy-pubsub", - "alloy-transport", + "alloy-transport 0.1.4", "bytes", "futures", "interprocess", @@ -642,7 +1091,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aec83fd052684556c78c54df111433493267234d82321c2236560c752f595f20" dependencies = [ "alloy-pubsub", - "alloy-transport", + "alloy-transport 0.1.4", "futures", "http 1.1.0", "rustls 0.23.7", @@ -808,7 +1257,7 @@ dependencies = [ "arr_macro", "bcs 0.1.4", "byteorder", - "cfg-if 1.0.0", + "cfg-if", "get_if_addrs", "maplit", "num_cpus", @@ -1331,12 +1780,12 @@ dependencies = [ name = "arbitrum-light-client" version = "0.1.0" dependencies = [ + "alloy-core 0.8.8", "arbitrum-verifier", "base64 0.21.7", "cosmwasm-std 1.5.2", "ethereum-light-client", "ethereum-verifier", - "ethers-core", "hex", "ics008-wasm-client", "protos", @@ -1355,9 +1804,9 @@ dependencies = [ name = "arbitrum-verifier" version = "0.1.0" dependencies = [ + "alloy-core 0.8.8", "error_reporter", "ethereum-verifier", - "ethers-core", "hex", "hex-literal", "rlp", @@ -1687,15 +2136,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", -] - [[package]] name = "ascii_utils" version = "0.9.3" @@ -1720,7 +2160,7 @@ dependencies = [ "futures-util", "handlebars", "http 1.1.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "mime", "multer", "num-traits", @@ -1789,7 +2229,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1f665d2d52b41c4ed1f01c43f3ef27a2fe0af2452ed5c8bc7ac9b1a8719afaa" dependencies = [ "bytes", - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_json", ] @@ -1957,7 +2397,7 @@ dependencies = [ "serde_path_to_error", "sync_wrapper 0.1.2", "tokio", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", ] @@ -1993,7 +2433,7 @@ dependencies = [ "sync_wrapper 1.0.1", "tokio", "tokio-tungstenite 0.21.0", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -2075,7 +2515,7 @@ checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -2594,27 +3034,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "c-kzg" version = "1.0.2" @@ -2694,10 +3113,6 @@ name = "cc" version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" -dependencies = [ - "jobserver", - "libc", -] [[package]] name = "cesu8" @@ -2714,12 +3129,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -2742,15 +3151,14 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" name = "chain-utils" version = "0.1.0" dependencies = [ + "alloy 0.4.2", "beacon-api", "bip32", "chrono", "cometbft-rpc", - "contracts", "crossbeam-queue", - "dashmap", + "dashmap 5.5.3", "enumorph", - "ethers", "frame-support-procedural", "futures", "hex", @@ -2944,58 +3352,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "coins-bip32" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" -dependencies = [ - "bs58 0.5.1", - "coins-core", - "digest 0.10.7", - "hmac 0.12.1", - "k256", - "serde", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "coins-bip39" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" -dependencies = [ - "bitvec 1.0.1", - "coins-bip32", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.12.2", - "rand 0.8.5", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "coins-core" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" -dependencies = [ - "base64 0.21.7", - "bech32 0.9.1", - "bs58 0.5.1", - "digest 0.10.7", - "generic-array 0.14.7", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2 0.10.8", - "sha3 0.10.8", - "thiserror", -] - [[package]] name = "color-eyre" version = "0.6.3" @@ -3139,7 +3495,7 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "hex", "proptest", @@ -3184,14 +3540,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" -[[package]] -name = "contracts" -version = "0.0.0" -dependencies = [ - "ethers", - "serde", -] - [[package]] name = "convert_case" version = "0.4.0" @@ -3426,7 +3774,7 @@ dependencies = [ "cosmwasm-core", "cosmwasm-crypto 2.1.0", "cosmwasm-derive 2.1.0", - "derive_more 1.0.0-beta.6", + "derive_more 1.0.0", "hex", "rand_core 0.6.4", "schemars", @@ -3467,7 +3815,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -3693,7 +4041,7 @@ version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", @@ -4120,7 +4468,21 @@ version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", "hashbrown 0.14.3", "lock_api", "once_cell", @@ -4176,6 +4538,17 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "derive-where" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "derive_arbitrary" version = "1.3.2" @@ -4188,31 +4561,31 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] name = "derive_more" -version = "1.0.0-beta.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7abbfc297053be59290e3152f8cbcd52c8642e0728b69ee187d991d4c1af08d" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "1.0.0-beta.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bba3e9872d7c58ce7ef0fcf1844fcc3e23ef2a58377b50df35dd98e42a5726e" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", @@ -4285,34 +4658,13 @@ dependencies = [ ] [[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if 1.0.0", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" +name = "dirs-next" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", + "cfg-if", + "dirs-sys-next", ] [[package]] @@ -4364,7 +4716,7 @@ dependencies = [ "chain-utils", "chrono", "clap 4.5.4", - "dashmap", + "dashmap 5.5.3", "prost 0.12.6", "protos", "recaptcha-verify", @@ -4379,20 +4731,6 @@ dependencies = [ "unionlabs", ] -[[package]] -name = "dummy-ibc-app" -version = "0.1.0" -dependencies = [ - "borsh", - "ibc-vm-rs", - "near-contract-standards", - "near-sdk", - "near-sdk-contract-tools", - "serde", - "serde_json", - "unionlabs", -] - [[package]] name = "dunce" version = "1.0.4" @@ -4551,15 +4889,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ena" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" -dependencies = [ - "log", -] - [[package]] name = "encode_unicode" version = "0.3.6" @@ -4572,38 +4901,7 @@ version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "enr" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" -dependencies = [ - "base64 0.21.7", - "bytes", - "hex", - "k256", - "log", - "rand 0.8.5", - "rlp", - "serde", - "sha3 0.10.8", - "zeroize", -] - -[[package]] -name = "ensure-blocks" -version = "0.0.0" -dependencies = [ - "clap 4.5.4", - "ethers", - "reqwest 0.11.27", - "tendermint-rpc", - "tokio", - "tracing", - "tracing-subscriber 0.3.18", + "cfg-if", ] [[package]] @@ -4695,33 +4993,11 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "home", "windows-sys 0.48.0", ] -[[package]] -name = "eth-keystore" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" -dependencies = [ - "aes", - "ctr", - "digest 0.10.7", - "hex", - "hmac 0.12.1", - "pbkdf2 0.11.0", - "rand 0.8.5", - "scrypt", - "serde", - "serde_json", - "sha2 0.10.8", - "sha3 0.10.8", - "thiserror", - "uuid 0.8.2", -] - [[package]] name = "ethabi" version = "18.0.0" @@ -4730,40 +5006,18 @@ checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" dependencies = [ "ethereum-types", "hex", - "once_cell", - "regex", - "serde", - "serde_json", "sha3 0.10.8", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash 0.8.0", - "impl-codec 0.6.0", - "impl-rlp", - "impl-serde 0.4.0", - "scale-info", - "tiny-keccak", ] [[package]] name = "ethereum-light-client" version = "0.1.0" dependencies = [ + "alloy-core 0.8.8", "base64 0.21.7", "bytes", "cosmwasm-std 1.5.2", "ethereum-verifier", - "ethers-contract-derive", - "ethers-core", "hex", "hex-literal", "ics008-wasm-client", @@ -4788,13 +5042,8 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ - "ethbloom", "fixed-hash 0.8.0", - "impl-codec 0.6.0", - "impl-rlp", - "impl-serde 0.4.0", "primitive-types 0.12.2", - "scale-info", "uint", ] @@ -4819,247 +5068,9 @@ dependencies = [ "sha3 0.10.8", "ssz", "thiserror", - "trie-db", - "typenum", - "unionlabs", -] - -[[package]] -name = "ethers" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-middleware", - "ethers-providers", - "ethers-signers", - "ethers-solc", -] - -[[package]] -name = "ethers-addressbook" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "ethers-core", - "once_cell", - "serde", - "serde_json", -] - -[[package]] -name = "ethers-contract" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "ethers-etherscan", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "reqwest 0.11.27", - "serde", - "serde_json", - "syn 2.0.77", - "toml 0.8.12", - "walkdir", -] - -[[package]] -name = "ethers-contract-derive" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.77", -] - -[[package]] -name = "ethers-core" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "arrayvec 0.7.4", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "ethereum-types", - "generic-array 0.14.7", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand 0.8.5", - "rlp", - "serde", - "serde_json", - "strum 0.25.0", - "syn 2.0.77", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-etherscan" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "ethers-core", - "reqwest 0.11.27", - "semver 1.0.22", - "serde", - "serde_json", - "thiserror", - "tracing", -] - -[[package]] -name = "ethers-middleware" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "async-trait", - "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", -] - -[[package]] -name = "ethers-providers" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http 0.2.12", - "instant", - "jsonwebtoken 8.3.0", - "once_cell", - "pin-project", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite 0.20.1", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - -[[package]] -name = "ethers-signers" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand 0.8.5", - "sha2 0.10.8", - "thiserror", - "tracing", -] - -[[package]] -name = "ethers-solc" -version = "2.0.10" -source = "git+https://github.com/unionlabs/ethers-rs?branch=ethers-core-wasm#fd10abba9a9d5347b71bd4cde6418a6f6f2f1279" -dependencies = [ - "cfg-if 1.0.0", - "const-hex", - "dirs", - "dunce", - "ethers-core", - "glob", - "home", - "md-5", - "num_cpus", - "once_cell", - "path-slash", - "rayon", - "regex", - "semver 1.0.22", - "serde", - "serde_json", - "solang-parser", - "svm-rs", - "thiserror", - "tiny-keccak", - "tokio", - "tracing", - "walkdir", - "yansi", + "trie-db", + "typenum", + "unionlabs", ] [[package]] @@ -5237,7 +5248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" dependencies = [ "addchain", - "cfg-if 1.0.0", + "cfg-if", "num-bigint 0.3.3", "num-integer", "num-traits", @@ -5388,6 +5399,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -5471,16 +5488,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi 0.3.9", -] - [[package]] name = "fs_extra" version = "1.3.0" @@ -5564,16 +5571,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-locks" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", -] - [[package]] name = "futures-macro" version = "0.3.30" @@ -5646,14 +5643,6 @@ version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -[[package]] -name = "generate-rust-sol-bindings" -version = "0.1.0" -dependencies = [ - "clap 4.5.4", - "ethers-contract-abigen", -] - [[package]] name = "generic-array" version = "0.12.4" @@ -5702,7 +5691,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -5713,7 +5702,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -5848,7 +5837,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -5867,7 +5856,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -5886,7 +5875,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crunchy", ] @@ -5948,12 +5937,13 @@ dependencies = [ ] [[package]] -name = "hashers" -version = "1.0.1" +name = "hashbrown" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" dependencies = [ - "fxhash", + "foldhash", + "serde", ] [[package]] @@ -6227,7 +6217,7 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" name = "hubble" version = "0.1.0" dependencies = [ - "alloy", + "alloy 0.1.4", "aptos-crypto", "aptos-move-ibc", "aptos-rest-client", @@ -6242,7 +6232,6 @@ dependencies = [ "color-eyre", "cometbft-rpc", "const-hex", - "contracts", "futures", "hex", "itertools 0.13.0", @@ -6406,7 +6395,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", + "tower 0.4.13", "tower-service", "tracing", ] @@ -6435,18 +6424,10 @@ dependencies = [ ] [[package]] -name = "ibc-vm-rs" +name = "ibc-solidity" version = "0.1.0" dependencies = [ - "enumorph", - "frame-support-procedural", - "hex", - "lazy_static", - "schemars", - "serde", - "serde-utils", - "thiserror", - "unionlabs", + "alloy 0.4.2", ] [[package]] @@ -6694,12 +6675,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.15.0", "serde", ] @@ -6737,7 +6718,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -6747,7 +6728,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ab388864246d58a276e60e7569a833d9cc4cd75c66e5ca77c177dad38e59996" dependencies = [ "ahash 0.7.8", - "dashmap", + "dashmap 5.5.3", "hashbrown 0.12.3", "once_cell", "parking_lot", @@ -6853,7 +6834,7 @@ dependencies = [ "ahash 0.8.11", "dyn-clone", "hifijson", - "indexmap 2.2.6", + "indexmap 2.6.0", "jaq-syn", "once_cell", "serde_json", @@ -6897,15 +6878,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" -[[package]] -name = "jobserver" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.69" @@ -7005,7 +6977,7 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tower", + "tower 0.4.13", "tracing", "url", ] @@ -7046,7 +7018,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util", - "tower", + "tower 0.4.13", "tracing", ] @@ -7121,7 +7093,7 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", "once_cell", @@ -7148,36 +7120,6 @@ dependencies = [ "sha3-asm", ] -[[package]] -name = "lalrpop" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" -dependencies = [ - "ascii-canvas", - "bit-set", - "ena", - "itertools 0.11.0", - "lalrpop-util", - "petgraph 0.6.4", - "regex", - "regex-syntax 0.8.3", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", - "walkdir", -] - -[[package]] -name = "lalrpop-util" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" -dependencies = [ - "regex-automata 0.4.6", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -7288,11 +7230,11 @@ dependencies = [ name = "linea-light-client" version = "0.1.0" dependencies = [ + "alloy-core 0.8.8", "base64 0.21.7", "cosmwasm-std 1.5.2", "ethereum-light-client", "ethereum-verifier", - "ethers-core", "gnark-mimc", "hex", "ics008-wasm-client", @@ -7314,8 +7256,8 @@ dependencies = [ name = "linea-verifier" version = "0.1.0" dependencies = [ + "alloy-core 0.8.8", "ethereum-verifier", - "ethers-core", "gnark-mimc", "hex", "hex-literal", @@ -7483,7 +7425,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "digest 0.10.7", ] @@ -7502,12 +7444,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "memzero" version = "0.1.0" @@ -7605,7 +7541,7 @@ dependencies = [ "tagptr", "thiserror", "triomphe", - "uuid 1.10.0", + "uuid", ] [[package]] @@ -8129,18 +8065,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "near-abi" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c49593c9e94454a2368a4c0a511bf4bf1413aff4d23f16e1d8f4e64b5215351" -dependencies = [ - "borsh", - "schemars", - "semver 1.0.22", - "serde", -] - [[package]] name = "near-account-id" version = "1.0.0" @@ -8148,19 +8072,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35cbb989542587b47205e608324ddd391f0cee1c22b4b64ae49f458334b95907" dependencies = [ "borsh", - "schemars", "serde", ] -[[package]] -name = "near-contract-standards" -version = "5.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0e78fe14d389ae76f792735a2108a6b8332a2bed61197310bf5ad718fb1e424" -dependencies = [ - "near-sdk", -] - [[package]] name = "near-gas" version = "0.2.5" @@ -8168,42 +8082,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14e75c875026229902d065e4435804497337b631ec69ba746b102954273e9ad1" dependencies = [ "borsh", - "schemars", - "serde", -] - -[[package]] -name = "near-ibc" -version = "0.1.0" -dependencies = [ - "borsh", - "ibc-vm-rs", - "near-contract-standards", - "near-sdk", - "near-sdk-contract-tools", - "schemars", - "serde", - "serde_json", - "thiserror", - "unionlabs", -] - -[[package]] -name = "near-light-client" -version = "0.1.0" -dependencies = [ - "anyhow", - "borsh", - "ibc-vm-rs", - "near-contract-standards", - "near-primitives-core", - "near-sdk", - "near-sdk-contract-tools", - "near-units", "serde", - "serde_json", - "tokio", - "unionlabs", ] [[package]] @@ -8216,7 +8095,7 @@ dependencies = [ "base64 0.21.7", "borsh", "bs58 0.4.0", - "derive_more 0.99.17", + "derive_more 0.99.18", "enum-map", "near-account-id", "num-rational 0.3.2", @@ -8237,43 +8116,14 @@ dependencies = [ "base64 0.21.7", "borsh", "bs58 0.5.1", - "near-abi", "near-account-id", "near-gas", "near-sdk-macros", "near-sys", "near-token", "once_cell", - "schemars", "serde", "serde_json", - "wee_alloc", -] - -[[package]] -name = "near-sdk-contract-tools" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "506ae008927f06b7f116598d3728604744317c0215e7ebe07c74c8297b5127b6" -dependencies = [ - "near-sdk", - "near-sdk-contract-tools-macros", - "thiserror", -] - -[[package]] -name = "near-sdk-contract-tools-macros" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb88aa0ed4fbc1ad5c689b9b100cae9dadf1f03373ddd657fb9ac9d25a58ebb0" -dependencies = [ - "darling 0.20.8", - "heck 0.5.0", - "proc-macro2", - "quote", - "strum 0.26.2", - "strum_macros 0.26.2", - "syn 2.0.77", ] [[package]] @@ -8306,42 +8156,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b68f3f8a2409f72b43efdbeff8e820b81e70824c49fee8572979d789d1683fb" dependencies = [ "borsh", - "schemars", "serde", ] -[[package]] -name = "near-units" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a2b77f295d398589eeee51ad0887905ef1734fb12b45cb6d77bd7e401988b9" -dependencies = [ - "near-units-core", - "near-units-macro", -] - -[[package]] -name = "near-units-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89aa2a7985de87a08ca35f28abd8d00f0f901e704257e6e029aadef981386bc6" -dependencies = [ - "num-format", - "regex", -] - -[[package]] -name = "near-units-macro" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ab45d066220846f9bd5c21e9ab88c47c892edd36f962ada78bf8308523171a" -dependencies = [ - "near-units-core", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "neptune" version = "13.0.0" @@ -8361,12 +8178,6 @@ dependencies = [ "trait-set", ] -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - [[package]] name = "nix" version = "0.28.0" @@ -8374,7 +8185,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ "bitflags 2.5.0", - "cfg-if 1.0.0", + "cfg-if", "cfg_aliases 0.1.1", "libc", ] @@ -8493,16 +8304,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "num-format" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" -dependencies = [ - "arrayvec 0.7.4", - "itoa", -] - [[package]] name = "num-integer" version = "0.1.46" @@ -8582,7 +8383,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.77", @@ -8627,31 +8428,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec 0.7.4", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "openssl" version = "0.10.64" @@ -8659,7 +8435,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ "bitflags 2.5.0", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -8696,12 +8472,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "ordered-float" version = "2.10.1" @@ -8841,7 +8611,7 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", "smallvec", @@ -8866,7 +8636,7 @@ dependencies = [ "ciborium", "coset", "data-encoding", - "indexmap 2.2.6", + "indexmap 2.6.0", "rand 0.8.5", "serde", "serde_json", @@ -8875,17 +8645,6 @@ dependencies = [ "typeshare", ] -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle 2.5.0", -] - [[package]] name = "pasta_curves" version = "0.5.1" @@ -8909,12 +8668,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[package]] -name = "path-slash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" - [[package]] name = "pbjson" version = "0.6.0" @@ -8949,28 +8702,6 @@ dependencies = [ "serde", ] -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", - "hmac 0.12.1", - "password-hash", - "sha2 0.10.8", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac 0.12.1", -] - [[package]] name = "peg" version = "0.8.4" @@ -9094,7 +8825,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.2.6", + "indexmap 2.6.0", ] [[package]] @@ -9120,51 +8851,18 @@ name = "pharos" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" -dependencies = [ - "futures", - "rustc_version 0.4.0", -] - -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_macros", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared 0.11.2", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -dependencies = [ - "phf_generator", - "phf_shared 0.11.2", - "proc-macro2", - "quote", - "syn 2.0.77", +dependencies = [ + "futures", + "rustc_version 0.4.0", ] [[package]] -name = "phf_shared" -version = "0.10.0" +name = "phf" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ - "siphasher", + "phf_shared", ] [[package]] @@ -9324,9 +9022,9 @@ source = "git+https://github.com/poem-web/poem.git?rev=809b2816d3504beeba140fef3 dependencies = [ "base64 0.22.1", "bytes", - "derive_more 0.99.17", + "derive_more 0.99.18", "futures-util", - "indexmap 2.2.6", + "indexmap 2.6.0", "mime", "num-traits", "poem", @@ -9349,7 +9047,7 @@ source = "git+https://github.com/poem-web/poem.git?rev=809b2816d3504beeba140fef3 dependencies = [ "darling 0.20.8", "http 1.1.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "mime", "proc-macro-crate 3.1.0", "proc-macro2", @@ -9365,7 +9063,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "opaque-debug 0.3.1", "universal-hash", @@ -9443,12 +9141,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - [[package]] name = "prettier-please" version = "0.2.0" @@ -9500,7 +9192,6 @@ dependencies = [ "impl-codec 0.6.0", "impl-rlp", "impl-serde 0.4.0", - "scale-info", "uint", ] @@ -9556,6 +9247,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "proc-macro-hack" version = "0.5.20+deprecated" @@ -9617,7 +9330,7 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fnv", "lazy_static", "libc", @@ -9710,7 +9423,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf0c195eebb4af52c752bec4f52f645da98b6e92077a04110c7f349477ae5ac" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.77", @@ -9736,7 +9449,6 @@ name = "protos" version = "0.0.0" dependencies = [ "chrono", - "ethers", "pbjson-types", "prost 0.12.6", "schemars", @@ -9916,6 +9628,7 @@ dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", + "serde", ] [[package]] @@ -10263,7 +9976,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util", - "tower", + "tower 0.4.13", "tracing", ] @@ -10308,7 +10021,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "cfg-if 1.0.0", + "cfg-if", "getrandom 0.2.12", "libc", "spin 0.9.8", @@ -10644,15 +10357,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher", -] - [[package]] name = "same-file" version = "1.0.6" @@ -10662,30 +10366,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scale-info" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "788745a868b0e751750388f4e6546eb921ef714a4317fa6954f7cde114eb2eb7" -dependencies = [ - "cfg-if 1.0.0", - "derive_more 0.99.17", - "parity-scale-codec 3.6.9", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dc2f4e8bc344b9fc3d5f74f72c2e55bfc38d28dc2ebc69c194a3df424e4d9ac" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "schannel" version = "0.1.23" @@ -10741,7 +10421,7 @@ dependencies = [ name = "scroll-codec" version = "0.1.0" dependencies = [ - "ethers", + "alloy 0.4.2", "hex-literal", "serde", "serde-utils", @@ -10755,11 +10435,11 @@ dependencies = [ name = "scroll-light-client" version = "0.1.0" dependencies = [ + "alloy-core 0.8.8", "base64 0.21.7", "cosmwasm-std 1.5.2", "ethereum-light-client", "ethereum-verifier", - "ethers-core", "hex", "ics008-wasm-client", "protos", @@ -10794,8 +10474,8 @@ dependencies = [ name = "scroll-verifier" version = "0.1.0" dependencies = [ + "alloy-core 0.8.8", "ethereum-verifier", - "ethers-core", "hex", "hex-literal", "rlp", @@ -10809,18 +10489,6 @@ dependencies = [ "zktrie", ] -[[package]] -name = "scrypt" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" -dependencies = [ - "hmac 0.12.1", - "pbkdf2 0.11.0", - "salsa20", - "sha2 0.10.8", -] - [[package]] name = "sct" version = "0.7.1" @@ -11072,7 +10740,7 @@ version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -11141,7 +10809,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_derive", "serde_json", @@ -11179,7 +10847,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -11192,7 +10860,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.7", ] @@ -11216,7 +10884,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.1", @@ -11228,7 +10896,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.7", ] @@ -11262,7 +10930,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9b57fd861253bff08bb1919e995f90ba8f4889de2726091c8876f3a4e823b40" dependencies = [ "cc", - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -11386,20 +11054,6 @@ dependencies = [ "sha1", ] -[[package]] -name = "solang-parser" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cb9fa2fa2fa6837be8a2495486ff92e3ffe68a99b6eeba288e139efdd842457" -dependencies = [ - "itertools 0.11.0", - "lalrpop", - "lalrpop-util", - "phf", - "thiserror", - "unicode-xid", -] - [[package]] name = "sp-crypto-hashing" version = "0.1.0" @@ -11485,7 +11139,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.6", + "indexmap 2.6.0", "log", "memchr", "once_cell", @@ -11724,19 +11378,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7beae5182595e9a8b683fa98c4317f956c9a2dec3b9716990d20023cc60c766" -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared 0.10.0", - "precomputed-hash", -] - [[package]] name = "stringprep" version = "0.1.4" @@ -11917,26 +11558,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" -[[package]] -name = "svm-rs" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" -dependencies = [ - "dirs", - "fs2", - "hex", - "once_cell", - "reqwest 0.11.27", - "semver 1.0.22", - "serde", - "serde_json", - "sha2 0.10.8", - "thiserror", - "url", - "zip", -] - [[package]] name = "syn" version = "1.0.109" @@ -11971,6 +11592,18 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "syn-solidity" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebfc1bfd06acc78f16d8fd3ef846bc222ee7002468d10a7dce8d703d6eab89a3" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "syn_derive" version = "0.1.8" @@ -12037,7 +11670,7 @@ version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "rustix", "windows-sys 0.52.0", @@ -12151,7 +11784,7 @@ dependencies = [ "tokio", "tracing", "url", - "uuid 1.10.0", + "uuid", "walkdir", ] @@ -12170,17 +11803,6 @@ dependencies = [ "unionlabs", ] -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi 0.3.9", -] - [[package]] name = "termcolor" version = "1.4.1" @@ -12267,7 +11889,7 @@ version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -12517,21 +12139,6 @@ dependencies = [ "tokio-util", ] -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "rustls 0.21.10", - "tokio", - "tokio-rustls 0.24.1", - "tungstenite 0.20.1", - "webpki-roots 0.25.4", -] - [[package]] name = "tokio-tungstenite" version = "0.21.0" @@ -12613,7 +12220,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", @@ -12626,7 +12233,7 @@ version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "toml_datetime", "winnow 0.5.40", ] @@ -12637,7 +12244,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "toml_datetime", "winnow 0.5.40", ] @@ -12648,7 +12255,7 @@ version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", @@ -12681,7 +12288,7 @@ dependencies = [ "tokio", "tokio-rustls 0.24.1", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -12708,6 +12315,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36b837f86b25d7c0d7988f00a54e74739be6477f2aac6201b8f429a7569991b7" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.2" @@ -12904,26 +12525,6 @@ dependencies = [ "toml 0.8.12", ] -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.12", - "httparse", - "log", - "rand 0.8.5", - "rustls 0.21.10", - "sha1", - "thiserror", - "url", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.21.0" @@ -12971,7 +12572,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 0.1.10", + "cfg-if", "digest 0.10.7", "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -13016,25 +12617,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" -[[package]] -name = "ucli" -version = "0.1.0" -dependencies = [ - "beacon-api", - "chain-utils", - "clap 4.5.4", - "contracts", - "cosmwasm-std 1.5.2", - "ethers", - "hex", - "serde", - "serde_json", - "subtle-encoding", - "tendermint-rpc", - "tokio", - "unionlabs", -] - [[package]] name = "ucs00-pingpong" version = "1.0.0" @@ -13208,6 +12790,7 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" name = "unionlabs" version = "0.1.0" dependencies = [ + "alloy-core 0.8.8", "base64 0.21.7", "bcs 0.1.6", "bip32", @@ -13215,32 +12798,28 @@ dependencies = [ "borsh", "bs58 0.4.0", "chrono", - "clap 4.5.4", - "contracts", "cosmwasm-std 1.5.2", - "derive_more 0.99.17", + "derive_more 1.0.0", "either", "enumorph", - "ethers", - "ethers-contract-derive", - "ethers-core", "frame-support-procedural", "generic-array 0.14.7", "hex", "hex-literal", + "ibc-solidity", "k256", "macros", "milagro_bls", "near-primitives-core", "near-sdk", "paste", - "primitive-types 0.12.2", "prost 0.12.6", "protos", "rand 0.8.5", "ripemd", "rlp", "rs_merkle", + "ruint", "schemars", "serde", "serde-utils", @@ -13252,12 +12831,20 @@ dependencies = [ "static_assertions 1.1.0 (git+https://github.com/nvzqz/static-assertions)", "subtle-encoding", "thiserror", - "tracing", "typenum", - "uint", + "valuable", "wasmparser", ] +[[package]] +name = "unionlabs-tracing" +version = "0.1.0" +dependencies = [ + "tracing", + "tracing-subscriber 0.3.18", + "valuable", +] + [[package]] name = "unionvisor" version = "0.1.0" @@ -13352,16 +12939,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.12", - "serde", -] - [[package]] name = "uuid" version = "1.10.0" @@ -13374,8 +12951,7 @@ dependencies = [ [[package]] name = "valuable" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +source = "git+https://github.com/benluelo/valuable?branch=johnhurt/renderable#eca6a6e1c31d914d541786c859c8ed6c81374173" dependencies = [ "valuable-derive", ] @@ -13383,12 +12959,11 @@ dependencies = [ [[package]] name = "valuable-derive" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d44690c645190cfce32f91a1582281654b2338c6073fa250b0949fd25c55b32" +source = "git+https://github.com/benluelo/valuable?branch=johnhurt/renderable#eca6a6e1c31d914d541786c859c8ed6c81374173" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] @@ -13424,19 +12999,15 @@ name = "voyager" version = "0.1.0" dependencies = [ "axum 0.6.20", - "beacon-api", "bech32 0.9.1", "bip32", "bitvec 1.0.1", "chain-utils", "clap 4.5.4", - "contracts", "crossbeam-queue", - "derive_more 0.99.17", + "derive_more 1.0.0", "either", "enumorph", - "ethers", - "frame-support-procedural", "futures", "hex", "hex-literal", @@ -13458,9 +13029,6 @@ dependencies = [ "soketto", "sqlx", "subtle-encoding", - "tendermint", - "tendermint-proto", - "tendermint-rpc", "thiserror", "tikv-jemallocator", "tokio", @@ -13470,7 +13038,6 @@ dependencies = [ "tracing", "tracing-futures", "tracing-subscriber 0.3.18", - "typenum", "unionlabs", "voyager-message", "voyager-vm", @@ -13482,9 +13049,10 @@ version = "0.1.0" dependencies = [ "clap 4.5.4", "cometbft-rpc", - "dashmap", + "dashmap 5.5.3", "enumorph", "futures", + "itertools 0.13.0", "jsonrpsee", "macros", "prost 0.12.6", @@ -13505,11 +13073,10 @@ dependencies = [ name = "voyager-chain-module-ethereum" version = "0.1.0" dependencies = [ + "alloy 0.4.2", "beacon-api", "chain-utils", - "contracts", "enumorph", - "ethers", "futures", "jsonrpsee", "macros", @@ -13569,7 +13136,7 @@ dependencies = [ "ark-serialize 0.4.2", "clap 4.5.4", "cometbft-rpc", - "dashmap", + "dashmap 5.5.3", "enumorph", "futures", "hex", @@ -13642,7 +13209,7 @@ version = "0.1.0" dependencies = [ "clap 4.5.4", "cometbft-rpc", - "dashmap", + "dashmap 5.5.3", "enumorph", "futures", "jsonrpsee", @@ -13664,7 +13231,7 @@ name = "voyager-client-update-plugin-cometbls" version = "0.1.0" dependencies = [ "cometbft-rpc", - "dashmap", + "dashmap 5.5.3", "enumorph", "futures", "itertools 0.13.0", @@ -13689,12 +13256,12 @@ dependencies = [ name = "voyager-client-update-plugin-ethereum" version = "0.1.0" dependencies = [ + "alloy 0.4.2", "beacon-api", "bitvec 1.0.1", "chain-utils", "enumorph", "ethereum-verifier", - "ethers", "futures", "jsonrpsee", "macros", @@ -13716,13 +13283,13 @@ dependencies = [ name = "voyager-client-update-plugin-movement" version = "0.1.0" dependencies = [ + "alloy 0.4.2", "aptos-move-ibc", "aptos-rest-client", "aptos-types", "bitvec 1.0.1", "chain-utils", "enumorph", - "ethers", "futures", "jsonrpsee", "macros", @@ -13748,7 +13315,7 @@ name = "voyager-client-update-plugin-tendermint" version = "0.1.0" dependencies = [ "cometbft-rpc", - "dashmap", + "dashmap 5.5.3", "enumorph", "futures", "ics23", @@ -13773,7 +13340,7 @@ name = "voyager-consensus-module-cometbls" version = "0.1.0" dependencies = [ "cometbft-rpc", - "dashmap", + "dashmap 5.5.3", "enumorph", "futures", "jsonrpsee", @@ -13796,12 +13363,12 @@ dependencies = [ name = "voyager-consensus-module-ethereum" version = "0.1.0" dependencies = [ + "alloy 0.4.2", "beacon-api", "bitvec 1.0.1", "chain-utils", "enumorph", "ethereum-verifier", - "ethers", "futures", "jsonrpsee", "macros", @@ -13823,13 +13390,13 @@ dependencies = [ name = "voyager-consensus-module-movement" version = "0.1.0" dependencies = [ + "alloy 0.4.2", "aptos-move-ibc", "aptos-rest-client", "aptos-types", "bitvec 1.0.1", "chain-utils", "enumorph", - "ethers", "futures", "jsonrpsee", "macros", @@ -13854,7 +13421,7 @@ name = "voyager-consensus-module-tendermint" version = "0.1.0" dependencies = [ "cometbft-rpc", - "dashmap", + "dashmap 5.5.3", "enumorph", "futures", "ics23", @@ -13888,6 +13455,7 @@ dependencies = [ "thiserror", "tracing", "unionlabs", + "valuable", ] [[package]] @@ -13896,7 +13464,7 @@ version = "0.1.0" dependencies = [ "clap 4.5.4", "cometbft-rpc", - "dashmap", + "dashmap 5.5.3", "enumorph", "futures", "jsonrpsee", @@ -13919,12 +13487,12 @@ dependencies = [ name = "voyager-event-source-plugin-ethereum" version = "0.1.0" dependencies = [ + "alloy 0.4.2", "beacon-api", "chain-utils", - "contracts", "enumorph", - "ethers", "futures", + "ibc-solidity", "jsonrpsee", "macros", "serde", @@ -13980,13 +13548,12 @@ dependencies = [ name = "voyager-message" version = "0.1.0" dependencies = [ + "alloy 0.4.2", "beacon-api", "chain-utils", "clap 4.5.4", - "contracts", - "dashmap", + "dashmap 5.5.3", "enumorph", - "ethers", "frame-support-procedural", "futures", "hex", @@ -14021,6 +13588,8 @@ dependencies = [ "tracing-subscriber 0.3.18", "typenum", "unionlabs", + "unionlabs-tracing", + "valuable", "voyager-core", "voyager-vm", ] @@ -14051,7 +13620,7 @@ name = "voyager-plugin-transaction-batch" version = "0.1.0" dependencies = [ "cometbft-rpc", - "dashmap", + "dashmap 5.5.3", "either", "enumorph", "futures", @@ -14110,7 +13679,7 @@ dependencies = [ "bip32", "chain-utils", "cometbft-rpc", - "dashmap", + "dashmap 5.5.3", "enumorph", "futures", "hex", @@ -14136,13 +13705,14 @@ dependencies = [ name = "voyager-transaction-plugin-ethereum" version = "0.1.0" dependencies = [ + "alloy 0.4.2", "beacon-api", "bip32", "chain-utils", - "contracts", "enumorph", - "ethers", "futures", + "ibc-solidity", + "itertools 0.13.0", "jsonrpsee", "macros", "serde", @@ -14162,12 +13732,11 @@ name = "voyager-vm" version = "0.1.0" dependencies = [ "criterion 0.5.1", + "derive-where", "either", "enumorph", - "frame-support-procedural", "futures", "itertools 0.12.1", - "macros", "serde", "serde_json", "static_assertions 1.1.0 (git+https://github.com/nvzqz/static-assertions)", @@ -14178,6 +13747,7 @@ dependencies = [ "tracing", "tracing-subscriber 0.3.18", "unionlabs", + "voyager-macros", "voyager-message", ] @@ -14233,7 +13803,7 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -14258,7 +13828,7 @@ version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -14312,7 +13882,7 @@ version = "0.113.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "286049849b5a5bd09a8773171be96824afabffc7cc3df6caaf33a38db6cd07ae" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "semver 1.0.22", ] @@ -14341,18 +13911,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi 0.3.9", -] - [[package]] name = "which" version = "4.4.2" @@ -14596,7 +14154,7 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] @@ -14606,7 +14164,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] @@ -14663,12 +14221,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - [[package]] name = "zerocopy" version = "0.7.32" @@ -14709,26 +14261,6 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "aes", - "byteorder", - "bzip2", - "constant_time_eq 0.1.5", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac 0.12.1", - "pbkdf2 0.11.0", - "sha1", - "time", - "zstd", -] - [[package]] name = "zip-optional" version = "0.1.0" @@ -14744,32 +14276,3 @@ dependencies = [ "thiserror", "unionlabs", ] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/Cargo.toml b/Cargo.toml index 91be2bab9c..8eb9df1272 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,9 +9,8 @@ members = [ "cosmwasm/ucs02-nft", "devnet-compose", - "e2e/ensure-blocks", + # "e2e/ensure-blocks", - "generated/rust/contracts", "generated/rust/protos", "generated/rust/aptos-move-ibc", @@ -23,7 +22,7 @@ members = [ "lib/chain-utils", "lib/gnark-key-parser", "lib/gnark-mimc", - "lib/ibc-vm-rs", + # "lib/ibc-vm-rs", "lib/ics-008-wasm-client", "lib/ics23", "lib/linea-verifier", @@ -42,12 +41,15 @@ members = [ "lib/ssz-derive", "lib/unionlabs", "lib/zktrie-rs", + "lib/voyager-message", "lib/voyager-core", - "lib/near/near-ibc", - "lib/near/near-light-client", - "lib/near/dummy-ibc-app", + "lib/ibc-solidity", + + # "lib/near/near-ibc", + # "lib/near/near-light-client", + # "lib/near/dummy-ibc-app", # "lib/near/near-ibc-tests", "lib/arbitrum-verifier", @@ -65,14 +67,12 @@ members = [ "light-clients/tendermint-light-client", "light-clients/linea-light-client", - "tools/generate-rust-sol-bindings", "tools/devnet-utils", "tools/parse-wasm-client-type", "tools/tidy", "tools/move-bindgen", "lib/move-bindgen-derive", - "ucli", "unionvisor", "voyager", @@ -112,8 +112,9 @@ members = [ "lib/aptos-verifier", "lib/reconnecting-jsonrpc-ws-client", - "lib/voyager-core", "lib/subset-of", + "lib/unionlabs-tracing", + "lib/voyager-macros", ] [workspace.package] @@ -134,19 +135,20 @@ lto = "thin" opt-level = 3 [workspace.dependencies] -aptos-move-ibc = { path = "generated/rust/aptos-move-ibc", default-features = false } -aptos-verifier = { path = "lib/aptos-verifier", default-features = false } -arbitrum-verifier = { path = "lib/arbitrum-verifier", default-features = false } -beacon-api = { path = "lib/beacon-api", default-features = false } -chain-utils = { path = "lib/chain-utils", default-features = false } -cometbft-rpc = { path = "lib/cometbft-rpc", default-features = false } -cometbls-groth16-verifier = { path = "lib/cometbls-groth16-verifier", default-features = false } -contracts = { path = "generated/rust/contracts", default-features = false } -ethereum-light-client = { path = "light-clients/ethereum-light-client", default-features = false } -ethereum-verifier = { path = "lib/ethereum-verifier", default-features = false } -gnark-key-parser = { path = "lib/gnark-key-parser", default-features = false } -gnark-mimc = { path = "lib/gnark-mimc", default-features = false } -ibc-vm-rs = { path = "lib/ibc-vm-rs", default-features = false } +aptos-move-ibc = { path = "generated/rust/aptos-move-ibc", default-features = false } +aptos-verifier = { path = "lib/aptos-verifier", default-features = false } +arbitrum-verifier = { path = "lib/arbitrum-verifier", default-features = false } +beacon-api = { path = "lib/beacon-api", default-features = false } +chain-utils = { path = "lib/chain-utils", default-features = false } +cometbft-rpc = { path = "lib/cometbft-rpc", default-features = false } +cometbls-groth16-verifier = { path = "lib/cometbls-groth16-verifier", default-features = false } +ethereum-light-client = { path = "light-clients/ethereum-light-client", default-features = false } +ethereum-verifier = { path = "lib/ethereum-verifier", default-features = false } +gnark-key-parser = { path = "lib/gnark-key-parser", default-features = false } +gnark-mimc = { path = "lib/gnark-mimc", default-features = false } +ibc-solidity = { path = "lib/ibc-solidity", default-features = false } +unionlabs-tracing = { path = "lib/unionlabs-tracing", default-features = false } +# ibc-vm-rs = { path = "lib/ibc-vm-rs", default-features = false } ics008-wasm-client = { path = "lib/ics-008-wasm-client", default-features = false } ics23 = { path = "lib/ics23", default-features = false } linea-verifier = { path = "lib/linea-verifier", default-features = false } @@ -173,6 +175,7 @@ token-factory-api = { path = "cosmwasm/token-factory-api", default- ucs01-relay-api = { path = "cosmwasm/ucs01-relay-api", default-features = false } unionlabs = { path = "lib/unionlabs", default-features = false } voyager-core = { path = "lib/voyager-core", default-features = false } +voyager-macros = { path = "lib/voyager-macros", default-features = false } voyager-message = { path = "lib/voyager-message", default-features = false } voyager-vm = { path = "lib/voyager-vm", default-features = false } zktrie = { path = "lib/zktrie-rs", default-features = false } @@ -181,16 +184,11 @@ zktrie = { path = "lib/zktrie-rs", default-features = fa milagro_bls = { git = "https://github.com/Snowfork/milagro_bls", rev = "bc2b5b5e8d48b7e2e1bfaa56dc2d93e13cb32095", default-features = false } tendermint = { git = "https://github.com/unionlabs/tendermint-rs", branch = "v0.39.1-bn254", default-features = false } -tendermint-proto = { git = "https://github.com/unionlabs/tendermint-rs", branch = "v0.39.1-bn254", default-features = false } tendermint-rpc = { git = "https://github.com/unionlabs/tendermint-rs", branch = "v0.39.1-bn254", default-features = false } -ethers = { git = "https://github.com/unionlabs/ethers-rs", branch = "ethers-core-wasm", default-features = false } -ethers-contract-abigen = { git = "https://github.com/unionlabs/ethers-rs", branch = "ethers-core-wasm", default-features = false } -ethers-contract-derive = { git = "https://github.com/unionlabs/ethers-rs", branch = "ethers-core-wasm", default-features = false } -ethers-core = { git = "https://github.com/unionlabs/ethers-rs", branch = "ethers-core-wasm", default-features = false } - -# https://github.com/aptos-labs/aptos-core/pull/12636 -aptos-crypto = { git = "https://github.com/unionlabs/aptos-core" } +alloy = { version = "0.4.2" } +alloy-core = { version = "0.8.7" } +aptos-crypto = { git = "https://github.com/unionlabs/aptos-core" } # https://github.com/aptos-labs/aptos-core/pull/12636 aptos-rest-client = { git = "https://github.com/unionlabs/aptos-core" } aptos-types = { git = "https://github.com/unionlabs/aptos-core" } axum = { version = "0.6.20", default-features = false } @@ -208,7 +206,7 @@ cosmwasm-std = { version = "1.5", default-features = false } crossbeam-queue = { version = "0.3.8", default-features = false } cw-storage-plus = { version = "1.2", default-features = false } dashmap = { version = "5.5.3", default-features = false } -derive_more = { version = "0.99.17", default-features = false } +derive_more = { version = "1.0.0", default-features = false } dlmalloc = { version = "=0.2.4", default-features = false } either = { version = "1.9.0", default-features = false } enumorph = { version = "0.1.2", default-features = false } @@ -221,9 +219,7 @@ hex-literal = { version = "0.4.1", default-features = false } jsonrpsee = { version = "0.24.2", default-features = false } lazy_static = { version = "1.4.0", default-features = false } move-core-types = { git = "https://github.com/unionlabs/aptos-core" } -near-contract-standards = { version = "5.1.0", default-features = false } near-sdk = { version = "5.1.0", default-features = false } -near-sdk-contract-tools = { version = "3.0.2", default-features = false } num-bigint = { version = "0.4", default-features = false } primitive-types = { version = "0.12.1", default-features = false } prost = { version = "0.12.3", default-features = false } @@ -250,6 +246,7 @@ tonic = { version = "0.10", default-features = false } tracing = { version = "0.1.40", default-features = false } tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi"] } typenum = { version = "1.17.0", default-features = false } +valuable = { version = "0.1.0", default-features = false } [patch."crates-io"] arbitrary = { git = "https://github.com/unionlabs/arbitrary" } @@ -258,3 +255,5 @@ arbitrary = { git = "https://github.com/unionlabs/arbitrary" } # https://aptos.dev/en/build/sdks/rust-sdk merlin = { git = "https://github.com/aptos-labs/merlin" } x25519-dalek = { git = "https://github.com/aptos-labs/x25519-dalek", branch = "zeroize_v1" } + +valuable = { git = "https://github.com/benluelo/valuable", branch = "johnhurt/renderable" } diff --git a/cosmwasm/ucs01-relay-api/src/middleware.rs b/cosmwasm/ucs01-relay-api/src/middleware.rs index d330f41fe0..03cab13c72 100644 --- a/cosmwasm/ucs01-relay-api/src/middleware.rs +++ b/cosmwasm/ucs01-relay-api/src/middleware.rs @@ -1,10 +1,7 @@ use cosmwasm_std::{Addr, Event, IbcPacket}; use serde::{Deserialize, Serialize}; use thiserror::Error; -use unionlabs::{ - id::{ChannelId, PortId}, - validated::{Validate, Validated}, -}; +use unionlabs::id::{ChannelId, PortId}; use crate::{protocol::ProtocolError, types::Fees}; @@ -138,30 +135,39 @@ impl PacketForward { } } -pub type PfmReceiverValidator = NotEmptyString; -pub type PfmReceiver = Validated; - -pub struct NotEmptyString; - -// TODO: Not specific to receiver -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -#[error("failed to validate metadata. receiver cannot be empty")] -pub struct EmptyStringError; - -impl + From> Validate for NotEmptyString { - type Error = EmptyStringError; - - fn validate(t: T) -> Result { - let s = t.into(); +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(try_from = "String", into = "String")] +pub struct PfmReceiver(String); +impl PfmReceiver { + pub fn new(s: String) -> Result { if s.is_empty() { Err(EmptyStringError) } else { - Ok(s.into()) + Ok(Self(s)) } } } +impl From for String { + fn from(value: PfmReceiver) -> Self { + value.0 + } +} + +impl TryFrom for PfmReceiver { + type Error = EmptyStringError; + + fn try_from(value: String) -> Result { + Self::new(value) + } +} + +// TODO: Not specific to receiver +#[derive(Debug, Clone, PartialEq, thiserror::Error)] +#[error("failed to validate metadata. receiver cannot be empty")] +pub struct EmptyStringError; + #[cfg(test)] mod tests { use super::Memo; diff --git a/cosmwasm/ucs01-relay/src/ibc/tests.rs b/cosmwasm/ucs01-relay/src/ibc/tests.rs index 64e2cdc833..5a94391ce9 100644 --- a/cosmwasm/ucs01-relay/src/ibc/tests.rs +++ b/cosmwasm/ucs01-relay/src/ibc/tests.rs @@ -18,11 +18,11 @@ use cw_multi_test::{ use serde::de::DeserializeOwned; use token_factory_api::TokenFactoryMsg; use ucs01_relay_api::{ - middleware::{Memo, PacketForward}, + middleware::{Memo, PacketForward, PfmReceiver}, protocol::TransferProtocol, types::make_foreign_denom, }; -use unionlabs::validated::Validated; +use unionlabs::id::{ChannelId, PortId}; use crate::{ contract::{execute, instantiate, query}, @@ -616,9 +616,9 @@ fn test_pfm_valid_memo() { let memo = serde_json_wasm::to_string( &(Memo::Forward { forward: PacketForward { - receiver: Validated::new(fwd_contract_addr.to_string()).unwrap(), - port: Validated::new(fwd_dst_port.clone()).unwrap(), - channel: Validated::new(fwd_dst_channel.clone()).unwrap(), + receiver: PfmReceiver::new(fwd_contract_addr.to_string()).unwrap(), + port: PortId::new(fwd_dst_port.clone()).unwrap(), + channel: ChannelId::parse_prefixed(&fwd_dst_channel).unwrap(), next: None, retries: 1, return_info: None, diff --git a/cosmwasm/ucs01-relay/src/protocol.rs b/cosmwasm/ucs01-relay/src/protocol.rs index 1d8ba93281..86d45731d1 100644 --- a/cosmwasm/ucs01-relay/src/protocol.rs +++ b/cosmwasm/ucs01-relay/src/protocol.rs @@ -91,14 +91,10 @@ pub trait TransferProtocolExt<'a>: .unwrap_or_default() .nanos(); let packet_timeout_height = match refund_info.origin_packet.timeout.block() { - Some(timeout_block) => Height { - revision_number: timeout_block.revision, - revision_height: timeout_block.height, - }, - None => Height { - revision_number: 0, - revision_height: 0, - }, + Some(timeout_block) => { + Height::new_with_revision(timeout_block.revision, timeout_block.height) + } + None => Height::default(), }; let deferred_packet_into = DeferredPacketInfo { @@ -161,8 +157,8 @@ pub trait TransferProtocolExt<'a>: }; let transfer_msg = TransferMsg { - channel: forward.channel.clone().value(), - receiver: forward.receiver.value(), + channel: forward.channel.to_string_prefixed(), + receiver: forward.receiver.into(), timeout: Some(timeout), memo, fees: forward.fees, @@ -181,8 +177,8 @@ pub trait TransferProtocolExt<'a>: origin_sender_addr: self.common().info.sender.clone(), origin_packet: original_packet, forward_timeout: timeout, - forward_src_channel_id: forward.channel.value(), - forward_src_port_id: forward.port.value(), + forward_src_channel_id: forward.channel.to_string_prefixed(), + forward_src_port_id: forward.port.to_string(), origin_protocol_version: Self::VERSION.to_string(), }; diff --git a/dictionary.txt b/dictionary.txt index 753de01aa8..dc57aa09bc 100644 --- a/dictionary.txt +++ b/dictionary.txt @@ -222,7 +222,6 @@ UNBONDED UNBONDING UNNEST UUPS -Ucli Unbonding Uncons Undelegate @@ -1307,7 +1306,6 @@ typemap typenum typeof uatom -ucli ucosm ufgwwpg uints diff --git a/flake.nix b/flake.nix index 671ce76aed..9ed27ec90c 100644 --- a/flake.nix +++ b/flake.nix @@ -231,7 +231,6 @@ ./tools/rust-proto.nix ./tools/tools.nix ./tools/wasm-light-client.nix - ./tools/generate-rust-sol-bindings/generate-rust-sol-bindings.nix ./tools/libwasmvm/libwasmvm.nix ./tools/libblst/libblst.nix ./tools/tidy/tidy.nix @@ -252,7 +251,6 @@ ./e2e/e2e.nix ./devnet-compose/devnet-compose.nix ./drip/drip.nix - ./ucli/ucli.nix treefmt-nix.flakeModule ]; diff --git a/generated/rust/contracts/Cargo.toml b/generated/rust/contracts/Cargo.toml deleted file mode 100644 index 8e6dabf625..0000000000 --- a/generated/rust/contracts/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -edition = "2021" -name = "contracts" -version = "0.0.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -ethers = { workspace = true, features = ["abigen"] } -serde = { workspace = true, features = ["derive"] } -[features] -providers = ["ethers/providers"] diff --git a/generated/rust/contracts/src/cometbls_client.rs b/generated/rust/contracts/src/cometbls_client.rs deleted file mode 100644 index 7edd3560bc..0000000000 --- a/generated/rust/contracts/src/cometbls_client.rs +++ /dev/null @@ -1,3007 +0,0 @@ -pub use cometbls_client::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod cometbls_client { - pub use super::super::shared_types::*; - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { - inputs: ::std::vec![], - }), - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("UPGRADE_INTERFACE_VERSION"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("UPGRADE_INTERFACE_VERSION",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("createClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("createClient"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientStateBytes"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("consensusStateBytes",), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientStateCommitment",), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("update"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct ConsensusStateUpdate",), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ok"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getClientState"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getClientState"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getConsensusState"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getConsensusState"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("height"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getLatestHeight"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getLatestHeight"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getTimestampAtHeight"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getTimestampAtHeight",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("height"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("initialize"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("initialize"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_ibcHandler"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("admin"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("misbehavior"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("misbehavior"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("headerA"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ],), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct UnionIbcLightclientsCometblsV1Header.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("headerB"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ],), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct UnionIbcLightclientsCometblsV1Header.Data", - ), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("owner"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("owner"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("paused"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("paused"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("proxiableUUID"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("proxiableUUID"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("renounceOwnership"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("renounceOwnership"), - inputs: ::std::vec![], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("transferOwnership"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferOwnership"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("newOwner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("updateClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("updateClient"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientMessageBytes",), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint( - 64usize - ), - ::ethers::core::abi::ethabi::ParamType::Uint( - 64usize - ), - ], - ), - ],), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct ConsensusStateUpdate[]", - ), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("upgradeToAndCall"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("upgradeToAndCall"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("newImplementation"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("verifyMembership"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("verifyMembership"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("height"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delayPeriodTime"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delayPeriodBlocks"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("proof"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("prefix"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("path"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("verifyNonMembership"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("verifyNonMembership",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("height"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delayPeriodTime"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delayPeriodBlocks"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("proof"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("prefix"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("path"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("verifyZKP"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("verifyZKP"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("zkpBytes"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("chainId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("trustedValidatorsHash",), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("header"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct UnionIbcLightclientsCometblsV1LightHeader.Data", - ), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Initialized"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Initialized"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("OwnershipTransferred"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("OwnershipTransferred",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("previousOwner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("newOwner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Paused"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Paused"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Unpaused"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Unpaused"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Upgraded"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Upgraded"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("implementation"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - },], - anonymous: false, - },], - ), - ]), - errors: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("AddressEmptyCode"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("AddressEmptyCode"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("target"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC1967InvalidImplementation"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC1967InvalidImplementation",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("implementation"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC1967NonPayable"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC1967NonPayable"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("EnforcedPause"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("EnforcedPause"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrClientFrozen"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrClientFrozen"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrDelayPeriodNotExpired"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrDelayPeriodNotExpired",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrHeaderExpired"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrHeaderExpired"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidMisbehavior"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidMisbehavior",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidMisbehaviorHeadersSequence"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned( - "ErrInvalidMisbehaviorHeadersSequence", - ), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidUntrustedValidatorsHash"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidUntrustedValidatorsHash",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidZKP"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidZKP"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrMaxClockDriftExceeded"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrMaxClockDriftExceeded",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrNotIBC"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrNotIBC"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrTrustedConsensusStateNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrTrustedConsensusStateNotFound",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrUntrustedHeightLTETrustedHeight"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned( - "ErrUntrustedHeightLTETrustedHeight", - ), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrUntrustedTimestampLTETrustedTimestamp"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned( - "ErrUntrustedTimestampLTETrustedTimestamp", - ), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ExpectedPause"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ExpectedPause"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("FailedInnerCall"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("FailedInnerCall"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("InvalidInitialization"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("InvalidInitialization",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("NotInitializing"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("NotInitializing"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("OwnableInvalidOwner"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("OwnableInvalidOwner",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("OwnableUnauthorizedAccount"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("OwnableUnauthorizedAccount",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("UUPSUnauthorizedCallContext"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("UUPSUnauthorizedCallContext",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("UUPSUnsupportedProxiableUUID"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("UUPSUnsupportedProxiableUUID",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("slot"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - },], - ), - ]), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static COMETBLSCLIENT_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __BYTECODE: &[u8] = b"`\xA0\x80`@R4b\0\0\xD1W0`\x80R\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0\x90\x81T\x90`\xFF\x82`@\x1C\x16b\0\0\xC2WP`\x01`\x01`@\x1B\x03`\x02`\x01`@\x1B\x03\x19\x82\x82\x16\x01b\0\0|W[`@QaK\xCD\x90\x81b\0\0\xD7\x829`\x80Q\x81\x81\x81a\t\x93\x01Ra\x0B\x86\x01R\xF3[`\x01`\x01`@\x1B\x03\x19\x90\x91\x16\x81\x17\x90\x91U`@Q\x90\x81R\x7F\xC7\xF5\x05\xB2\xF3q\xAE!u\xEEI\x13\xF4I\x9E\x1F&3\xA7\xB5\x93c!\xEE\xD1\xCD\xAE\xB6\x11Q\x81\xD2\x90` \x90\xA18\x80\x80b\0\0\\V[c\xF9.\xE8\xA9`\xE0\x1B\x81R`\x04\x90\xFD[`\0\x80\xFD\xFE`\x80`@R`\x046\x10\x15a\0\x12W`\0\x80\xFD[`\x005`\xE0\x1C\x80c!\xC9\x0B\x05\x14a\x017W\x80c&)ck\x14a\x012W\x80c2\x96\x81\xD0\x14a\x01-W\x80cH\\\xC9U\x14a\x01(W\x80cK\x0B\xBD\xC4\x14a\x01#W\x80cO\x1E\xF2\x86\x14a\x01\x1EW\x80cR\xD1\x90-\x14a\x01\x19W\x80c\\\x97Z\xBB\x14a\x01\x14W\x80ca\xCEK\x12\x14a\x01\x0FW\x80cl\xF4K\xF4\x14a\x01\nW\x80co\xBF\x80y\x14a\x01\x05W\x80cqP\x18\xA6\x14a\x01\0W\x80cv\xC8\x1CB\x14a\0\xFBW\x80c\x8D\xA5\xCB[\x14a\0\xF6W\x80c\x99\x9F\xBB\xB3\x14a\0\xF1W\x80c\xAD<\xB1\xCC\x14a\0\xECW\x80c\xF2\xFD\xE3\x8B\x14a\0\xE7Wc\xF9\xBBZQ\x14a\0\xE2W`\0\x80\xFD[a\x15'V[a\x14\xE0V[a\x14dV[a\x13\x82V[a\x12\xE5V[a\x12\xBBV[a\x11\xF9V[a\x0E\xD7V[a\x0E\x1BV[a\r\x19V[a\x0B\xD6V[a\x0B@V[a\t'V[a\x07\rV[a\x04MV[a\x03\xA8V[a\x02wV[a\x01}V[\x91\x81`\x1F\x84\x01\x12\x15a\x01jW\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x01jW` \x83\x81\x86\x01\x95\x01\x01\x11a\x01jWV[`\0\x80\xFD[\x90\x81`\x80\x91\x03\x12a\x01jW\x90V[4a\x01jW``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01jWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x01jWa\x01\xCD\x906\x90`\x04\x01a\x01#\xA9f.\xFC\x9C\"\x9Cj\0T\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xFF\x84`@\x1C\x16\x15\x93\x16\x80\x15\x90\x81a\x06ZW[`\x01\x14\x90\x81a\x06PW[\x15\x90\x81a\x06GW[Pa\x06\x1DWa\x05@\x91\x83a\x057\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0`\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\x82T\x16\x17\x90UV[a\x05\xC1Wa\x1EGV[a\x05FW\0[a\x05\x92\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81T\x16\x90UV[`@Q`\x01\x81R\x7F\xC7\xF5\x05\xB2\xF3q\xAE!u\xEEI\x13\xF4I\x9E\x1F&3\xA7\xB5\x93c!\xEE\xD1\xCD\xAE\xB6\x11Q\x81\xD2\x90` \x90\xA1\0[a\x06\x18\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0h\x01\0\0\0\0\0\0\0\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82T\x16\x17\x90UV[a\x1EGV[`\x04`@Q\x7F\xF9.\xE8\xA9\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x158a\x04\xDEV[0;\x15\x91Pa\x04\xD6V[\x84\x91Pa\x04\xCCV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC`@\x91\x01\x12a\x01jW`$\x90V[``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x82\x01\x12a\x01jW`\x045\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x01jW`@a\x06\xFE\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x95`\x04\x01a\x01 v\xCC75\xA9 \xA3\xCAP]8+\xBC\x83\x03a\n\x85Wa\x02I\x92Pa3\xD4V[`@Q\x7F\xAA\x1DI\xA4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x81\x01\x84\x90R`$\x90\xFD[a\n\xDA\x91\x94P` =` \x11a\n\xE1W[a\n\xD2\x81\x83a\x08*V[\x81\x01\x90a'#V[\x928a\n\x07V[P=a\n\xC8V[`\x04`@Q\x7F\xE0|\x8D\xBA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x83\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBCT\x16\x14\x158a\t\xBEV[4a\x01jW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01jWs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x160\x03a\n\xE8W` `@Q\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x81R\xF3[4a\x01jW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01jW` `\xFF\x7F\xCD^\xD1\\n\x18~w\xE9\xAE\xE8\x81\x84\xC2\x1FO!\x82\xABX'\xCB;~\x07\xFB\xED\xCDc\xF03\0T\x16`@Q\x90\x15\x15\x81R\xF3[\x80`\x07\x0B\x03a\x01jWV[5\x90a\x02u\x82a\x0C6V[\x91\x90\x82`@\x91\x03\x12a\x01jW`@Qa\x0Cd\x81a\x07\xD1V[` \x80\x82\x94\x805a\x0Ct\x81a\x0C6V[\x84R\x015\x91a\x0C\x82\x83a\x0C6V[\x01RV[\x91\x90\x91`\xC0\x81\x84\x03\x12a\x01jWa\x0C\x9Ba\x08kV[\x92a\x0C\xA5\x82a\x0CAV[\x84Ra\x0C\xB4\x81` \x84\x01a\x0CLV[` \x85\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF``\x83\x015\x81\x81\x11a\x01jW\x82a\x0C\xDA\x91\x85\x01a\t\tV[`@\x86\x01R`\x80\x83\x015\x81\x81\x11a\x01jW\x82a\x0C\xF7\x91\x85\x01a\t\tV[``\x86\x01R`\xA0\x83\x015\x90\x81\x11a\x01jWa\r\x12\x92\x01a\t\tV[`\x80\x83\x01RV[4a\x01jW`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01jWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x01jWa\ri\x906\x90`\x04\x01a\x01a\x1D\xCD\x9F\x9Ea\x1D\xC8\x9Fa\x16\x1EV[a\x18\xBAV[6\x90a\x1B\tV[\x91a\x1D\x83\x8Da\x1D~\x85a\x1D]\x85\x8Aa\x167V[\x90o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0R` R`@`\0 \x90V[a\x1B?V[a\x1D\x8CBa\x1B\xC8V[\x94a\x1D\x95a\x08\x8BV[\x95\x86RC` \x87\x01Ra\x16PV[\x90` `\x01\x91\x80Q\x84U\x01Q\x91\x01UV[6\x90a\x1B\xF9V[a'\x07V[\x936\x90a\x1C\x8EV[a'\x1AV[\x93a\x1D\xD6a\x08\x8BV[\x94\x85R6\x90a\x1B\tV[` \x84\x01R\x91\x90`\x01\x90V[\x96P\x94`\0\x94P\x92PPPV[\x97PPPPPPP`\0\x91\x90`\0\x90V[Pa\x1E\x17a\x0F\xC3\x88a\x17 V[\x15a\x1C\xF3V[\x90`@Qa\x1E*\x81a\x07\xD1V[` \x81\x93Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x81\x16\x84R`@\x1C\x16\x91\x01RV[a\x1Eps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92a\x1Eha3{V[a\x15\"a3{V[\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0T\x16\x17`\0UV[`@\x80\x92\x827\x01\x90V[` \x03\x90` \x82\x11a\x1B\xE1WV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x01\x91\x82\x11a\x1B\xE1WV[\x90a\x1E\xEB\x82a\x08\x98V[a\x1E\xF8`@Q\x91\x82a\x08*V[\x82\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a\x1F&\x82\x94a\x08\x98V[\x01\x90` 6\x91\x017V[` \x81Q\x91\x01Q\x90` \x81\x10a\x1FDWP\x90V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90` \x03`\x03\x1B\x1B\x16\x90V[\x90a\x1F\x84` \x92\x82\x81Q\x94\x85\x92\x01a\r\xB5V[\x01\x90V[`@Q=`\0\x82>=\x90\xFD[\x90\x92\x91a\x1F\xCB`\0a \xD3a \xBB\x95a \xC7a\x01\0\x87\x01\x95\x86`@Q\x99\x8A\x92a \x1Fa \x1Aa \x02` \x9E\x8F\x9C\x8D\x97\x88\x83\x01a\x1E\x9CV[\x03\x96a\x1F\xFD\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x98\x89\x81\x01\x83R\x82a\x08*V[a'MV[\x9Ea \x15a \x10\x82Qa\x1E\xA6V[a\x1E\xE1V[a(\xF1V[a\x1F0V[\x95a 4a .\x82Q`\x07\x0B\x90V[`\x07\x0B\x90V[\x90\x84\x81\x01Qa Wa .\x87a Na .\x85Q`\x07\x0B\x90V[\x93\x01Q`\x07\x0B\x90V[a d`@\x84\x01Qa\x1F0V[\x91a \x7F`\x80a w``\x87\x01Qa\x1F0V[\x95\x01Qa\x1F0V[`@\x80Q\x99\x8A\x01\x9C\x8DR` \x8D\x01\x96\x90\x96R\x94\x8B\x01R``\x8A\x01R`\x80\x89\x01R`\xA0\x88\x01R`\xC0\x87\x01R`\xE0\x86\x01R\x90\x93\x84\x91a\x01\0\x90\x91\x01\x90V[\x03\x90\x81\x01\x83R\x82a\x08*V[`@Q\x91\x82\x80\x92a\x1FqV[\x03\x90`\x02Z\xFA\x15a! Wa\t$\x93~\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\0Q\x16\x93a!\x0Fa\x08\x8BV[\x94\x85R\x84\x01Ra\x01@\x82\x01\x91a)\x88V[a\x1F\x88V[\x90`@Qa!2\x81a\x08\x0EV[`@`\x02\x82\x94g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81T\x16\x84R`\x01\x81\x01T` \x85\x01R\x01T\x91\x01RV[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFA\x816\x03\x01\x82\x12\x15a\x01jW\x01\x90V[`@Q\x90a!\x97\x82a\x07\xD1V[`\x01\x82R\x81`\0[` \x90\x81\x81\x10\x15a!\xC1W` \x91a!\xB5a\x16\xFFV[\x90\x82\x85\x01\x01R\x01a!\x9FV[PPPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[\x80Q\x15a\"\x02W` \x01\x90V[a!\xC6V[\x90`@Q\x91\x82`\0\x82Ta\"\x1A\x81a\x17{V[\x90\x81\x84R` \x94`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a\"\x88WP`\x01\x14a\"IW[PPPa\x02u\x92P\x03\x83a\x08*V[`\0\x90\x81R\x85\x81 \x95\x93P\x91\x90[\x81\x83\x10a\"pWPPa\x02u\x93P\x82\x01\x018\x80\x80a\":V[\x85T\x88\x84\x01\x85\x01R\x94\x85\x01\x94\x87\x94P\x91\x83\x01\x91a\"WV[\x91PPa\x02u\x95\x93P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x91P\x16\x82\x84\x01R\x15\x15`\x05\x1B\x82\x01\x018\x80\x80a\":V[\x90`@Qa\"\xD6\x81a\x07\xF2V[`\xA0a\x17\x1B`\x03\x83\x95a\"\xE8\x81a\"\x07V[\x85R`\x01\x81\x01Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x81\x16` \x88\x01R\x81\x81`@\x1C\x16`@\x88\x01R`\x80\x1C\x16``\x86\x01Ra#!`\x02\x82\x01a\x1E\x1DV[`\x80\x86\x01R\x01a\x1E\x1DV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x91\x16\x90\x81\x15a#\xBEW\x7F\x90\x16\xD0\x9Dr\xD4\x0F\xDA\xE2\xFD\x8C\xEA\xC6\xB6#Lw\x06!O\xD3\x9C\x1C\xD1\xE6\t\xA0R\x8C\x19\x93\0\x80T\x90\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x16\x17\x90U\x16\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0`\0\x80\xA3V[`$`@Q\x7F\x1EO\xBD\xF7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R\xFD[\x905\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x826\x03\x01\x81\x12\x15a\x01jW\x01` \x815\x91\x01\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x01jW\x816\x03\x83\x13a\x01jWV[`\x1F\x82` \x94\x93\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x81\x86R\x86\x86\x017`\0\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x90V[\x90`\xC0a\t$\x92` \x81R\x825a$\x94\x81a\x0C6V[`\x07\x0B` \x82\x01R` \x83\x015a$\xAA\x81a\x0C6V[`\x07\x0B`@\x82\x01R`@\x83\x015a$\xC0\x81a\x0C6V[`\x07\x0B``\x82\x01Ra$\xE8a$\xD8``\x85\x01\x85a#\xEFV[\x84`\x80\x85\x01R`\xE0\x84\x01\x91a$?V[\x90a%9a%.a$\xFC`\x80\x87\x01\x87a#\xEFV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x95\x91\x86\x86\x84\x03\x01`\xA0\x87\x01Ra$?V[\x94`\xA0\x81\x01\x90a#\xEFV[\x93\x90\x92\x82\x86\x03\x01\x91\x01Ra$?V[\x91` \x84\x01\x91a%X6\x84a\x1B\tV[\x90a%ta\x0Fk` \x89\x01\x93a%n6\x86a\x1B\tV[\x90a2\xEBV[a&\x92Wa%\xDBa%\xD1\x84a%\xC7a%\xE9\x96a%\xC0a%\xB3\x87a%\xAD\x8Ca\x07x\x8Fa%\xA5a%\xE3\x9Da\x07N\x92a\x167V[\x926\x90a\x1B\tV[\x9Ca\x167V[a\x07xa\x07N6\x8Ba\x1B\tV[\x99\x8Ba,\xCFV[P\x98\x90P\x8Aa,\xCFV[P\x956\x91Pa\x1B\tV[\x916\x90a\x1B\tV[\x90a3CV[\x15a&uWPP\x80a%\xFA\x91a!WV[a&L`@Q\x91\x82a&\x10` \x82\x01\x92\x83a$~V[\x03\x92a&B\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x94\x85\x81\x01\x83R\x82a\x08*V[Q\x90 \x92\x80a!WV[\x90a&c`@Q\x91\x82a \xBB` \x82\x01\x95\x86a$~V[Q\x90 \x03a&pW`\0\x90V[`\x01\x90V[\x91P\x91Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x91\x16\x91\x16\x11\x15a&pW`\0\x90V[`\x04`@Q\x7F\xCE\x01\x1F\x04\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\0T\x163\x03a&\xDDWV[`\x04`@Q\x7F\xE5O\x8F\x9D\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[a'\x10\x90a0XV[` \x81Q\x91\x01 \x90V[a'\x10\x90a,\x07V[\x90\x81` \x91\x03\x12a\x01jWQ\x90V[\x90`\x01\x82\x01\x80\x92\x11a\x1B\xE1WV[\x91\x90\x82\x01\x80\x92\x11a\x1B\xE1WV[a(\xECa\t$\x91a(\x97a(\xC3a(\x7F`@Q\x93a'j\x85a\x07\xF2V[`\x88\x85R\x7F\x1F319(\x1E\x10\x0F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\` \x86\x01R\x7F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\x80`@\x87\x01R\x80``\x87\x01R`\x80\x86\x01R\x7F\\\\\\\\\\\\\\\\\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\xA0\x86\x01R`@Qa'\xF8\x81a\x07\xF2V[`\x88\x81R\x7FuY[SBtze666666666666666666666666` \x82\x01R\x7F66666666666666666666666666666666\x80`@\x83\x01R\x80``\x83\x01R`\x80\x82\x01R\x7F66666666\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\xA0\x82\x01Ra(\xF1V[` \x81Q\x91\x01 `@Q\x92\x83\x91` \x83\x01\x95\x86a4\xEEV[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x83R\x82a\x08*V[Q\x90 \x7F0dNr\xE11\xA0)\xB8PE\xB6\x81\x81X](3\xE8Hy\xB9p\x91C\xE1\xF5\x93\xF0\0\0\0\x90\x06\x90V[a'2V[`@Q\x81Q\x80\x82R\x90\x92\x90\x83\x01\x91` \x83\x81\x01\x92\x81\x83\x01\x82\x80\x88\x01[\x86\x81\x10a)xWPPP\x80Q\x80\x94\x87Q\x82\x01\x88R\x95\x01\x94\x82\x80\x87\x01\x92\x01\x90[\x82\x81\x10a)iWPPPP\x91`?\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93Q\x01\x15\x01\x01\x16`@R\x90V[\x81Q\x81R\x90\x83\x01\x90\x83\x01a),V[\x82Q\x81R\x91\x81\x01\x91\x84\x91\x01a)\rV[\x92a)\x93\x90\x82a5\x0CV[\x93\x91\x92\x90\x92\x15a+\xFDWa)\xAA\x91a\x0Fk\x91a6kV[a+\xF5W\x7F)^L\x18\xD1\xE0G]\xE4T\x9B%Ga\x1D\x83\x01\xE1\xAF\xFF\x10G\xA6\xF5\xA2\x88\xC91J\xF0\xB9\xFC`@Q\x93a\x01\0\x80\x91\x867\x84\x01R\x7F\x05\xD4\x03\xC8\xC9\x18 \xA3\x85\xA7,\x18\xD6\xA4\x96,\xEFA\xA3\xAB\x93\xDA\xA7\xED(\x9B\x1E\x95\xDBM\x04\xEBa\x01 \x84\x01R\x7F\x15OhrS\xB9#t#\xB5\xED\xB7\xC5\x98\x10\xE6\xE2\xFE4\xD5\xF5\xC2\xF1\xF3\x9F\xC2w\xDA7\xA9\xB2Ba\x01@\x84\x01R\x7F\x05\xDA\xA6\xA3\xB3\x8B\xA0i*\xEE?q\x80?\xF1\x0E\xDFP\xEA:\xD5;\x85F-\x97ta\x93\xD3\x1B\x07a\x01`\x84\x01R\x7F\tg\x07)\x01\xCCz\xB63W\xF1\xDD\xC4\x19l|\x1F\xED\xA5\x05@\xD8\x02m\x7Fo\x01g\xC1\x18\xA8\x99a\x01\x80\x84\x01R\x7F\x08\xC7\xCEz5vqy\x05XA\x8B\xB9\x81\x81\xCF\x90:&]\x1E\xEA\xC1i\x80\x80t3\x9D\r\x81\xFFa\x01\xA0\x84\x01R\x7F\x195_\xD2p\xB7`\x1D]\x88@\x8B~\x9ES\xD2`Q.!\x80\xCD&\0\x17\xDC\x94\x1F/\xC9mea\x01\xC0\x84\x01R\x7F\x15?\x03D\xC6\xBF-\x8A\x89\x1B\x97\x9B\xC6\x1D9\xA9\x8F\xB1\x11U\xFC\xD5t\x18\xF3\x0E\xA0\x18\xEA\x84(ta\x01\xE0\x84\x01R\x7F\"\xD5\xE4<\xDA\xFCb\xF4h\xE0\xBA\x86\xD9l\x82V\xBD\xA1\xA85\x1D\x06\x11^E\xBC\x1Eb\xC4\t\xA2va\x02\0\x84\x01R\x7F'\xD2\x8Ff\x02\xBF9\"\x91\xAC\xE1\xD7 \x12\xAE\xF5V\xA1\x9A\x850\x02'\xDC\xB7hp\x81\xF4\xA8f\xA1a\x02 \x84\x01Ra\x02@\x83\x01Ra\x02`\x82\x01R\x7F \xE7k\xE9\x1A1H\xE2\xF8\xEFdB\"\xB3\xCE[\x93\x9As\xBD.\n@\x81O\x7F\x92\xA7\x9CH:\xCFa\x02\x80\x82\x01R\x7F\"\x16\xBB\xE0\xC2\x89\xE0y6\xB4\xD9e;\x91R\x1A$\xC5p\xC8\x08\xFAF\xDF\xD1.\xC4B\x9Eq\xB6\x19a\x02\xA0\x82\x01R\x7F/\xEFM`\xE8`\xC4\xF0%\xC7\xDA\xE1ZT\xCD\xC2>\xCFa\x92\xC6\xCC\xAF\x8FNi\x8CS\xD8&\x05qa\x02\xC0\x82\x01R\x7F'.ku\xBB\xED:\x7F\xDF<\x9F\x19\xC8\xDF\xE85\xEA7\x94\x96\xC3\xEE\x7F\x91\\\xBB\x99%l\xF6\xAF:a\x02\xE0\x82\x01R` \x81a\x03\0\x81`\x08Z\xFA\x90Q\x16\x90V[PPP`\0\x90V[PPPPP`\0\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82Q\x16\x91`@` \x82\x01Q\x91\x01Q\x90`@Q\x93` \x85\x01R`@\x84\x01R``\x83\x01R``\x82R`\x80\x82\x01\x90\x82\x82\x10\x90\x82\x11\x17a\x07\xEDW`@R\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82Q\x16\x15\x91\x82a,fWPP\x90V[` \x01Q\x16\x15\x91\x90PV[5a\t$\x81a\x0C6V[\x90c;\x9A\xCA\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x93\x16\x02\x91\x82\x16\x91\x82\x03a\x1B\xE1WV[\x90`\x01g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x93\x16\x01\x91\x82\x11a\x1B\xE1WV[\x91\x90\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x80\x94\x16\x91\x16\x01\x91\x82\x11a\x1B\xE1WV[\x92\x91\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84a,\xEF\x83Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x16\x91\x82\x15a/PWa-\x0Ca\x0F\xC3a-\x07\x84\x80a!WV[a,qV[\x93`@\x93a-\x1B\x85\x85\x01a\x17 V[\x92\x88\x87\x16\x91\x89\x85\x16\x83\x11\x15a/'Wa-da-Ma-Ha\x0F\xC3` a-B\x8B\x80a!WV[\x01a,qV[a,{V[a-^a\x0F\xC3\x8Aa-B\x8B\x80a!WV[\x90a,\xB3V[\x99\x80\x8B\x16\x91\x82\x11\x15a.\xFEWa-|a\x0F\xC3Ba\x1B\xC8V[\x90\x8B\x81a-\x91`\x01\x89\x01T\x92\x82\x84\x16\x90a,\xB3V[\x16\x82\x84\x16\x11a.\xD5W\x91a\x0F\xC3\x91a-\xAD\x93`\x80\x1C\x16\x90a,\xB3V[\x11\x15a.\xACWa\x0F\xC3`\x02a-\xC4\x92\x01T\x94a,\x9AV[\x14a.:W[\x91a\x0Fk\x91a.\x05\x93a-\xFFa-\xF7a-\xF1a-\xE9``\x87\x01\x87a\x17*V[P\x95\x80a!WV[\x92a\"\x07V[\x916\x90a\x0C\x86V[\x92a\x1F\x94V[a.\x11WP\x91\x90`\0\x90V[`\x04\x90Q\x7F9m\xF4\xEC\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[a.[a.Ta.J\x85\x80a!WV[``\x81\x01\x90a\x17*V[6\x91a\x08\xD2V[` \x81Q\x91\x01 \x84Q` \x81\x01\x90a.{\x81a(\x97\x87\x85` \x91\x81R\x01\x90V[Q\x90 \x14a-\xCAW`\x04\x84Q\x7F\x89\\\xF0\xCE\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04\x86Q\x7FL\xCC0<\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04\x8AQ\x7FlL\x87\xB6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04\x88Q\x7F\x14\xA2\x86\xE4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04\x87Q\x7F\xF9{\t\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\t\x12\x8D\xC8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[` \x81Q\x10a/\x8AW` \x01Q\x90V[`d`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x15`$\x82\x01R\x7FtoBytes32_outOfBounds\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\x90\x16\xD0\x9Dr\xD4\x0F\xDA\xE2\xFD\x8C\xEA\xC6\xB6#Lw\x06!O\xD3\x9C\x1C\xD1\xE6\t\xA0R\x8C\x19\x93\0T\x163\x03a0(WV[`$`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R\xFD[a\t$a0\xAB\x91\x80Q\x90a(\x97g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa0\xDC\x81` \x85\x01Q\x16\x93\x82`@\x82\x01Q\x16\x92``\x82\x01Q\x16`\xA0`\x80\x83\x01Q\x92\x01Q\x93`@Q\x99\x8A\x98a\x01\0` \x8B\x01Ra\x01 \x8A\x01\x90a\r\xD8V[\x96`@\x89\x01R``\x88\x01R`\x80\x87\x01R`\xA0\x86\x01\x90` \x90\x81g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x81Q\x16\x85R\x01Q\x16\x91\x01RV[\x80Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x16`\xE0\x86\x01R` \x90\x91\x01Q\x16a\x01\0\x84\x01RV[\x91\x93\x92\x90a1\x1Ca1\x0F\x82\x85a\x167V[a\x07xa\x07N6\x89a\x1B\tV[\x94g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84a1:\x88Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x16\x15a/PWa\x07Na%\xA5a1S\x94a\x07x\x93a\x16PV[\x90a1`a\x0F\xC3Ba\x1B\xC8V[\x83\x80a1}\x84a1x\x87Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[a,\xB3V[\x93\x16\x15\x15\x92\x83a1\xFAW[PPPa1\xC1Wa1\xA9\x83a1x`\x01\x85\x94\x01Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x92\x16\x15\x15\x91\x82a1\xEBW[PPa1\xC1W`\x01\x01T\x90V[`\x04`@Q\x7FT\xE4\xC1Y\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x81\x92P\x16\x90C\x16\x108\x80a1\xB4V[\x81\x16\x91\x16\x10\x90P8\x83\x81a1\x88V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x816\x03\x01\x82\x12\x15a\x01jW\x01\x90V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`!`\x04R`$`\0\xFD[\x815\x95\x94\x93\x92\x916\x81\x90\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA1\x01\x87\x12\x15a\x01jWa2\xB7\x96a2\xB0` \x83\x01\x83a2\tV[\x91\x01a7\xD2V[`\x12\x81\x10\x15a2\xC4W\x15\x90V[a2#\xA9f.\xFC\x9C\"\x9Cj\0T`@\x1C\x16\x15a3\xAAWV[`\x04`@Q\x7F\xD7\xE6\xBC\xF8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90\x81;\x15a4\xA7Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82T\x16\x17\x90U\x7F\xBC|\xD7Z \xEE'\xFD\x9A\xDE\xBA\xB3 A\xF7U!M\xBCk\xFF\xA9\x0C\xC0\"[9\xDA.\\-;`\0\x80\xA2\x80Q\x15a4tWa4q\x91a;\xFCV[PV[PP4a4}WV[`\x04`@Q\x7F\xB3\x98\x97\x9F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`$\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x7FL\x9C\x8C\xE3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x16`\x04\x82\x01R\xFD[` \x92\x91\x90a5\x04\x84\x92\x82\x81Q\x94\x85\x92\x01a\r\xB5V[\x01\x90\x81R\x01\x90V[\x90\x91`\x01`@\x80Q\x94\x81\x86\x01\x7F'\x18C\xE5'C\x86OK\xB6|\xE9J,\xE8\xFE\x82\xC8\xF6\x10B\xC4\xC1\xCE\xD8S\x1D\x940S\x92\x81\x87R\x82` \x88\x01\x96\x7F%3B\xC6\x9C\xF8\xB1r\xF6$\xF0\xA1\xBB\x18\xCA\x8E\xA3{\x8AG\xDE\xCB\xD2z\xEA\x9F\xA8%s\xCB$\x06\x88R\x827\x82\x87`\x80\x81`\x06Z\xFA\x7F\x0B\r\xBEq\xF4\xD6\x0E\x02\xE9\x16\x0E\xC2\xB0\x15\xCA\xE3\xA0\x9C\xBEOCr&\xE2\xC0.\x1A^]\x12K\xCA\x82R\x83``\x89\x01\x92\x7F\x13\x0B\x9A\xEB\xD3v\x83\x88\xEC\xE5\x92\xAA\x16\xAF\xCA3\xFE\x9E\x9F\xE0=\xD8\x14ph_\xB9\xA8\xB6p\xE0\x0C\x84R` \x85Q\x95\x7F,\xF1\x05\x10E\x9D\xCF\xAE\x8Fy\xB5;\x83\xCB\x0F\x04\0V?\xB2\xDA\x11.\xBE\xEB\xB6\x13\x9Cj\xEE\xF1\xD9\x8C\x85`\x80\x82\x01\x99\x80\x8BR\x7F0dNr\xE11\xA0)\xB8PE\xB6\x81\x81X](3\xE8Hy\xB9p\x91C\xE1\xF5\x93\xF0\0\0\x01\x98\x89\x83\x89``\x81`\x07Z\xFA\x92\x10\x16\x16\x91`\x80\x81`\x06Z\xFA\x16\x96\x7F\x02\x9E\x93\xD5\xF4|\x0Cvq5\x03\x98\xED\x8C@\xF5\xBC\\/[\x006<~.\xB1\x8A\x91\xA1\xC4\x90\xC7\x85RR\x01Q\x80\x95R``\x81`\x07Z\xFA\x92\x10\x16\x16\x90\x85`\x80\x81`\x06Z\xFA\x16\x16\x92Q\x91Q\x90V[\x90`@\x90\x81\x80Q\x93\x847\x7F%}\xF6\xF8\x13,\xB0\x03\x7F}\xFD\xF1\xA2\x9B\x04\xC1\xFF\x92\xBA\x08.\xDAQ9\x96\xBA+\xFA\x9F\xBD\x19\x87\x82\x84\x01R\x7F\x13\xF0\xD8\xD8\x87\x98\x85\xCAV~\xF9\x92\x98\xC3\x0C9~o\xBAXFX\xF4\x12w\x13\xA8\x14\xC0m\xE5Z``\x84\x01R\x7F\x16`\xEB\xCC`\xC7\xA3\xACV\x0E\xFC\xEAY\x93\xF5(\xEE\x13h]:9iJ\xCDt\xFEg\xC8\ry\x8A`\x80\x84\x01R\x7F\x15\xE8\x06B\xC5\x8D\xB4\xDB\xE0\xA8\x7F\x92\xCEaC\x05V[``\x91aC\x05V[` \x81\x01a\xECW[PPPP\x81\x15\x94\x85\x80\x96a>\xE4W[a>\xD4W\x86\x15\x96\x87\x15\x91\x82a>\xBBW[PPa>\xACW\x84\x15\x92\x83a>\x94W[PPP\x90Pa>\x89W\x15a>\x19WPP\x91\x81\x83a>\x02a=\xF0a=\xFAa=\xF0a\x0Fk\x97a>\n\x99a2\tV[``\x81\x01\x90a<\xE2V[\x94\x90\x93a2\tV[\x93\x90PaF\xD2V[a>\x14W[`\0\x90V[`\x06\x90V[\x90\x92\x90\x15a>TWP\x91\x81\x83a>>a=\xF0a=\xFAa=\xF0a\x0Fk\x97a>F\x99a2\tV[\x93\x90PaF[V[a>OW`\0\x90V[`\x07\x90V[\x92a>\x7F\x93a>wa=\xF0a>oa=\xF0a\x0Fk\x97\x87a2\tV[\x93\x90\x95a2\tV[\x93\x90\x92aEIV[\x15a>\x0FW`\x08\x90V[PPPPPP`\x05\x90V[a>\xA1\x93P`\0\x94aD\x0FV[\x13\x15\x808\x80\x80a=\xC4V[PPPPPPPPPP`\x04\x90V[`\0\x92P\x90a>\xCB\x91\x86\x88aD\x0FV[\x12\x158\x80a=\xB5V[PPPPPPPPPPP`\x03\x90V[P\x86\x15a=\xA5V[a?)\x93a>\xFA\x83\x83a2\tV[\x93a?#a.Ta?\x19a?\x11a=K\x88\x88a2\tV[\x97\x90\x96a2\tV[` \x81\x01\x90a\x17*V[\x94aBcV[a?2\x81a7\xC8V[a??W8\x8A\x8A\x8Aa=\x96V[PPPPPPPPPP`\x02\x90V[a?_\x8B\x89\x8B\x84a>\xFA\x83\x83a2\tV[a?h\x81a7\xC8V[\x15a=~WPPPPPPPPPPP`\x01\x90V[`\x03\x11\x15a2\xC4WV[\x91\x90\x81\x10\x15a\"\x02W`\x05\x1B\x81\x015\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC1\x816\x03\x01\x82\x12\x15a\x01jW\x01\x90V[`@\x81\x01a?\xD5\x81\x83a\x17*V[\x90P\x15a@\x93Wa?\xE9a@\n\x91\x83a\x17*V[\x90a?\xF4\x84\x80a\x17*V[\x90a@\x02` \x87\x01\x87a\x17*V[\x94\x90\x93aG{V[\x91\x90\x91a@\x16\x81a?}V[a@\x89W``\x81\x01a@(\x81\x83a<\xE2V[\x91\x90P`\0\x92[\x82\x84\x10a@@WPPPP\x90`\0\x90V[\x90\x91\x92\x93a@a\x90a@\\\x86a@V\x86\x86a<\xE2V[\x90a?\x87V[aH*V[\x94\x90\x94a@m\x81a?}V[a@|W`\x01\x01\x92\x91\x90a@/V[PPPPP`\0\x90`\x03\x90V[PP`\0\x90`\x02\x90V[PP`\0\x90`\x01\x90V[a@\xA5a<\x99V[P`@Qa@\xB2\x81a\x08\x0EV[` \x81R`\x01` \x82\x01R`\x01`@\x82\x01R\x90V[\x93\x91a@\xEC\x90\x93\x91\x93a@\xDDa.T\x87\x80a\x17*V[` \x81Q\x91\x01 \x926\x91a\x08\xD2V[` \x81Q\x91\x01 \x03aACWaA\x08a.T` \x85\x01\x85a\x17*V[` \x81Q\x91\x01 \x90` \x81Q\x91\x01 \x03aAOW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`P`$\x82\x01R\x7FverifyChainedMembership: non exh`D\x82\x01R\x7Faustive pattern matching on Veri`d\x82\x01R\x7FfyExistenceError\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\x84\x82\x01R`\xA4\x90\xFD[\x93\x90\x92aBz\x90\x95\x92\x95a@\xDDa.T\x87\x80a\x17*V[` \x81Q\x91\x01 \x03aB\xFCWaB\x96a.T` \x85\x01\x85a\x17*V[` \x81Q\x91\x01 \x90` \x81Q\x91\x01 \x03aB\xF4WaB\xB4\x90\x82aH\xA3V[aB\xBD\x81a7\xBEV[aB\xEDWaB\xCA\x90a?\xC7V[aB\xD3\x81a7\xBEV[aB\xE6W\x03aB\xE1W`\0\x90V[`\x05\x90V[PP`\x04\x90V[PP`\x03\x90V[PPP`\x02\x90V[PPPP`\x01\x90V[\x90aCDWP\x80Q\x15aC\x1AW\x80Q\x90` \x01\xFD[`\x04`@Q\x7F\x14%\xEAB\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x81Q\x15\x80aC\x9CW[aCUWP\x90V[`$\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x7F\x99\x96\xB3\x15\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x16`\x04\x82\x01R\xFD[P\x80;\x15aCMV[aC\xAF\x81\x80a\x17*V[\x90PaC\xF4WaC\xC2` \x82\x01\x82a\x17*V[\x90PaC\xF4WaC\xD5`@\x82\x01\x82a\x17*V[\x90PaC\xF4W\x80``aC\xE9\x92\x01\x90a<\xE2V[\x90Pa>\x0FW`\x01\x90V[P`\0\x90V[\x90\x15a\"\x02W\x90V[\x90\x82\x10\x15a\"\x02W\x01\x90V[\x92\x91\x90aD\x1C\x83\x82aI\xA7V[\x93\x84\x92`\0[\x84\x81\x10aDfWPPP\x11aD_W\x11aD;W`\0\x90V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90V[PP`\x01\x90V[\x90\x91\x92\x93PaD\x9FaDy\x82\x86\x86aD\x03V[5\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x90V[\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aD\xF6aD\xD1aDy\x85\x8A\x88aD\x03V[\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x90V[\x91\x16\x81\x81\x10\x15aE,WPPPPPPPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90V[\x11aE>W`\x01\x01\x90\x85\x93\x92\x91aD\"V[PPPPPP`\x01\x90V[\x92\x93\x90\x91aEV\x81a\x1E\xB4V[\x92aE`\x83a\x1E\xB4V[\x93[aEsa.Ta=K\x83\x86\x86a?\x87V[\x80Q` \x80\x92\x01 aE\x8Ca.Ta=K\x89\x89\x8Da?\x87V[\x82\x81Q\x91\x01 \x14\x90\x81aF\x1BW[PaF\x03WaE\xC2a\x0FkaE\xB0\x83\x86\x86a?\x87V[aE\xBB\x88\x88\x8Ca?\x87V[\x90\x89aI\xC3V[aE\xF7WaE\xD4\x92a\x0Fk\x92\x87aF[V[aE\xEEWaE\xE5\x93a\x0Fk\x93aF\xD2V[a>\x0FW`\x01\x90V[PPPP`\0\x90V[PPPPPPP`\0\x90V[aF\x0FaF\x15\x91a\x1E\xB4V[\x94a\x1E\xB4V[\x93aEbV[\x90PaF7a.TaF.\x84\x87\x87a?\x87V[\x83\x81\x01\x90a\x17*V[\x81\x81Q\x91\x01 \x90aFOa.TaF.\x89\x89\x8Da?\x87V[\x80Q\x91\x01 \x148aE\x9AV[\x91\x93\x92\x90\x82Q` \x84\x01Q\x81\x01\x93\x84\x82\x11a\x1B\xE1W`@\x81\x01Q\x82\x01\x80\x92\x11a\x1B\xE1WQ\x15\x93`\x01\x94`\x01\x17\x15a\x1B\xE1W`\0\x92`\0[\x85\x81\x10aF\xA6WP`\x01\x97PPPPPPPV[aF\xBB\x84\x84aF\xB6\x84\x8D\x87a?\x87V[aJ\x15V[\x15aF\xC7W\x86\x01aF\x92V[P\x92\x96PPPPPPV[\x91\x93\x92\x90\x82Q\x15\x92`\x01\x93`\x01\x17\x15a\x1B\xE1W` \x81\x01Q\x90`@\x81\x01Q\x90Q\x91`\0\x93`\0[\x86\x81\x10aG\x0EWP`\x01\x98PPPPPPPPV[aG$\x85\x85\x85aG\x1F\x85\x8F\x88a?\x87V[aJZV[\x15aG0W\x87\x01aF\xF9V[P\x93\x97PPPPPPPV[\x94` a5\x04\x94aGe\x85\x83\x9B\x9A\x98\x95\x99\x85\x97\x85\x9B\x827\x01\x91`\0\x83R\x82\x81Q\x94\x85\x92\x01a\r\xB5V[\x01\x91\x827\x01\x91`\0\x83R\x82\x81Q\x94\x85\x92\x01a\r\xB5V[\x94\x93\x90\x91\x92\x93\x84\x15aH\x1CW\x80\x15aH\x0EW`\0` \x91aG\x9Ea \x10\x88aJ\xBCV[\x93aG\xA9\x85\x89aJ\xDEV[PaG\xB9`@Q\x80\x93\x81\x93a\x16\x10V[\x03\x90`\x02Z\xFA\x15a! W` \x94a(\x97aG\xFC\x94a \xC7\x93`\0\x97\x88Q\x92aG\xE3a \x10aJ\x9FV[\x92aG\xED\x84aK\x1BV[P`@Q\x98\x89\x97\x8D\x89\x01aG#\xA9f.\xFC\x9C\"\x9Cj\0T\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xFF\x84`@\x1C\x16\x15\x93\x16\x80\x15\x90\x81a\x06ZW[`\x01\x14\x90\x81a\x06PW[\x15\x90\x81a\x06GW[Pa\x06\x1DWa\x05@\x91\x83a\x057\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0`\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\x82T\x16\x17\x90UV[a\x05\xC1Wa\x1EGV[a\x05FW\0[a\x05\x92\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81T\x16\x90UV[`@Q`\x01\x81R\x7F\xC7\xF5\x05\xB2\xF3q\xAE!u\xEEI\x13\xF4I\x9E\x1F&3\xA7\xB5\x93c!\xEE\xD1\xCD\xAE\xB6\x11Q\x81\xD2\x90` \x90\xA1\0[a\x06\x18\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0h\x01\0\0\0\0\0\0\0\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82T\x16\x17\x90UV[a\x1EGV[`\x04`@Q\x7F\xF9.\xE8\xA9\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x158a\x04\xDEV[0;\x15\x91Pa\x04\xD6V[\x84\x91Pa\x04\xCCV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC`@\x91\x01\x12a\x01jW`$\x90V[``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x82\x01\x12a\x01jW`\x045\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x01jW`@a\x06\xFE\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x95`\x04\x01a\x01 v\xCC75\xA9 \xA3\xCAP]8+\xBC\x83\x03a\n\x85Wa\x02I\x92Pa3\xD4V[`@Q\x7F\xAA\x1DI\xA4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x81\x01\x84\x90R`$\x90\xFD[a\n\xDA\x91\x94P` =` \x11a\n\xE1W[a\n\xD2\x81\x83a\x08*V[\x81\x01\x90a'#V[\x928a\n\x07V[P=a\n\xC8V[`\x04`@Q\x7F\xE0|\x8D\xBA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x83\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBCT\x16\x14\x158a\t\xBEV[4a\x01jW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01jWs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x160\x03a\n\xE8W` `@Q\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x81R\xF3[4a\x01jW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01jW` `\xFF\x7F\xCD^\xD1\\n\x18~w\xE9\xAE\xE8\x81\x84\xC2\x1FO!\x82\xABX'\xCB;~\x07\xFB\xED\xCDc\xF03\0T\x16`@Q\x90\x15\x15\x81R\xF3[\x80`\x07\x0B\x03a\x01jWV[5\x90a\x02u\x82a\x0C6V[\x91\x90\x82`@\x91\x03\x12a\x01jW`@Qa\x0Cd\x81a\x07\xD1V[` \x80\x82\x94\x805a\x0Ct\x81a\x0C6V[\x84R\x015\x91a\x0C\x82\x83a\x0C6V[\x01RV[\x91\x90\x91`\xC0\x81\x84\x03\x12a\x01jWa\x0C\x9Ba\x08kV[\x92a\x0C\xA5\x82a\x0CAV[\x84Ra\x0C\xB4\x81` \x84\x01a\x0CLV[` \x85\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF``\x83\x015\x81\x81\x11a\x01jW\x82a\x0C\xDA\x91\x85\x01a\t\tV[`@\x86\x01R`\x80\x83\x015\x81\x81\x11a\x01jW\x82a\x0C\xF7\x91\x85\x01a\t\tV[``\x86\x01R`\xA0\x83\x015\x90\x81\x11a\x01jWa\r\x12\x92\x01a\t\tV[`\x80\x83\x01RV[4a\x01jW`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01jWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x01jWa\ri\x906\x90`\x04\x01a\x01a\x1D\xCD\x9F\x9Ea\x1D\xC8\x9Fa\x16\x1EV[a\x18\xBAV[6\x90a\x1B\tV[\x91a\x1D\x83\x8Da\x1D~\x85a\x1D]\x85\x8Aa\x167V[\x90o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0R` R`@`\0 \x90V[a\x1B?V[a\x1D\x8CBa\x1B\xC8V[\x94a\x1D\x95a\x08\x8BV[\x95\x86RC` \x87\x01Ra\x16PV[\x90` `\x01\x91\x80Q\x84U\x01Q\x91\x01UV[6\x90a\x1B\xF9V[a'\x07V[\x936\x90a\x1C\x8EV[a'\x1AV[\x93a\x1D\xD6a\x08\x8BV[\x94\x85R6\x90a\x1B\tV[` \x84\x01R\x91\x90`\x01\x90V[\x96P\x94`\0\x94P\x92PPPV[\x97PPPPPPP`\0\x91\x90`\0\x90V[Pa\x1E\x17a\x0F\xC3\x88a\x17 V[\x15a\x1C\xF3V[\x90`@Qa\x1E*\x81a\x07\xD1V[` \x81\x93Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x81\x16\x84R`@\x1C\x16\x91\x01RV[a\x1Eps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92a\x1Eha3{V[a\x15\"a3{V[\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0T\x16\x17`\0UV[`@\x80\x92\x827\x01\x90V[` \x03\x90` \x82\x11a\x1B\xE1WV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x01\x91\x82\x11a\x1B\xE1WV[\x90a\x1E\xEB\x82a\x08\x98V[a\x1E\xF8`@Q\x91\x82a\x08*V[\x82\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a\x1F&\x82\x94a\x08\x98V[\x01\x90` 6\x91\x017V[` \x81Q\x91\x01Q\x90` \x81\x10a\x1FDWP\x90V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90` \x03`\x03\x1B\x1B\x16\x90V[\x90a\x1F\x84` \x92\x82\x81Q\x94\x85\x92\x01a\r\xB5V[\x01\x90V[`@Q=`\0\x82>=\x90\xFD[\x90\x92\x91a\x1F\xCB`\0a \xD3a \xBB\x95a \xC7a\x01\0\x87\x01\x95\x86`@Q\x99\x8A\x92a \x1Fa \x1Aa \x02` \x9E\x8F\x9C\x8D\x97\x88\x83\x01a\x1E\x9CV[\x03\x96a\x1F\xFD\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x98\x89\x81\x01\x83R\x82a\x08*V[a'MV[\x9Ea \x15a \x10\x82Qa\x1E\xA6V[a\x1E\xE1V[a(\xF1V[a\x1F0V[\x95a 4a .\x82Q`\x07\x0B\x90V[`\x07\x0B\x90V[\x90\x84\x81\x01Qa Wa .\x87a Na .\x85Q`\x07\x0B\x90V[\x93\x01Q`\x07\x0B\x90V[a d`@\x84\x01Qa\x1F0V[\x91a \x7F`\x80a w``\x87\x01Qa\x1F0V[\x95\x01Qa\x1F0V[`@\x80Q\x99\x8A\x01\x9C\x8DR` \x8D\x01\x96\x90\x96R\x94\x8B\x01R``\x8A\x01R`\x80\x89\x01R`\xA0\x88\x01R`\xC0\x87\x01R`\xE0\x86\x01R\x90\x93\x84\x91a\x01\0\x90\x91\x01\x90V[\x03\x90\x81\x01\x83R\x82a\x08*V[`@Q\x91\x82\x80\x92a\x1FqV[\x03\x90`\x02Z\xFA\x15a! Wa\t$\x93~\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\0Q\x16\x93a!\x0Fa\x08\x8BV[\x94\x85R\x84\x01Ra\x01@\x82\x01\x91a)\x88V[a\x1F\x88V[\x90`@Qa!2\x81a\x08\x0EV[`@`\x02\x82\x94g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81T\x16\x84R`\x01\x81\x01T` \x85\x01R\x01T\x91\x01RV[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFA\x816\x03\x01\x82\x12\x15a\x01jW\x01\x90V[`@Q\x90a!\x97\x82a\x07\xD1V[`\x01\x82R\x81`\0[` \x90\x81\x81\x10\x15a!\xC1W` \x91a!\xB5a\x16\xFFV[\x90\x82\x85\x01\x01R\x01a!\x9FV[PPPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[\x80Q\x15a\"\x02W` \x01\x90V[a!\xC6V[\x90`@Q\x91\x82`\0\x82Ta\"\x1A\x81a\x17{V[\x90\x81\x84R` \x94`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a\"\x88WP`\x01\x14a\"IW[PPPa\x02u\x92P\x03\x83a\x08*V[`\0\x90\x81R\x85\x81 \x95\x93P\x91\x90[\x81\x83\x10a\"pWPPa\x02u\x93P\x82\x01\x018\x80\x80a\":V[\x85T\x88\x84\x01\x85\x01R\x94\x85\x01\x94\x87\x94P\x91\x83\x01\x91a\"WV[\x91PPa\x02u\x95\x93P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x91P\x16\x82\x84\x01R\x15\x15`\x05\x1B\x82\x01\x018\x80\x80a\":V[\x90`@Qa\"\xD6\x81a\x07\xF2V[`\xA0a\x17\x1B`\x03\x83\x95a\"\xE8\x81a\"\x07V[\x85R`\x01\x81\x01Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x81\x16` \x88\x01R\x81\x81`@\x1C\x16`@\x88\x01R`\x80\x1C\x16``\x86\x01Ra#!`\x02\x82\x01a\x1E\x1DV[`\x80\x86\x01R\x01a\x1E\x1DV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x91\x16\x90\x81\x15a#\xBEW\x7F\x90\x16\xD0\x9Dr\xD4\x0F\xDA\xE2\xFD\x8C\xEA\xC6\xB6#Lw\x06!O\xD3\x9C\x1C\xD1\xE6\t\xA0R\x8C\x19\x93\0\x80T\x90\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x16\x17\x90U\x16\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0`\0\x80\xA3V[`$`@Q\x7F\x1EO\xBD\xF7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R\xFD[\x905\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x826\x03\x01\x81\x12\x15a\x01jW\x01` \x815\x91\x01\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x01jW\x816\x03\x83\x13a\x01jWV[`\x1F\x82` \x94\x93\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x81\x86R\x86\x86\x017`\0\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x90V[\x90`\xC0a\t$\x92` \x81R\x825a$\x94\x81a\x0C6V[`\x07\x0B` \x82\x01R` \x83\x015a$\xAA\x81a\x0C6V[`\x07\x0B`@\x82\x01R`@\x83\x015a$\xC0\x81a\x0C6V[`\x07\x0B``\x82\x01Ra$\xE8a$\xD8``\x85\x01\x85a#\xEFV[\x84`\x80\x85\x01R`\xE0\x84\x01\x91a$?V[\x90a%9a%.a$\xFC`\x80\x87\x01\x87a#\xEFV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x95\x91\x86\x86\x84\x03\x01`\xA0\x87\x01Ra$?V[\x94`\xA0\x81\x01\x90a#\xEFV[\x93\x90\x92\x82\x86\x03\x01\x91\x01Ra$?V[\x91` \x84\x01\x91a%X6\x84a\x1B\tV[\x90a%ta\x0Fk` \x89\x01\x93a%n6\x86a\x1B\tV[\x90a2\xEBV[a&\x92Wa%\xDBa%\xD1\x84a%\xC7a%\xE9\x96a%\xC0a%\xB3\x87a%\xAD\x8Ca\x07x\x8Fa%\xA5a%\xE3\x9Da\x07N\x92a\x167V[\x926\x90a\x1B\tV[\x9Ca\x167V[a\x07xa\x07N6\x8Ba\x1B\tV[\x99\x8Ba,\xCFV[P\x98\x90P\x8Aa,\xCFV[P\x956\x91Pa\x1B\tV[\x916\x90a\x1B\tV[\x90a3CV[\x15a&uWPP\x80a%\xFA\x91a!WV[a&L`@Q\x91\x82a&\x10` \x82\x01\x92\x83a$~V[\x03\x92a&B\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x94\x85\x81\x01\x83R\x82a\x08*V[Q\x90 \x92\x80a!WV[\x90a&c`@Q\x91\x82a \xBB` \x82\x01\x95\x86a$~V[Q\x90 \x03a&pW`\0\x90V[`\x01\x90V[\x91P\x91Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x91\x16\x91\x16\x11\x15a&pW`\0\x90V[`\x04`@Q\x7F\xCE\x01\x1F\x04\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\0T\x163\x03a&\xDDWV[`\x04`@Q\x7F\xE5O\x8F\x9D\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[a'\x10\x90a0XV[` \x81Q\x91\x01 \x90V[a'\x10\x90a,\x07V[\x90\x81` \x91\x03\x12a\x01jWQ\x90V[\x90`\x01\x82\x01\x80\x92\x11a\x1B\xE1WV[\x91\x90\x82\x01\x80\x92\x11a\x1B\xE1WV[a(\xECa\t$\x91a(\x97a(\xC3a(\x7F`@Q\x93a'j\x85a\x07\xF2V[`\x88\x85R\x7F\x1F319(\x1E\x10\x0F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\` \x86\x01R\x7F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\x80`@\x87\x01R\x80``\x87\x01R`\x80\x86\x01R\x7F\\\\\\\\\\\\\\\\\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\xA0\x86\x01R`@Qa'\xF8\x81a\x07\xF2V[`\x88\x81R\x7FuY[SBtze666666666666666666666666` \x82\x01R\x7F66666666666666666666666666666666\x80`@\x83\x01R\x80``\x83\x01R`\x80\x82\x01R\x7F66666666\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\xA0\x82\x01Ra(\xF1V[` \x81Q\x91\x01 `@Q\x92\x83\x91` \x83\x01\x95\x86a4\xEEV[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x83R\x82a\x08*V[Q\x90 \x7F0dNr\xE11\xA0)\xB8PE\xB6\x81\x81X](3\xE8Hy\xB9p\x91C\xE1\xF5\x93\xF0\0\0\0\x90\x06\x90V[a'2V[`@Q\x81Q\x80\x82R\x90\x92\x90\x83\x01\x91` \x83\x81\x01\x92\x81\x83\x01\x82\x80\x88\x01[\x86\x81\x10a)xWPPP\x80Q\x80\x94\x87Q\x82\x01\x88R\x95\x01\x94\x82\x80\x87\x01\x92\x01\x90[\x82\x81\x10a)iWPPPP\x91`?\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93Q\x01\x15\x01\x01\x16`@R\x90V[\x81Q\x81R\x90\x83\x01\x90\x83\x01a),V[\x82Q\x81R\x91\x81\x01\x91\x84\x91\x01a)\rV[\x92a)\x93\x90\x82a5\x0CV[\x93\x91\x92\x90\x92\x15a+\xFDWa)\xAA\x91a\x0Fk\x91a6kV[a+\xF5W\x7F)^L\x18\xD1\xE0G]\xE4T\x9B%Ga\x1D\x83\x01\xE1\xAF\xFF\x10G\xA6\xF5\xA2\x88\xC91J\xF0\xB9\xFC`@Q\x93a\x01\0\x80\x91\x867\x84\x01R\x7F\x05\xD4\x03\xC8\xC9\x18 \xA3\x85\xA7,\x18\xD6\xA4\x96,\xEFA\xA3\xAB\x93\xDA\xA7\xED(\x9B\x1E\x95\xDBM\x04\xEBa\x01 \x84\x01R\x7F\x15OhrS\xB9#t#\xB5\xED\xB7\xC5\x98\x10\xE6\xE2\xFE4\xD5\xF5\xC2\xF1\xF3\x9F\xC2w\xDA7\xA9\xB2Ba\x01@\x84\x01R\x7F\x05\xDA\xA6\xA3\xB3\x8B\xA0i*\xEE?q\x80?\xF1\x0E\xDFP\xEA:\xD5;\x85F-\x97ta\x93\xD3\x1B\x07a\x01`\x84\x01R\x7F\tg\x07)\x01\xCCz\xB63W\xF1\xDD\xC4\x19l|\x1F\xED\xA5\x05@\xD8\x02m\x7Fo\x01g\xC1\x18\xA8\x99a\x01\x80\x84\x01R\x7F\x08\xC7\xCEz5vqy\x05XA\x8B\xB9\x81\x81\xCF\x90:&]\x1E\xEA\xC1i\x80\x80t3\x9D\r\x81\xFFa\x01\xA0\x84\x01R\x7F\x195_\xD2p\xB7`\x1D]\x88@\x8B~\x9ES\xD2`Q.!\x80\xCD&\0\x17\xDC\x94\x1F/\xC9mea\x01\xC0\x84\x01R\x7F\x15?\x03D\xC6\xBF-\x8A\x89\x1B\x97\x9B\xC6\x1D9\xA9\x8F\xB1\x11U\xFC\xD5t\x18\xF3\x0E\xA0\x18\xEA\x84(ta\x01\xE0\x84\x01R\x7F\"\xD5\xE4<\xDA\xFCb\xF4h\xE0\xBA\x86\xD9l\x82V\xBD\xA1\xA85\x1D\x06\x11^E\xBC\x1Eb\xC4\t\xA2va\x02\0\x84\x01R\x7F'\xD2\x8Ff\x02\xBF9\"\x91\xAC\xE1\xD7 \x12\xAE\xF5V\xA1\x9A\x850\x02'\xDC\xB7hp\x81\xF4\xA8f\xA1a\x02 \x84\x01Ra\x02@\x83\x01Ra\x02`\x82\x01R\x7F \xE7k\xE9\x1A1H\xE2\xF8\xEFdB\"\xB3\xCE[\x93\x9As\xBD.\n@\x81O\x7F\x92\xA7\x9CH:\xCFa\x02\x80\x82\x01R\x7F\"\x16\xBB\xE0\xC2\x89\xE0y6\xB4\xD9e;\x91R\x1A$\xC5p\xC8\x08\xFAF\xDF\xD1.\xC4B\x9Eq\xB6\x19a\x02\xA0\x82\x01R\x7F/\xEFM`\xE8`\xC4\xF0%\xC7\xDA\xE1ZT\xCD\xC2>\xCFa\x92\xC6\xCC\xAF\x8FNi\x8CS\xD8&\x05qa\x02\xC0\x82\x01R\x7F'.ku\xBB\xED:\x7F\xDF<\x9F\x19\xC8\xDF\xE85\xEA7\x94\x96\xC3\xEE\x7F\x91\\\xBB\x99%l\xF6\xAF:a\x02\xE0\x82\x01R` \x81a\x03\0\x81`\x08Z\xFA\x90Q\x16\x90V[PPP`\0\x90V[PPPPP`\0\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82Q\x16\x91`@` \x82\x01Q\x91\x01Q\x90`@Q\x93` \x85\x01R`@\x84\x01R``\x83\x01R``\x82R`\x80\x82\x01\x90\x82\x82\x10\x90\x82\x11\x17a\x07\xEDW`@R\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82Q\x16\x15\x91\x82a,fWPP\x90V[` \x01Q\x16\x15\x91\x90PV[5a\t$\x81a\x0C6V[\x90c;\x9A\xCA\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x93\x16\x02\x91\x82\x16\x91\x82\x03a\x1B\xE1WV[\x90`\x01g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x93\x16\x01\x91\x82\x11a\x1B\xE1WV[\x91\x90\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x80\x94\x16\x91\x16\x01\x91\x82\x11a\x1B\xE1WV[\x92\x91\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84a,\xEF\x83Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x16\x91\x82\x15a/PWa-\x0Ca\x0F\xC3a-\x07\x84\x80a!WV[a,qV[\x93`@\x93a-\x1B\x85\x85\x01a\x17 V[\x92\x88\x87\x16\x91\x89\x85\x16\x83\x11\x15a/'Wa-da-Ma-Ha\x0F\xC3` a-B\x8B\x80a!WV[\x01a,qV[a,{V[a-^a\x0F\xC3\x8Aa-B\x8B\x80a!WV[\x90a,\xB3V[\x99\x80\x8B\x16\x91\x82\x11\x15a.\xFEWa-|a\x0F\xC3Ba\x1B\xC8V[\x90\x8B\x81a-\x91`\x01\x89\x01T\x92\x82\x84\x16\x90a,\xB3V[\x16\x82\x84\x16\x11a.\xD5W\x91a\x0F\xC3\x91a-\xAD\x93`\x80\x1C\x16\x90a,\xB3V[\x11\x15a.\xACWa\x0F\xC3`\x02a-\xC4\x92\x01T\x94a,\x9AV[\x14a.:W[\x91a\x0Fk\x91a.\x05\x93a-\xFFa-\xF7a-\xF1a-\xE9``\x87\x01\x87a\x17*V[P\x95\x80a!WV[\x92a\"\x07V[\x916\x90a\x0C\x86V[\x92a\x1F\x94V[a.\x11WP\x91\x90`\0\x90V[`\x04\x90Q\x7F9m\xF4\xEC\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[a.[a.Ta.J\x85\x80a!WV[``\x81\x01\x90a\x17*V[6\x91a\x08\xD2V[` \x81Q\x91\x01 \x84Q` \x81\x01\x90a.{\x81a(\x97\x87\x85` \x91\x81R\x01\x90V[Q\x90 \x14a-\xCAW`\x04\x84Q\x7F\x89\\\xF0\xCE\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04\x86Q\x7FL\xCC0<\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04\x8AQ\x7FlL\x87\xB6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04\x88Q\x7F\x14\xA2\x86\xE4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04\x87Q\x7F\xF9{\t\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\t\x12\x8D\xC8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[` \x81Q\x10a/\x8AW` \x01Q\x90V[`d`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x15`$\x82\x01R\x7FtoBytes32_outOfBounds\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\x90\x16\xD0\x9Dr\xD4\x0F\xDA\xE2\xFD\x8C\xEA\xC6\xB6#Lw\x06!O\xD3\x9C\x1C\xD1\xE6\t\xA0R\x8C\x19\x93\0T\x163\x03a0(WV[`$`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R\xFD[a\t$a0\xAB\x91\x80Q\x90a(\x97g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa0\xDC\x81` \x85\x01Q\x16\x93\x82`@\x82\x01Q\x16\x92``\x82\x01Q\x16`\xA0`\x80\x83\x01Q\x92\x01Q\x93`@Q\x99\x8A\x98a\x01\0` \x8B\x01Ra\x01 \x8A\x01\x90a\r\xD8V[\x96`@\x89\x01R``\x88\x01R`\x80\x87\x01R`\xA0\x86\x01\x90` \x90\x81g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x81Q\x16\x85R\x01Q\x16\x91\x01RV[\x80Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x16`\xE0\x86\x01R` \x90\x91\x01Q\x16a\x01\0\x84\x01RV[\x91\x93\x92\x90a1\x1Ca1\x0F\x82\x85a\x167V[a\x07xa\x07N6\x89a\x1B\tV[\x94g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84a1:\x88Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x16\x15a/PWa\x07Na%\xA5a1S\x94a\x07x\x93a\x16PV[\x90a1`a\x0F\xC3Ba\x1B\xC8V[\x83\x80a1}\x84a1x\x87Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[a,\xB3V[\x93\x16\x15\x15\x92\x83a1\xFAW[PPPa1\xC1Wa1\xA9\x83a1x`\x01\x85\x94\x01Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x92\x16\x15\x15\x91\x82a1\xEBW[PPa1\xC1W`\x01\x01T\x90V[`\x04`@Q\x7FT\xE4\xC1Y\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x81\x92P\x16\x90C\x16\x108\x80a1\xB4V[\x81\x16\x91\x16\x10\x90P8\x83\x81a1\x88V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x816\x03\x01\x82\x12\x15a\x01jW\x01\x90V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`!`\x04R`$`\0\xFD[\x815\x95\x94\x93\x92\x916\x81\x90\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA1\x01\x87\x12\x15a\x01jWa2\xB7\x96a2\xB0` \x83\x01\x83a2\tV[\x91\x01a7\xD2V[`\x12\x81\x10\x15a2\xC4W\x15\x90V[a2#\xA9f.\xFC\x9C\"\x9Cj\0T`@\x1C\x16\x15a3\xAAWV[`\x04`@Q\x7F\xD7\xE6\xBC\xF8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90\x81;\x15a4\xA7Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82T\x16\x17\x90U\x7F\xBC|\xD7Z \xEE'\xFD\x9A\xDE\xBA\xB3 A\xF7U!M\xBCk\xFF\xA9\x0C\xC0\"[9\xDA.\\-;`\0\x80\xA2\x80Q\x15a4tWa4q\x91a;\xFCV[PV[PP4a4}WV[`\x04`@Q\x7F\xB3\x98\x97\x9F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`$\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x7FL\x9C\x8C\xE3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x16`\x04\x82\x01R\xFD[` \x92\x91\x90a5\x04\x84\x92\x82\x81Q\x94\x85\x92\x01a\r\xB5V[\x01\x90\x81R\x01\x90V[\x90\x91`\x01`@\x80Q\x94\x81\x86\x01\x7F'\x18C\xE5'C\x86OK\xB6|\xE9J,\xE8\xFE\x82\xC8\xF6\x10B\xC4\xC1\xCE\xD8S\x1D\x940S\x92\x81\x87R\x82` \x88\x01\x96\x7F%3B\xC6\x9C\xF8\xB1r\xF6$\xF0\xA1\xBB\x18\xCA\x8E\xA3{\x8AG\xDE\xCB\xD2z\xEA\x9F\xA8%s\xCB$\x06\x88R\x827\x82\x87`\x80\x81`\x06Z\xFA\x7F\x0B\r\xBEq\xF4\xD6\x0E\x02\xE9\x16\x0E\xC2\xB0\x15\xCA\xE3\xA0\x9C\xBEOCr&\xE2\xC0.\x1A^]\x12K\xCA\x82R\x83``\x89\x01\x92\x7F\x13\x0B\x9A\xEB\xD3v\x83\x88\xEC\xE5\x92\xAA\x16\xAF\xCA3\xFE\x9E\x9F\xE0=\xD8\x14ph_\xB9\xA8\xB6p\xE0\x0C\x84R` \x85Q\x95\x7F,\xF1\x05\x10E\x9D\xCF\xAE\x8Fy\xB5;\x83\xCB\x0F\x04\0V?\xB2\xDA\x11.\xBE\xEB\xB6\x13\x9Cj\xEE\xF1\xD9\x8C\x85`\x80\x82\x01\x99\x80\x8BR\x7F0dNr\xE11\xA0)\xB8PE\xB6\x81\x81X](3\xE8Hy\xB9p\x91C\xE1\xF5\x93\xF0\0\0\x01\x98\x89\x83\x89``\x81`\x07Z\xFA\x92\x10\x16\x16\x91`\x80\x81`\x06Z\xFA\x16\x96\x7F\x02\x9E\x93\xD5\xF4|\x0Cvq5\x03\x98\xED\x8C@\xF5\xBC\\/[\x006<~.\xB1\x8A\x91\xA1\xC4\x90\xC7\x85RR\x01Q\x80\x95R``\x81`\x07Z\xFA\x92\x10\x16\x16\x90\x85`\x80\x81`\x06Z\xFA\x16\x16\x92Q\x91Q\x90V[\x90`@\x90\x81\x80Q\x93\x847\x7F%}\xF6\xF8\x13,\xB0\x03\x7F}\xFD\xF1\xA2\x9B\x04\xC1\xFF\x92\xBA\x08.\xDAQ9\x96\xBA+\xFA\x9F\xBD\x19\x87\x82\x84\x01R\x7F\x13\xF0\xD8\xD8\x87\x98\x85\xCAV~\xF9\x92\x98\xC3\x0C9~o\xBAXFX\xF4\x12w\x13\xA8\x14\xC0m\xE5Z``\x84\x01R\x7F\x16`\xEB\xCC`\xC7\xA3\xACV\x0E\xFC\xEAY\x93\xF5(\xEE\x13h]:9iJ\xCDt\xFEg\xC8\ry\x8A`\x80\x84\x01R\x7F\x15\xE8\x06B\xC5\x8D\xB4\xDB\xE0\xA8\x7F\x92\xCEaC\x05V[``\x91aC\x05V[` \x81\x01a\xECW[PPPP\x81\x15\x94\x85\x80\x96a>\xE4W[a>\xD4W\x86\x15\x96\x87\x15\x91\x82a>\xBBW[PPa>\xACW\x84\x15\x92\x83a>\x94W[PPP\x90Pa>\x89W\x15a>\x19WPP\x91\x81\x83a>\x02a=\xF0a=\xFAa=\xF0a\x0Fk\x97a>\n\x99a2\tV[``\x81\x01\x90a<\xE2V[\x94\x90\x93a2\tV[\x93\x90PaF\xD2V[a>\x14W[`\0\x90V[`\x06\x90V[\x90\x92\x90\x15a>TWP\x91\x81\x83a>>a=\xF0a=\xFAa=\xF0a\x0Fk\x97a>F\x99a2\tV[\x93\x90PaF[V[a>OW`\0\x90V[`\x07\x90V[\x92a>\x7F\x93a>wa=\xF0a>oa=\xF0a\x0Fk\x97\x87a2\tV[\x93\x90\x95a2\tV[\x93\x90\x92aEIV[\x15a>\x0FW`\x08\x90V[PPPPPP`\x05\x90V[a>\xA1\x93P`\0\x94aD\x0FV[\x13\x15\x808\x80\x80a=\xC4V[PPPPPPPPPP`\x04\x90V[`\0\x92P\x90a>\xCB\x91\x86\x88aD\x0FV[\x12\x158\x80a=\xB5V[PPPPPPPPPPP`\x03\x90V[P\x86\x15a=\xA5V[a?)\x93a>\xFA\x83\x83a2\tV[\x93a?#a.Ta?\x19a?\x11a=K\x88\x88a2\tV[\x97\x90\x96a2\tV[` \x81\x01\x90a\x17*V[\x94aBcV[a?2\x81a7\xC8V[a??W8\x8A\x8A\x8Aa=\x96V[PPPPPPPPPP`\x02\x90V[a?_\x8B\x89\x8B\x84a>\xFA\x83\x83a2\tV[a?h\x81a7\xC8V[\x15a=~WPPPPPPPPPPP`\x01\x90V[`\x03\x11\x15a2\xC4WV[\x91\x90\x81\x10\x15a\"\x02W`\x05\x1B\x81\x015\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC1\x816\x03\x01\x82\x12\x15a\x01jW\x01\x90V[`@\x81\x01a?\xD5\x81\x83a\x17*V[\x90P\x15a@\x93Wa?\xE9a@\n\x91\x83a\x17*V[\x90a?\xF4\x84\x80a\x17*V[\x90a@\x02` \x87\x01\x87a\x17*V[\x94\x90\x93aG{V[\x91\x90\x91a@\x16\x81a?}V[a@\x89W``\x81\x01a@(\x81\x83a<\xE2V[\x91\x90P`\0\x92[\x82\x84\x10a@@WPPPP\x90`\0\x90V[\x90\x91\x92\x93a@a\x90a@\\\x86a@V\x86\x86a<\xE2V[\x90a?\x87V[aH*V[\x94\x90\x94a@m\x81a?}V[a@|W`\x01\x01\x92\x91\x90a@/V[PPPPP`\0\x90`\x03\x90V[PP`\0\x90`\x02\x90V[PP`\0\x90`\x01\x90V[a@\xA5a<\x99V[P`@Qa@\xB2\x81a\x08\x0EV[` \x81R`\x01` \x82\x01R`\x01`@\x82\x01R\x90V[\x93\x91a@\xEC\x90\x93\x91\x93a@\xDDa.T\x87\x80a\x17*V[` \x81Q\x91\x01 \x926\x91a\x08\xD2V[` \x81Q\x91\x01 \x03aACWaA\x08a.T` \x85\x01\x85a\x17*V[` \x81Q\x91\x01 \x90` \x81Q\x91\x01 \x03aAOW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`P`$\x82\x01R\x7FverifyChainedMembership: non exh`D\x82\x01R\x7Faustive pattern matching on Veri`d\x82\x01R\x7FfyExistenceError\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\x84\x82\x01R`\xA4\x90\xFD[\x93\x90\x92aBz\x90\x95\x92\x95a@\xDDa.T\x87\x80a\x17*V[` \x81Q\x91\x01 \x03aB\xFCWaB\x96a.T` \x85\x01\x85a\x17*V[` \x81Q\x91\x01 \x90` \x81Q\x91\x01 \x03aB\xF4WaB\xB4\x90\x82aH\xA3V[aB\xBD\x81a7\xBEV[aB\xEDWaB\xCA\x90a?\xC7V[aB\xD3\x81a7\xBEV[aB\xE6W\x03aB\xE1W`\0\x90V[`\x05\x90V[PP`\x04\x90V[PP`\x03\x90V[PPP`\x02\x90V[PPPP`\x01\x90V[\x90aCDWP\x80Q\x15aC\x1AW\x80Q\x90` \x01\xFD[`\x04`@Q\x7F\x14%\xEAB\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x81Q\x15\x80aC\x9CW[aCUWP\x90V[`$\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x7F\x99\x96\xB3\x15\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x16`\x04\x82\x01R\xFD[P\x80;\x15aCMV[aC\xAF\x81\x80a\x17*V[\x90PaC\xF4WaC\xC2` \x82\x01\x82a\x17*V[\x90PaC\xF4WaC\xD5`@\x82\x01\x82a\x17*V[\x90PaC\xF4W\x80``aC\xE9\x92\x01\x90a<\xE2V[\x90Pa>\x0FW`\x01\x90V[P`\0\x90V[\x90\x15a\"\x02W\x90V[\x90\x82\x10\x15a\"\x02W\x01\x90V[\x92\x91\x90aD\x1C\x83\x82aI\xA7V[\x93\x84\x92`\0[\x84\x81\x10aDfWPPP\x11aD_W\x11aD;W`\0\x90V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90V[PP`\x01\x90V[\x90\x91\x92\x93PaD\x9FaDy\x82\x86\x86aD\x03V[5\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x90V[\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aD\xF6aD\xD1aDy\x85\x8A\x88aD\x03V[\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x90V[\x91\x16\x81\x81\x10\x15aE,WPPPPPPPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90V[\x11aE>W`\x01\x01\x90\x85\x93\x92\x91aD\"V[PPPPPP`\x01\x90V[\x92\x93\x90\x91aEV\x81a\x1E\xB4V[\x92aE`\x83a\x1E\xB4V[\x93[aEsa.Ta=K\x83\x86\x86a?\x87V[\x80Q` \x80\x92\x01 aE\x8Ca.Ta=K\x89\x89\x8Da?\x87V[\x82\x81Q\x91\x01 \x14\x90\x81aF\x1BW[PaF\x03WaE\xC2a\x0FkaE\xB0\x83\x86\x86a?\x87V[aE\xBB\x88\x88\x8Ca?\x87V[\x90\x89aI\xC3V[aE\xF7WaE\xD4\x92a\x0Fk\x92\x87aF[V[aE\xEEWaE\xE5\x93a\x0Fk\x93aF\xD2V[a>\x0FW`\x01\x90V[PPPP`\0\x90V[PPPPPPP`\0\x90V[aF\x0FaF\x15\x91a\x1E\xB4V[\x94a\x1E\xB4V[\x93aEbV[\x90PaF7a.TaF.\x84\x87\x87a?\x87V[\x83\x81\x01\x90a\x17*V[\x81\x81Q\x91\x01 \x90aFOa.TaF.\x89\x89\x8Da?\x87V[\x80Q\x91\x01 \x148aE\x9AV[\x91\x93\x92\x90\x82Q` \x84\x01Q\x81\x01\x93\x84\x82\x11a\x1B\xE1W`@\x81\x01Q\x82\x01\x80\x92\x11a\x1B\xE1WQ\x15\x93`\x01\x94`\x01\x17\x15a\x1B\xE1W`\0\x92`\0[\x85\x81\x10aF\xA6WP`\x01\x97PPPPPPPV[aF\xBB\x84\x84aF\xB6\x84\x8D\x87a?\x87V[aJ\x15V[\x15aF\xC7W\x86\x01aF\x92V[P\x92\x96PPPPPPV[\x91\x93\x92\x90\x82Q\x15\x92`\x01\x93`\x01\x17\x15a\x1B\xE1W` \x81\x01Q\x90`@\x81\x01Q\x90Q\x91`\0\x93`\0[\x86\x81\x10aG\x0EWP`\x01\x98PPPPPPPPV[aG$\x85\x85\x85aG\x1F\x85\x8F\x88a?\x87V[aJZV[\x15aG0W\x87\x01aF\xF9V[P\x93\x97PPPPPPPV[\x94` a5\x04\x94aGe\x85\x83\x9B\x9A\x98\x95\x99\x85\x97\x85\x9B\x827\x01\x91`\0\x83R\x82\x81Q\x94\x85\x92\x01a\r\xB5V[\x01\x91\x827\x01\x91`\0\x83R\x82\x81Q\x94\x85\x92\x01a\r\xB5V[\x94\x93\x90\x91\x92\x93\x84\x15aH\x1CW\x80\x15aH\x0EW`\0` \x91aG\x9Ea \x10\x88aJ\xBCV[\x93aG\xA9\x85\x89aJ\xDEV[PaG\xB9`@Q\x80\x93\x81\x93a\x16\x10V[\x03\x90`\x02Z\xFA\x15a! W` \x94a(\x97aG\xFC\x94a \xC7\x93`\0\x97\x88Q\x92aG\xE3a \x10aJ\x9FV[\x92aG\xED\x84aK\x1BV[P`@Q\x98\x89\x97\x8D\x89\x01aG(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for CometblsClient { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for CometblsClient { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for CometblsClient { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for CometblsClient { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(CometblsClient)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl CometblsClient { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - COMETBLSCLIENT_ABI.clone(), - client, - )) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - COMETBLSCLIENT_ABI.clone(), - COMETBLSCLIENT_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - /// Calls the contract's `UPGRADE_INTERFACE_VERSION` (0xad3cb1cc) function - pub fn upgrade_interface_version( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([173, 60, 177, 204], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `createClient` (0x2629636b) function - pub fn create_client( - &self, - client_id: ::std::string::String, - client_state_bytes: ::ethers::core::types::Bytes, - consensus_state_bytes: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall - { - self.0 - .method_hash( - [38, 41, 99, 107], - (client_id, client_state_bytes, consensus_state_bytes), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getClientState` (0x76c81c42) function - pub fn get_client_state( - &self, - client_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([118, 200, 28, 66], client_id) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getConsensusState` (0x6cf44bf4) function - pub fn get_consensus_state( - &self, - client_id: ::std::string::String, - height: IbcCoreClientV1HeightData, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([108, 244, 75, 244], (client_id, height)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getLatestHeight` (0x329681d0) function - pub fn get_latest_height( - &self, - client_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([50, 150, 129, 208], client_id) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getTimestampAtHeight` (0x4b0bbdc4) function - pub fn get_timestamp_at_height( - &self, - client_id: ::std::string::String, - height: IbcCoreClientV1HeightData, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([75, 11, 189, 196], (client_id, height)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `initialize` (0x485cc955) function - pub fn initialize( - &self, - ibc_handler: ::ethers::core::types::Address, - admin: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([72, 92, 201, 85], (ibc_handler, admin)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `misbehavior` (0x21c90b05) function - pub fn misbehavior( - &self, - client_id: ::std::string::String, - header_a: UnionIbcLightclientsCometblsV1HeaderData, - header_b: UnionIbcLightclientsCometblsV1HeaderData, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([33, 201, 11, 5], (client_id, header_a, header_b)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `owner` (0x8da5cb5b) function - pub fn owner( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([141, 165, 203, 91], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `paused` (0x5c975abb) function - pub fn paused(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([92, 151, 90, 187], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `proxiableUUID` (0x52d1902d) function - pub fn proxiable_uuid(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 209, 144, 45], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `renounceOwnership` (0x715018a6) function - pub fn renounce_ownership(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([113, 80, 24, 166], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `transferOwnership` (0xf2fde38b) function - pub fn transfer_ownership( - &self, - new_owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([242, 253, 227, 139], new_owner) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `updateClient` (0x6fbf8079) function - pub fn update_client( - &self, - client_id: ::std::string::String, - client_message_bytes: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall< - M, - ([u8; 32], ::std::vec::Vec), - > { - self.0 - .method_hash([111, 191, 128, 121], (client_id, client_message_bytes)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `upgradeToAndCall` (0x4f1ef286) function - pub fn upgrade_to_and_call( - &self, - new_implementation: ::ethers::core::types::Address, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([79, 30, 242, 134], (new_implementation, data)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `verifyMembership` (0xf9bb5a51) function - pub fn verify_membership( - &self, - client_id: ::std::string::String, - height: IbcCoreClientV1HeightData, - delay_period_time: u64, - delay_period_blocks: u64, - proof: ::ethers::core::types::Bytes, - prefix: ::ethers::core::types::Bytes, - path: ::ethers::core::types::Bytes, - value: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [249, 187, 90, 81], - ( - client_id, - height, - delay_period_time, - delay_period_blocks, - proof, - prefix, - path, - value, - ), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `verifyNonMembership` (0x999fbbb3) function - pub fn verify_non_membership( - &self, - client_id: ::std::string::String, - height: IbcCoreClientV1HeightData, - delay_period_time: u64, - delay_period_blocks: u64, - proof: ::ethers::core::types::Bytes, - prefix: ::ethers::core::types::Bytes, - path: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [153, 159, 187, 179], - ( - client_id, - height, - delay_period_time, - delay_period_blocks, - proof, - prefix, - path, - ), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `verifyZKP` (0x61ce4b12) function - pub fn verify_zkp( - &self, - zkp_bytes: ::ethers::core::types::Bytes, - chain_id: ::std::string::String, - trusted_validators_hash: [u8; 32], - header: UnionIbcLightclientsCometblsV1LightHeaderData, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [97, 206, 75, 18], - (zkp_bytes, chain_id, trusted_validators_hash, header), - ) - .expect("method not found (this should never happen)") - } - /// Gets the contract's `Initialized` event - pub fn initialized_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, InitializedFilter> - { - self.0.event() - } - /// Gets the contract's `OwnershipTransferred` event - pub fn ownership_transferred_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, OwnershipTransferredFilter> - { - self.0.event() - } - /// Gets the contract's `Paused` event - pub fn paused_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PausedFilter> { - self.0.event() - } - /// Gets the contract's `Unpaused` event - pub fn unpaused_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, UnpausedFilter> { - self.0.event() - } - /// Gets the contract's `Upgraded` event - pub fn upgraded_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, UpgradedFilter> { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, CometblsClientEvents> - { - self.0 - .event_with_filter(::core::default::Default::default()) - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> - for CometblsClient - { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - /// Custom Error type `AddressEmptyCode` with signature `AddressEmptyCode(address)` and selector `0x9996b315` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "AddressEmptyCode", abi = "AddressEmptyCode(address)")] - pub struct AddressEmptyCode { - pub target: ::ethers::core::types::Address, - } - /// Custom Error type `ERC1967InvalidImplementation` with signature `ERC1967InvalidImplementation(address)` and selector `0x4c9c8ce3` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ERC1967InvalidImplementation", - abi = "ERC1967InvalidImplementation(address)" - )] - pub struct ERC1967InvalidImplementation { - pub implementation: ::ethers::core::types::Address, - } - /// Custom Error type `ERC1967NonPayable` with signature `ERC1967NonPayable()` and selector `0xb398979f` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ERC1967NonPayable", abi = "ERC1967NonPayable()")] - pub struct ERC1967NonPayable; - /// Custom Error type `EnforcedPause` with signature `EnforcedPause()` and selector `0xd93c0665` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "EnforcedPause", abi = "EnforcedPause()")] - pub struct EnforcedPause; - /// Custom Error type `ErrClientFrozen` with signature `ErrClientFrozen()` and selector `0xb3e34670` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrClientFrozen", abi = "ErrClientFrozen()")] - pub struct ErrClientFrozen; - /// Custom Error type `ErrDelayPeriodNotExpired` with signature `ErrDelayPeriodNotExpired()` and selector `0x54e4c159` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrDelayPeriodNotExpired", abi = "ErrDelayPeriodNotExpired()")] - pub struct ErrDelayPeriodNotExpired; - /// Custom Error type `ErrHeaderExpired` with signature `ErrHeaderExpired()` and selector `0x6c4c87b6` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrHeaderExpired", abi = "ErrHeaderExpired()")] - pub struct ErrHeaderExpired; - /// Custom Error type `ErrInvalidMisbehavior` with signature `ErrInvalidMisbehavior()` and selector `0x5882336d` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidMisbehavior", abi = "ErrInvalidMisbehavior()")] - pub struct ErrInvalidMisbehavior; - /// Custom Error type `ErrInvalidMisbehaviorHeadersSequence` with signature `ErrInvalidMisbehaviorHeadersSequence()` and selector `0xce011f04` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidMisbehaviorHeadersSequence", - abi = "ErrInvalidMisbehaviorHeadersSequence()" - )] - pub struct ErrInvalidMisbehaviorHeadersSequence; - /// Custom Error type `ErrInvalidUntrustedValidatorsHash` with signature `ErrInvalidUntrustedValidatorsHash()` and selector `0x895cf0ce` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidUntrustedValidatorsHash", - abi = "ErrInvalidUntrustedValidatorsHash()" - )] - pub struct ErrInvalidUntrustedValidatorsHash; - /// Custom Error type `ErrInvalidZKP` with signature `ErrInvalidZKP()` and selector `0x396df4ec` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidZKP", abi = "ErrInvalidZKP()")] - pub struct ErrInvalidZKP; - /// Custom Error type `ErrMaxClockDriftExceeded` with signature `ErrMaxClockDriftExceeded()` and selector `0x4ccc303c` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrMaxClockDriftExceeded", abi = "ErrMaxClockDriftExceeded()")] - pub struct ErrMaxClockDriftExceeded; - /// Custom Error type `ErrNotIBC` with signature `ErrNotIBC()` and selector `0xe54f8f9d` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrNotIBC", abi = "ErrNotIBC()")] - pub struct ErrNotIBC; - /// Custom Error type `ErrTrustedConsensusStateNotFound` with signature `ErrTrustedConsensusStateNotFound()` and selector `0x09128dc8` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrTrustedConsensusStateNotFound", - abi = "ErrTrustedConsensusStateNotFound()" - )] - pub struct ErrTrustedConsensusStateNotFound; - /// Custom Error type `ErrUntrustedHeightLTETrustedHeight` with signature `ErrUntrustedHeightLTETrustedHeight()` and selector `0xf97b0922` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrUntrustedHeightLTETrustedHeight", - abi = "ErrUntrustedHeightLTETrustedHeight()" - )] - pub struct ErrUntrustedHeightLTETrustedHeight; - /// Custom Error type `ErrUntrustedTimestampLTETrustedTimestamp` with signature `ErrUntrustedTimestampLTETrustedTimestamp()` and selector `0x14a286e4` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrUntrustedTimestampLTETrustedTimestamp", - abi = "ErrUntrustedTimestampLTETrustedTimestamp()" - )] - pub struct ErrUntrustedTimestampLTETrustedTimestamp; - /// Custom Error type `ExpectedPause` with signature `ExpectedPause()` and selector `0x8dfc202b` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ExpectedPause", abi = "ExpectedPause()")] - pub struct ExpectedPause; - /// Custom Error type `FailedInnerCall` with signature `FailedInnerCall()` and selector `0x1425ea42` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "FailedInnerCall", abi = "FailedInnerCall()")] - pub struct FailedInnerCall; - /// Custom Error type `InvalidInitialization` with signature `InvalidInitialization()` and selector `0xf92ee8a9` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "InvalidInitialization", abi = "InvalidInitialization()")] - pub struct InvalidInitialization; - /// Custom Error type `NotInitializing` with signature `NotInitializing()` and selector `0xd7e6bcf8` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "NotInitializing", abi = "NotInitializing()")] - pub struct NotInitializing; - /// Custom Error type `OwnableInvalidOwner` with signature `OwnableInvalidOwner(address)` and selector `0x1e4fbdf7` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "OwnableInvalidOwner", abi = "OwnableInvalidOwner(address)")] - pub struct OwnableInvalidOwner { - pub owner: ::ethers::core::types::Address, - } - /// Custom Error type `OwnableUnauthorizedAccount` with signature `OwnableUnauthorizedAccount(address)` and selector `0x118cdaa7` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "OwnableUnauthorizedAccount", - abi = "OwnableUnauthorizedAccount(address)" - )] - pub struct OwnableUnauthorizedAccount { - pub account: ::ethers::core::types::Address, - } - /// Custom Error type `UUPSUnauthorizedCallContext` with signature `UUPSUnauthorizedCallContext()` and selector `0xe07c8dba` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "UUPSUnauthorizedCallContext", - abi = "UUPSUnauthorizedCallContext()" - )] - pub struct UUPSUnauthorizedCallContext; - /// Custom Error type `UUPSUnsupportedProxiableUUID` with signature `UUPSUnsupportedProxiableUUID(bytes32)` and selector `0xaa1d49a4` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "UUPSUnsupportedProxiableUUID", - abi = "UUPSUnsupportedProxiableUUID(bytes32)" - )] - pub struct UUPSUnsupportedProxiableUUID { - pub slot: [u8; 32], - } - /// Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum CometblsClientErrors { - AddressEmptyCode(AddressEmptyCode), - ERC1967InvalidImplementation(ERC1967InvalidImplementation), - ERC1967NonPayable(ERC1967NonPayable), - EnforcedPause(EnforcedPause), - ErrClientFrozen(ErrClientFrozen), - ErrDelayPeriodNotExpired(ErrDelayPeriodNotExpired), - ErrHeaderExpired(ErrHeaderExpired), - ErrInvalidMisbehavior(ErrInvalidMisbehavior), - ErrInvalidMisbehaviorHeadersSequence(ErrInvalidMisbehaviorHeadersSequence), - ErrInvalidUntrustedValidatorsHash(ErrInvalidUntrustedValidatorsHash), - ErrInvalidZKP(ErrInvalidZKP), - ErrMaxClockDriftExceeded(ErrMaxClockDriftExceeded), - ErrNotIBC(ErrNotIBC), - ErrTrustedConsensusStateNotFound(ErrTrustedConsensusStateNotFound), - ErrUntrustedHeightLTETrustedHeight(ErrUntrustedHeightLTETrustedHeight), - ErrUntrustedTimestampLTETrustedTimestamp(ErrUntrustedTimestampLTETrustedTimestamp), - ExpectedPause(ExpectedPause), - FailedInnerCall(FailedInnerCall), - InvalidInitialization(InvalidInitialization), - NotInitializing(NotInitializing), - OwnableInvalidOwner(OwnableInvalidOwner), - OwnableUnauthorizedAccount(OwnableUnauthorizedAccount), - UUPSUnauthorizedCallContext(UUPSUnauthorizedCallContext), - UUPSUnsupportedProxiableUUID(UUPSUnsupportedProxiableUUID), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for CometblsClientErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) - { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::AddressEmptyCode(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ERC1967InvalidImplementation(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ERC1967NonPayable(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::EnforcedPause(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ErrClientFrozen(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrDelayPeriodNotExpired(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ErrHeaderExpired(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidMisbehavior(decoded)); - } - if let Ok(decoded) = - ::decode( - data, - ) - { - return Ok(Self::ErrInvalidMisbehaviorHeadersSequence(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidUntrustedValidatorsHash(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ErrInvalidZKP(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrMaxClockDriftExceeded(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ErrNotIBC(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrTrustedConsensusStateNotFound(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrUntrustedHeightLTETrustedHeight(decoded)); - } - if let Ok(decoded) = - ::decode( - data, - ) - { - return Ok(Self::ErrUntrustedTimestampLTETrustedTimestamp(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ExpectedPause(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::FailedInnerCall(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::InvalidInitialization(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::NotInitializing(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OwnableInvalidOwner(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OwnableUnauthorizedAccount(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UUPSUnauthorizedCallContext(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UUPSUnsupportedProxiableUUID(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for CometblsClientErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::AddressEmptyCode(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ERC1967InvalidImplementation(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ERC1967NonPayable(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::EnforcedPause(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrClientFrozen(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrDelayPeriodNotExpired(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrHeaderExpired(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrInvalidMisbehavior(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidMisbehaviorHeadersSequence(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidUntrustedValidatorsHash(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidZKP(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrMaxClockDriftExceeded(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrNotIBC(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrTrustedConsensusStateNotFound(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrUntrustedHeightLTETrustedHeight(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrUntrustedTimestampLTETrustedTimestamp(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ExpectedPause(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::FailedInnerCall(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::InvalidInitialization(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NotInitializing(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OwnableInvalidOwner(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OwnableUnauthorizedAccount(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UUPSUnauthorizedCallContext(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UUPSUnsupportedProxiableUUID(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for CometblsClientErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for CometblsClientErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::AddressEmptyCode(element) => ::core::fmt::Display::fmt(element, f), - Self::ERC1967InvalidImplementation(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ERC1967NonPayable(element) => ::core::fmt::Display::fmt(element, f), - Self::EnforcedPause(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrClientFrozen(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrDelayPeriodNotExpired(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrHeaderExpired(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidMisbehavior(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidMisbehaviorHeadersSequence(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrInvalidUntrustedValidatorsHash(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrInvalidZKP(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrMaxClockDriftExceeded(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrNotIBC(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrTrustedConsensusStateNotFound(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrUntrustedHeightLTETrustedHeight(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrUntrustedTimestampLTETrustedTimestamp(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ExpectedPause(element) => ::core::fmt::Display::fmt(element, f), - Self::FailedInnerCall(element) => ::core::fmt::Display::fmt(element, f), - Self::InvalidInitialization(element) => ::core::fmt::Display::fmt(element, f), - Self::NotInitializing(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnableInvalidOwner(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnableUnauthorizedAccount(element) => ::core::fmt::Display::fmt(element, f), - Self::UUPSUnauthorizedCallContext(element) => ::core::fmt::Display::fmt(element, f), - Self::UUPSUnsupportedProxiableUUID(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for CometblsClientErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: AddressEmptyCode) -> Self { - Self::AddressEmptyCode(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ERC1967InvalidImplementation) -> Self { - Self::ERC1967InvalidImplementation(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ERC1967NonPayable) -> Self { - Self::ERC1967NonPayable(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: EnforcedPause) -> Self { - Self::EnforcedPause(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrClientFrozen) -> Self { - Self::ErrClientFrozen(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrDelayPeriodNotExpired) -> Self { - Self::ErrDelayPeriodNotExpired(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrHeaderExpired) -> Self { - Self::ErrHeaderExpired(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrInvalidMisbehavior) -> Self { - Self::ErrInvalidMisbehavior(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrInvalidMisbehaviorHeadersSequence) -> Self { - Self::ErrInvalidMisbehaviorHeadersSequence(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrInvalidUntrustedValidatorsHash) -> Self { - Self::ErrInvalidUntrustedValidatorsHash(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrInvalidZKP) -> Self { - Self::ErrInvalidZKP(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrMaxClockDriftExceeded) -> Self { - Self::ErrMaxClockDriftExceeded(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrNotIBC) -> Self { - Self::ErrNotIBC(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrTrustedConsensusStateNotFound) -> Self { - Self::ErrTrustedConsensusStateNotFound(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrUntrustedHeightLTETrustedHeight) -> Self { - Self::ErrUntrustedHeightLTETrustedHeight(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ErrUntrustedTimestampLTETrustedTimestamp) -> Self { - Self::ErrUntrustedTimestampLTETrustedTimestamp(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: ExpectedPause) -> Self { - Self::ExpectedPause(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: FailedInnerCall) -> Self { - Self::FailedInnerCall(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: InvalidInitialization) -> Self { - Self::InvalidInitialization(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: NotInitializing) -> Self { - Self::NotInitializing(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: OwnableInvalidOwner) -> Self { - Self::OwnableInvalidOwner(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: OwnableUnauthorizedAccount) -> Self { - Self::OwnableUnauthorizedAccount(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: UUPSUnauthorizedCallContext) -> Self { - Self::UUPSUnauthorizedCallContext(value) - } - } - impl ::core::convert::From for CometblsClientErrors { - fn from(value: UUPSUnsupportedProxiableUUID) -> Self { - Self::UUPSUnsupportedProxiableUUID(value) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Initialized", abi = "Initialized(uint64)")] - pub struct InitializedFilter { - pub version: u64, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent( - name = "OwnershipTransferred", - abi = "OwnershipTransferred(address,address)" - )] - pub struct OwnershipTransferredFilter { - #[ethevent(indexed)] - pub previous_owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub new_owner: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Paused", abi = "Paused(address)")] - pub struct PausedFilter { - pub account: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Unpaused", abi = "Unpaused(address)")] - pub struct UnpausedFilter { - pub account: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Upgraded", abi = "Upgraded(address)")] - pub struct UpgradedFilter { - #[ethevent(indexed)] - pub implementation: ::ethers::core::types::Address, - } - /// Container type for all of the contract's events - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum CometblsClientEvents { - InitializedFilter(InitializedFilter), - OwnershipTransferredFilter(OwnershipTransferredFilter), - PausedFilter(PausedFilter), - UnpausedFilter(UnpausedFilter), - UpgradedFilter(UpgradedFilter), - } - impl ::ethers::contract::EthLogDecode for CometblsClientEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = InitializedFilter::decode_log(log) { - return Ok(CometblsClientEvents::InitializedFilter(decoded)); - } - if let Ok(decoded) = OwnershipTransferredFilter::decode_log(log) { - return Ok(CometblsClientEvents::OwnershipTransferredFilter(decoded)); - } - if let Ok(decoded) = PausedFilter::decode_log(log) { - return Ok(CometblsClientEvents::PausedFilter(decoded)); - } - if let Ok(decoded) = UnpausedFilter::decode_log(log) { - return Ok(CometblsClientEvents::UnpausedFilter(decoded)); - } - if let Ok(decoded) = UpgradedFilter::decode_log(log) { - return Ok(CometblsClientEvents::UpgradedFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for CometblsClientEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::InitializedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnershipTransferredFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::PausedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::UnpausedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::UpgradedFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for CometblsClientEvents { - fn from(value: InitializedFilter) -> Self { - Self::InitializedFilter(value) - } - } - impl ::core::convert::From for CometblsClientEvents { - fn from(value: OwnershipTransferredFilter) -> Self { - Self::OwnershipTransferredFilter(value) - } - } - impl ::core::convert::From for CometblsClientEvents { - fn from(value: PausedFilter) -> Self { - Self::PausedFilter(value) - } - } - impl ::core::convert::From for CometblsClientEvents { - fn from(value: UnpausedFilter) -> Self { - Self::UnpausedFilter(value) - } - } - impl ::core::convert::From for CometblsClientEvents { - fn from(value: UpgradedFilter) -> Self { - Self::UpgradedFilter(value) - } - } - /// Container type for all input parameters for the `UPGRADE_INTERFACE_VERSION` function with signature `UPGRADE_INTERFACE_VERSION()` and selector `0xad3cb1cc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "UPGRADE_INTERFACE_VERSION", - abi = "UPGRADE_INTERFACE_VERSION()" - )] - pub struct UpgradeInterfaceVersionCall; - /// Container type for all input parameters for the `createClient` function with signature `createClient(string,bytes,bytes)` and selector `0x2629636b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "createClient", abi = "createClient(string,bytes,bytes)")] - pub struct CreateClientCall { - pub client_id: ::std::string::String, - pub client_state_bytes: ::ethers::core::types::Bytes, - pub consensus_state_bytes: ::ethers::core::types::Bytes, - } - /// Container type for all input parameters for the `getClientState` function with signature `getClientState(string)` and selector `0x76c81c42` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getClientState", abi = "getClientState(string)")] - pub struct GetClientStateCall { - pub client_id: ::std::string::String, - } - /// Container type for all input parameters for the `getConsensusState` function with signature `getConsensusState(string,(uint64,uint64))` and selector `0x6cf44bf4` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "getConsensusState", - abi = "getConsensusState(string,(uint64,uint64))" - )] - pub struct GetConsensusStateCall { - pub client_id: ::std::string::String, - pub height: IbcCoreClientV1HeightData, - } - /// Container type for all input parameters for the `getLatestHeight` function with signature `getLatestHeight(string)` and selector `0x329681d0` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getLatestHeight", abi = "getLatestHeight(string)")] - pub struct GetLatestHeightCall { - pub client_id: ::std::string::String, - } - /// Container type for all input parameters for the `getTimestampAtHeight` function with signature `getTimestampAtHeight(string,(uint64,uint64))` and selector `0x4b0bbdc4` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "getTimestampAtHeight", - abi = "getTimestampAtHeight(string,(uint64,uint64))" - )] - pub struct GetTimestampAtHeightCall { - pub client_id: ::std::string::String, - pub height: IbcCoreClientV1HeightData, - } - /// Container type for all input parameters for the `initialize` function with signature `initialize(address,address)` and selector `0x485cc955` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "initialize", abi = "initialize(address,address)")] - pub struct InitializeCall { - pub ibc_handler: ::ethers::core::types::Address, - pub admin: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `misbehavior` function with signature `misbehavior(string,((int64,(int64,int64),bytes,bytes,bytes),(uint64,uint64),bytes),((int64,(int64,int64),bytes,bytes,bytes),(uint64,uint64),bytes))` and selector `0x21c90b05` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "misbehavior", - abi = "misbehavior(string,((int64,(int64,int64),bytes,bytes,bytes),(uint64,uint64),bytes),((int64,(int64,int64),bytes,bytes,bytes),(uint64,uint64),bytes))" - )] - pub struct MisbehaviorCall { - pub client_id: ::std::string::String, - pub header_a: UnionIbcLightclientsCometblsV1HeaderData, - pub header_b: UnionIbcLightclientsCometblsV1HeaderData, - } - /// Container type for all input parameters for the `owner` function with signature `owner()` and selector `0x8da5cb5b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "owner", abi = "owner()")] - pub struct OwnerCall; - /// Container type for all input parameters for the `paused` function with signature `paused()` and selector `0x5c975abb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "paused", abi = "paused()")] - pub struct PausedCall; - /// Container type for all input parameters for the `proxiableUUID` function with signature `proxiableUUID()` and selector `0x52d1902d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "proxiableUUID", abi = "proxiableUUID()")] - pub struct ProxiableUUIDCall; - /// Container type for all input parameters for the `renounceOwnership` function with signature `renounceOwnership()` and selector `0x715018a6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "renounceOwnership", abi = "renounceOwnership()")] - pub struct RenounceOwnershipCall; - /// Container type for all input parameters for the `transferOwnership` function with signature `transferOwnership(address)` and selector `0xf2fde38b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "transferOwnership", abi = "transferOwnership(address)")] - pub struct TransferOwnershipCall { - pub new_owner: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `updateClient` function with signature `updateClient(string,bytes)` and selector `0x6fbf8079` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "updateClient", abi = "updateClient(string,bytes)")] - pub struct UpdateClientCall { - pub client_id: ::std::string::String, - pub client_message_bytes: ::ethers::core::types::Bytes, - } - /// Container type for all input parameters for the `upgradeToAndCall` function with signature `upgradeToAndCall(address,bytes)` and selector `0x4f1ef286` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "upgradeToAndCall", abi = "upgradeToAndCall(address,bytes)")] - pub struct UpgradeToAndCallCall { - pub new_implementation: ::ethers::core::types::Address, - pub data: ::ethers::core::types::Bytes, - } - /// Container type for all input parameters for the `verifyMembership` function with signature `verifyMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes,bytes)` and selector `0xf9bb5a51` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "verifyMembership", - abi = "verifyMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes,bytes)" - )] - pub struct VerifyMembershipCall { - pub client_id: ::std::string::String, - pub height: IbcCoreClientV1HeightData, - pub delay_period_time: u64, - pub delay_period_blocks: u64, - pub proof: ::ethers::core::types::Bytes, - pub prefix: ::ethers::core::types::Bytes, - pub path: ::ethers::core::types::Bytes, - pub value: ::ethers::core::types::Bytes, - } - /// Container type for all input parameters for the `verifyNonMembership` function with signature `verifyNonMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes)` and selector `0x999fbbb3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "verifyNonMembership", - abi = "verifyNonMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes)" - )] - pub struct VerifyNonMembershipCall { - pub client_id: ::std::string::String, - pub height: IbcCoreClientV1HeightData, - pub delay_period_time: u64, - pub delay_period_blocks: u64, - pub proof: ::ethers::core::types::Bytes, - pub prefix: ::ethers::core::types::Bytes, - pub path: ::ethers::core::types::Bytes, - } - /// Container type for all input parameters for the `verifyZKP` function with signature `verifyZKP(bytes,string,bytes32,(int64,(int64,int64),bytes,bytes,bytes))` and selector `0x61ce4b12` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "verifyZKP", - abi = "verifyZKP(bytes,string,bytes32,(int64,(int64,int64),bytes,bytes,bytes))" - )] - pub struct VerifyZKPCall { - pub zkp_bytes: ::ethers::core::types::Bytes, - pub chain_id: ::std::string::String, - pub trusted_validators_hash: [u8; 32], - pub header: UnionIbcLightclientsCometblsV1LightHeaderData, - } - /// Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum CometblsClientCalls { - UpgradeInterfaceVersion(UpgradeInterfaceVersionCall), - CreateClient(CreateClientCall), - GetClientState(GetClientStateCall), - GetConsensusState(GetConsensusStateCall), - GetLatestHeight(GetLatestHeightCall), - GetTimestampAtHeight(GetTimestampAtHeightCall), - Initialize(InitializeCall), - Misbehavior(MisbehaviorCall), - Owner(OwnerCall), - Paused(PausedCall), - ProxiableUUID(ProxiableUUIDCall), - RenounceOwnership(RenounceOwnershipCall), - TransferOwnership(TransferOwnershipCall), - UpdateClient(UpdateClientCall), - UpgradeToAndCall(UpgradeToAndCallCall), - VerifyMembership(VerifyMembershipCall), - VerifyNonMembership(VerifyNonMembershipCall), - VerifyZKP(VerifyZKPCall), - } - impl ::ethers::core::abi::AbiDecode for CometblsClientCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UpgradeInterfaceVersion(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::CreateClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetClientState(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetConsensusState(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetLatestHeight(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetTimestampAtHeight(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Initialize(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Misbehavior(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Owner(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Paused(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ProxiableUUID(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::RenounceOwnership(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::TransferOwnership(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::UpdateClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UpgradeToAndCall(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::VerifyMembership(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::VerifyNonMembership(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::VerifyZKP(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for CometblsClientCalls { - fn encode(self) -> Vec { - match self { - Self::UpgradeInterfaceVersion(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::CreateClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetClientState(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetConsensusState(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetLatestHeight(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetTimestampAtHeight(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Initialize(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Misbehavior(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Owner(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Paused(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ProxiableUUID(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::RenounceOwnership(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TransferOwnership(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::UpdateClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::UpgradeToAndCall(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::VerifyMembership(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::VerifyNonMembership(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::VerifyZKP(element) => ::ethers::core::abi::AbiEncode::encode(element), - } - } - } - impl ::core::fmt::Display for CometblsClientCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::UpgradeInterfaceVersion(element) => ::core::fmt::Display::fmt(element, f), - Self::CreateClient(element) => ::core::fmt::Display::fmt(element, f), - Self::GetClientState(element) => ::core::fmt::Display::fmt(element, f), - Self::GetConsensusState(element) => ::core::fmt::Display::fmt(element, f), - Self::GetLatestHeight(element) => ::core::fmt::Display::fmt(element, f), - Self::GetTimestampAtHeight(element) => ::core::fmt::Display::fmt(element, f), - Self::Initialize(element) => ::core::fmt::Display::fmt(element, f), - Self::Misbehavior(element) => ::core::fmt::Display::fmt(element, f), - Self::Owner(element) => ::core::fmt::Display::fmt(element, f), - Self::Paused(element) => ::core::fmt::Display::fmt(element, f), - Self::ProxiableUUID(element) => ::core::fmt::Display::fmt(element, f), - Self::RenounceOwnership(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferOwnership(element) => ::core::fmt::Display::fmt(element, f), - Self::UpdateClient(element) => ::core::fmt::Display::fmt(element, f), - Self::UpgradeToAndCall(element) => ::core::fmt::Display::fmt(element, f), - Self::VerifyMembership(element) => ::core::fmt::Display::fmt(element, f), - Self::VerifyNonMembership(element) => ::core::fmt::Display::fmt(element, f), - Self::VerifyZKP(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: UpgradeInterfaceVersionCall) -> Self { - Self::UpgradeInterfaceVersion(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: CreateClientCall) -> Self { - Self::CreateClient(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: GetClientStateCall) -> Self { - Self::GetClientState(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: GetConsensusStateCall) -> Self { - Self::GetConsensusState(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: GetLatestHeightCall) -> Self { - Self::GetLatestHeight(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: GetTimestampAtHeightCall) -> Self { - Self::GetTimestampAtHeight(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: InitializeCall) -> Self { - Self::Initialize(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: MisbehaviorCall) -> Self { - Self::Misbehavior(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: OwnerCall) -> Self { - Self::Owner(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: PausedCall) -> Self { - Self::Paused(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: ProxiableUUIDCall) -> Self { - Self::ProxiableUUID(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: RenounceOwnershipCall) -> Self { - Self::RenounceOwnership(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: TransferOwnershipCall) -> Self { - Self::TransferOwnership(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: UpdateClientCall) -> Self { - Self::UpdateClient(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: UpgradeToAndCallCall) -> Self { - Self::UpgradeToAndCall(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: VerifyMembershipCall) -> Self { - Self::VerifyMembership(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: VerifyNonMembershipCall) -> Self { - Self::VerifyNonMembership(value) - } - } - impl ::core::convert::From for CometblsClientCalls { - fn from(value: VerifyZKPCall) -> Self { - Self::VerifyZKP(value) - } - } - /// Container type for all return fields from the `UPGRADE_INTERFACE_VERSION` function with signature `UPGRADE_INTERFACE_VERSION()` and selector `0xad3cb1cc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct UpgradeInterfaceVersionReturn(pub ::std::string::String); - /// Container type for all return fields from the `createClient` function with signature `createClient(string,bytes,bytes)` and selector `0x2629636b` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CreateClientReturn { - pub client_state_commitment: [u8; 32], - pub update: ConsensusStateUpdate, - pub ok: bool, - } - /// Container type for all return fields from the `getClientState` function with signature `getClientState(string)` and selector `0x76c81c42` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetClientStateReturn(pub ::ethers::core::types::Bytes); - /// Container type for all return fields from the `getConsensusState` function with signature `getConsensusState(string,(uint64,uint64))` and selector `0x6cf44bf4` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetConsensusStateReturn(pub ::ethers::core::types::Bytes); - /// Container type for all return fields from the `getLatestHeight` function with signature `getLatestHeight(string)` and selector `0x329681d0` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetLatestHeightReturn(pub IbcCoreClientV1HeightData); - /// Container type for all return fields from the `getTimestampAtHeight` function with signature `getTimestampAtHeight(string,(uint64,uint64))` and selector `0x4b0bbdc4` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetTimestampAtHeightReturn(pub u64); - /// Container type for all return fields from the `owner` function with signature `owner()` and selector `0x8da5cb5b` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct OwnerReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `paused` function with signature `paused()` and selector `0x5c975abb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct PausedReturn(pub bool); - /// Container type for all return fields from the `proxiableUUID` function with signature `proxiableUUID()` and selector `0x52d1902d` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ProxiableUUIDReturn(pub [u8; 32]); - /// Container type for all return fields from the `updateClient` function with signature `updateClient(string,bytes)` and selector `0x6fbf8079` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct UpdateClientReturn(pub [u8; 32], pub ::std::vec::Vec); - /// Container type for all return fields from the `verifyMembership` function with signature `verifyMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes,bytes)` and selector `0xf9bb5a51` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct VerifyMembershipReturn(pub bool); - /// Container type for all return fields from the `verifyNonMembership` function with signature `verifyNonMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes)` and selector `0x999fbbb3` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct VerifyNonMembershipReturn(pub bool); - /// Container type for all return fields from the `verifyZKP` function with signature `verifyZKP(bytes,string,bytes32,(int64,(int64,int64),bytes,bytes,bytes))` and selector `0x61ce4b12` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct VerifyZKPReturn(pub bool); -} diff --git a/generated/rust/contracts/src/erc20.rs b/generated/rust/contracts/src/erc20.rs deleted file mode 100644 index 7eeafb3996..0000000000 --- a/generated/rust/contracts/src/erc20.rs +++ /dev/null @@ -1,1259 +0,0 @@ -pub use erc20::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod erc20 { - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("allowance"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("allowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("decimals"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("decimals"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("totalSupply"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("totalSupply"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("transfer"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - indexed: false, - }, - ], - anonymous: false, - },], - ), - ]), - errors: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("ERC20InsufficientAllowance"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC20InsufficientAllowance",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("allowance"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("needed"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC20InsufficientBalance"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC20InsufficientBalance",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("sender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("balance"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("needed"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC20InvalidApprover"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC20InvalidApprover",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("approver"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC20InvalidReceiver"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC20InvalidReceiver",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("receiver"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC20InvalidSender"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC20InvalidSender"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("sender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC20InvalidSpender"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC20InvalidSpender",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ]), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static ERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[cfg(feature = "providers")] - pub struct ERC20(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for ERC20 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for ERC20 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for ERC20 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for ERC20 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(ERC20)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl ERC20 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - ERC20_ABI.clone(), - client, - )) - } - /// Calls the contract's `allowance` (0xdd62ed3e) function - pub fn allowance( - &self, - owner: ::ethers::core::types::Address, - spender: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 98, 237, 62], (owner, spender)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - spender: ::ethers::core::types::Address, - value: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (spender, value)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - account: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], account) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `decimals` (0x313ce567) function - pub fn decimals(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([49, 60, 229, 103], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `name` (0x06fdde03) function - pub fn name(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `totalSupply` (0x18160ddd) function - pub fn total_supply( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 22, 13, 221], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `transfer` (0xa9059cbb) function - pub fn transfer( - &self, - to: ::ethers::core::types::Address, - value: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 5, 156, 187], (to, value)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - value: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, value)) - .expect("method not found (this should never happen)") - } - /// Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ApprovalFilter> { - self.0.event() - } - /// Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, TransferFilter> { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ERC20Events> { - self.0 - .event_with_filter(::core::default::Default::default()) - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> for ERC20 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - /// Custom Error type `ERC20InsufficientAllowance` with signature `ERC20InsufficientAllowance(address,uint256,uint256)` and selector `0xfb8f41b2` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ERC20InsufficientAllowance", - abi = "ERC20InsufficientAllowance(address,uint256,uint256)" - )] - pub struct ERC20InsufficientAllowance { - pub spender: ::ethers::core::types::Address, - pub allowance: ::ethers::core::types::U256, - pub needed: ::ethers::core::types::U256, - } - /// Custom Error type `ERC20InsufficientBalance` with signature `ERC20InsufficientBalance(address,uint256,uint256)` and selector `0xe450d38c` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ERC20InsufficientBalance", - abi = "ERC20InsufficientBalance(address,uint256,uint256)" - )] - pub struct ERC20InsufficientBalance { - pub sender: ::ethers::core::types::Address, - pub balance: ::ethers::core::types::U256, - pub needed: ::ethers::core::types::U256, - } - /// Custom Error type `ERC20InvalidApprover` with signature `ERC20InvalidApprover(address)` and selector `0xe602df05` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ERC20InvalidApprover", abi = "ERC20InvalidApprover(address)")] - pub struct ERC20InvalidApprover { - pub approver: ::ethers::core::types::Address, - } - /// Custom Error type `ERC20InvalidReceiver` with signature `ERC20InvalidReceiver(address)` and selector `0xec442f05` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ERC20InvalidReceiver", abi = "ERC20InvalidReceiver(address)")] - pub struct ERC20InvalidReceiver { - pub receiver: ::ethers::core::types::Address, - } - /// Custom Error type `ERC20InvalidSender` with signature `ERC20InvalidSender(address)` and selector `0x96c6fd1e` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ERC20InvalidSender", abi = "ERC20InvalidSender(address)")] - pub struct ERC20InvalidSender { - pub sender: ::ethers::core::types::Address, - } - /// Custom Error type `ERC20InvalidSpender` with signature `ERC20InvalidSpender(address)` and selector `0x94280d62` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ERC20InvalidSpender", abi = "ERC20InvalidSpender(address)")] - pub struct ERC20InvalidSpender { - pub spender: ::ethers::core::types::Address, - } - /// Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum ERC20Errors { - ERC20InsufficientAllowance(ERC20InsufficientAllowance), - ERC20InsufficientBalance(ERC20InsufficientBalance), - ERC20InvalidApprover(ERC20InvalidApprover), - ERC20InvalidReceiver(ERC20InvalidReceiver), - ERC20InvalidSender(ERC20InvalidSender), - ERC20InvalidSpender(ERC20InvalidSpender), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for ERC20Errors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) - { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ERC20InsufficientAllowance(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ERC20InsufficientBalance(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ERC20InvalidApprover(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ERC20InvalidReceiver(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ERC20InvalidSender(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ERC20InvalidSpender(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for ERC20Errors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::ERC20InsufficientAllowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ERC20InsufficientBalance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ERC20InvalidApprover(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ERC20InvalidReceiver(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ERC20InvalidSender(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ERC20InvalidSpender(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for ERC20Errors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for ERC20Errors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ERC20InsufficientAllowance(element) => ::core::fmt::Display::fmt(element, f), - Self::ERC20InsufficientBalance(element) => ::core::fmt::Display::fmt(element, f), - Self::ERC20InvalidApprover(element) => ::core::fmt::Display::fmt(element, f), - Self::ERC20InvalidReceiver(element) => ::core::fmt::Display::fmt(element, f), - Self::ERC20InvalidSender(element) => ::core::fmt::Display::fmt(element, f), - Self::ERC20InvalidSpender(element) => ::core::fmt::Display::fmt(element, f), - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for ERC20Errors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for ERC20Errors { - fn from(value: ERC20InsufficientAllowance) -> Self { - Self::ERC20InsufficientAllowance(value) - } - } - impl ::core::convert::From for ERC20Errors { - fn from(value: ERC20InsufficientBalance) -> Self { - Self::ERC20InsufficientBalance(value) - } - } - impl ::core::convert::From for ERC20Errors { - fn from(value: ERC20InvalidApprover) -> Self { - Self::ERC20InvalidApprover(value) - } - } - impl ::core::convert::From for ERC20Errors { - fn from(value: ERC20InvalidReceiver) -> Self { - Self::ERC20InvalidReceiver(value) - } - } - impl ::core::convert::From for ERC20Errors { - fn from(value: ERC20InvalidSender) -> Self { - Self::ERC20InvalidSender(value) - } - } - impl ::core::convert::From for ERC20Errors { - fn from(value: ERC20InvalidSpender) -> Self { - Self::ERC20InvalidSpender(value) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub spender: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - /// Container type for all of the contract's events - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum ERC20Events { - ApprovalFilter(ApprovalFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for ERC20Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(ERC20Events::ApprovalFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(ERC20Events::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for ERC20Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for ERC20Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for ERC20Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - /// Container type for all input parameters for the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "allowance", abi = "allowance(address,address)")] - pub struct AllowanceCall { - pub owner: ::ethers::core::types::Address, - pub spender: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub spender: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - /// Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub account: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "decimals", abi = "decimals()")] - pub struct DecimalsCall; - /// Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - /// Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - /// Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "totalSupply", abi = "totalSupply()")] - pub struct TotalSupplyCall; - /// Container type for all input parameters for the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "transfer", abi = "transfer(address,uint256)")] - pub struct TransferCall { - pub to: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - /// Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - /// Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum ERC20Calls { - Allowance(AllowanceCall), - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - Decimals(DecimalsCall), - Name(NameCall), - Symbol(SymbolCall), - TotalSupply(TotalSupplyCall), - Transfer(TransferCall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for ERC20Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Allowance(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Decimals(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Name(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Symbol(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::TotalSupply(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Transfer(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for ERC20Calls { - fn encode(self) -> Vec { - match self { - Self::Allowance(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Decimals(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TotalSupply(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Transfer(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TransferFrom(element) => ::ethers::core::abi::AbiEncode::encode(element), - } - } - } - impl ::core::fmt::Display for ERC20Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Allowance(element) => ::core::fmt::Display::fmt(element, f), - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::Decimals(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), - Self::Transfer(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: AllowanceCall) -> Self { - Self::Allowance(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: DecimalsCall) -> Self { - Self::Decimals(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: NameCall) -> Self { - Self::Name(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: TotalSupplyCall) -> Self { - Self::TotalSupply(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: TransferCall) -> Self { - Self::Transfer(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - /// Container type for all return fields from the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct AllowanceReturn(pub ::ethers::core::types::U256); - /// Container type for all return fields from the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ApproveReturn(pub bool); - /// Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - /// Container type for all return fields from the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct DecimalsReturn(pub u8); - /// Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NameReturn(pub ::std::string::String); - /// Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct SymbolReturn(pub ::std::string::String); - /// Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); - /// Container type for all return fields from the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TransferReturn(pub bool); - /// Container type for all return fields from the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TransferFromReturn(pub bool); -} diff --git a/generated/rust/contracts/src/glue.rs b/generated/rust/contracts/src/glue.rs deleted file mode 100644 index f807ce8e3d..0000000000 --- a/generated/rust/contracts/src/glue.rs +++ /dev/null @@ -1,1643 +0,0 @@ -pub use glue::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod glue { - pub use super::super::shared_types::*; - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("typesTelescope"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("typesTelescope"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct UnionIbcLightclientsCometblsV1ClientState.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![::ethers::core::abi::ethabi::ParamType::Bytes], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct UnionIbcLightclientsCometblsV1ConsensusState.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct UnionIbcLightclientsCometblsV1Header.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(32usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct TendermintTypesHeader.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(32usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct TendermintTypesCommit.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), - ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct OptimizedConsensusState", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct ProcessedMoment"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(32usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::String, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct TendermintTypesCanonicalVote.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ::ethers::core::abi::ethabi::ParamType::Bool, - ::ethers::core::abi::ethabi::ParamType::Bool, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcLightclientsTendermintV1ClientState.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![::ethers::core::abi::ethabi::ParamType::Bytes], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcLightclientsTendermintV1ConsensusState.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(32usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(32usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Int(64usize), - ], - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcLightclientsTendermintV1Header.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - ], - ), - ], - ), - ), - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ), - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ), - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(32usize), - ), - ), - ], - ), - ], - ), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - ], - ), - ), - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreCommitmentV1MerkleProof.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![::ethers::core::abi::ethabi::ParamType::Bytes], - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreConnectionV1ConnectionEnd.Data", - ), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, - }, - ], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static GLUE_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __BYTECODE: &[u8] = b"`\x80\x80`@R4a\0\x16Wa \x15\x90\x81a\0\x1C\x829\xF3[`\0\x80\xFD\xFE`\xA0`@R`\x046\x10\x15a\0\x12W`\0\x80\xFD[`\0\x805`\xE0\x1CcFR\xDC\x1F\x14a\0(W`\0\x80\xFD[4a\x14oWa\x02@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x14oW`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\rWa\x01\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x826\x03\x01\x12a\r\rWa\0\x9Fa\x14rV[\x90\x80`\x04\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=W`\xA0\x91a\0\xCAa\x01\x1B\x92`\x046\x91\x84\x01\x01a\x15\xA5V[\x84Ra\0\xD8`$\x82\x01a\x16\x1BV[` \x85\x01Ra\0\xE9`D\x82\x01a\x16\x1BV[`@\x85\x01Ra\0\xFA`d\x82\x01a\x16\x1BV[``\x85\x01Ra\x01\x0C6`\x84\x83\x01a\x160V[`\x80\x85\x01R`\xC46\x91\x01a\x160V[\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$5\x11a\x14oW``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`$56\x03\x01\x12a\x14oWa\x01ea\x14\xC1V[a\x01s`$5`\x04\x01a\x16\x1BV[\x81R`$\x805\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125Wa\x01\x9C\x90`\x046\x91`$5\x01\x01a\x16bV[` \x82\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`D`$5\x015\x11a\r\rW`@a\x01\xCD6`$5`D\x81\x015\x01`\x04\x01a\x15\xA5V[\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`D5\x11a\x14oW`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`D56\x03\x01\x12a\x14oWa\x02\x17a\x14\xC1V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`D5`\x04\x015\x11a\r\rW`\xC0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`D5`\x04\x015`D5\x016\x03\x01\x12a\r\rWa\x02ja\x14\xE1V[a\x02\x7F`\x04`D5\x81\x015`D5\x01\x01a\x16\x97V[\x81Ra\x02\x986`$`D5`\x04\x015`D5\x01\x01a\x16\xA5V[` \x82\x01R`d`D5`\x04\x015`D5\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=Wa\x02\xD4\x90`\x046\x91`D5\x82\x015`D5\x01\x01\x01a\x15\xA5V[`@\x82\x01R`\x84`D5`\x04\x015`D5\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=Wa\x03\x10\x90`\x046\x91`D5\x82\x015`D5\x01\x01\x01a\x15\xA5V[``\x82\x01R`\xA4`D5`\x04\x015`D5\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=Wa\x03L\x90`\x046\x91`D5\x82\x015`D5\x01\x01\x01a\x15\xA5V[`\x80\x82\x01R\x81Ra\x03b6`$`D5\x01a\x160V[` \x82\x01R`d`D5\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125Wa\x03\x91`@\x91`\x046\x91`D5\x01\x01a\x15\xA5V[\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`d5\x11a\x14oWa\x03\xB46`d5`\x04\x01a\x17\\V[Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x845\x11a\x14oWa\x03\xD56`\x845`\x04\x01a\x19-V[P`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\\6\x01\x12a\x14oWa\x04\x08a\x15\x01V[`\xA45g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x125W\x81R`\xC45\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x125W` \x01R``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x1C6\x01\x12a\x14oWa\x04ia\x14\xC1V[`\xE45g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x125W\x81Ra\x01\x045` \x82\x01R`@a\x01$5\x91\x01R`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFE\xBC6\x01\x12a\x14oWa\x04\xC3a\x15\x01V[a\x01D5\x81R` a\x01d5\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x01\x845\x11a\x14oW`\xA0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFCa\x01\x8456\x03\x01\x12a\x14oWa\x05\x1Ba\x14\xE1V[a\x01\x845`\x04\x015`\x04\x81\x10\x15a\x125W\x81Ra\x05=`$a\x01\x845\x01a\x16\x97V[` \x82\x01Ra\x05Q`Da\x01\x845\x01a\x16\x97V[`@\x82\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`da\x01\x845\x015\x11a\r\rWa\x05\x826a\x01\x845`d\x81\x015\x01`\x04\x01a\x16\xD0V[``\x82\x01R`\x84a\x01\x845\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125Wa\x05\xB3`\x80\x91`\x046\x91a\x01\x845\x01\x01a\x15\xA5V[\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x01\xA45\x11a\x14oWa\x02 \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFCa\x01\xA456\x03\x01\x12a\x14oW`@Q\x80a\x01`\x81\x01\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x01`\x83\x01\x11\x17a\x14BWa\x01`\x81\x01`@Ra\x01\xA45`\x04\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125Wa\x06H\x90`\x046\x91a\x01\xA45\x01\x01a\x15\xA5V[\x81Ra\x06Z6`$a\x01\xA45\x01a\x160V[` \x82\x01Ra\x06o6`da\x01\xA45\x01a\x1A\x94V[`@\x82\x01Ra\x06\x846`\xA4a\x01\xA45\x01a\x1A\x94V[``\x82\x01Ra\x06\x996`\xE4a\x01\xA45\x01a\x1A\x94V[`\x80\x82\x01Ra\x06\xAF6a\x01$a\x01\xA45\x01a\x160V[`\xA0\x82\x01Ra\x06\xC56a\x01da\x01\xA45\x01a\x160V[`\xC0\x82\x01Ra\x01\xA4\x805\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125W6`#\x82a\x01\xA45\x01\x01\x12\x15a\x125W`\x04\x81a\x01\xA45\x01\x015\x90a\x07\x0Ca\x07\x07\x83a\x19\x15V[a\x15aV[\x91` \x83\x82\x81R\x01\x916`$\x83`\x05\x1B\x83a\x01\xA45\x01\x01\x01\x11a\x0C9W`$\x81a\x01\xA45\x01\x01\x92[`$\x83`\x05\x1B\x83a\x01\xA45\x01\x01\x01\x84\x10a\x12=WPPPP`\xE0\x82\x01Ra\x01\xC4\x80a\x01\xA45\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=Wa\x07}\x90`\x046\x91a\x01\xA45\x01\x01a\x1B\x9EV[a\x01\0\x83\x01Ra\x01\xE4\x91a\x07\x95\x83a\x01\xA45\x01a\x1C\x14V[a\x01 \x82\x01Ra\x01@a\x07\xAEa\x02\x04a\x01\xA45\x01a\x1C\x14V[\x91\x01R5g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125W`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x826\x03\x01\x12a\x125Wa\x07\xF5a\x14\xC1V[\x90a\x08\x036\x82`\x04\x01a\x16\xA5V[\x82R`D\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x129Wa\x08)\x90`\x046\x91\x84\x01\x01a\x16bV[` \x83\x01R`d\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x129W`@\x91`\x04a\x08T\x926\x92\x01\x01a\x15\xA5V[\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x11a\r\rW`\xA0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x8256\x03\x01\x12a\r\rWa\x08\x9Ca\x15!V[\x90\x805`\x04\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x82\x845\x016\x03\x01\x12a\x0C=Wa\x08\xE9a\x15\x01V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x04\x82\x855\x01\x015\x11a\x129Wa\t\x156`\x04\x855\x84\x01\x81\x81\x015\x01\x01a\x17\\V[\x82R`$\x81\x845\x01\x015\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x0C9W`\x04a\tA\x926\x92\x865\x01\x01\x01a\x19-V[` \x82\x01R\x82Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$\x825\x015\x11a\x125Wa\tp6\x825`$\x81\x015\x01`\x04\x01a\x1C\xF1V[` \x83\x01Ra\t\x836`D\x835\x01a\x160V[`@\x83\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x84\x825\x015\x11a\x125W``\x90a\t\xB4\x906\x905`\x84\x81\x015\x01`\x04\x01a\x1C\xF1V[\x91\x01Ra\x02\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\rW` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x826\x03\x01\x12a\r\rWa\t\xFEa\x15AV[\x81`\x04\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=W6`#\x82\x85\x01\x01\x12\x15a\x0C=W`\x04\x81\x84\x01\x015a\n2a\x07\x07\x82a\x19\x15V[\x93` \x85\x83\x81R\x01\x916`$\x82`\x05\x1B\x86\x85\x01\x01\x01\x11a\r\tW\x91`$\x84\x83\x01\x01`\x80R[`$\x83`\x05\x1B\x85\x84\x01\x01\x01`\x80Q\x10a\r\x11WPPPPRa\x02$5g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\rW`\xA0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x826\x03\x01\x12a\r\rWa\n\xB6a\x14\xE1V[\x90\x80`\x04\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=Wa\n\xDB\x90`\x046\x91\x84\x01\x01a\x15\xA5V[\x82R`$\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=W6`#\x82\x84\x01\x01\x12\x15a\x0C=W`\x04\x81\x83\x01\x015\x90a\x0B\x12a\x07\x07\x83a\x19\x15V[\x91` \x83\x82\x81R\x01\x916`$\x83`\x05\x1B\x83\x88\x01\x01\x01\x11a\r\tW`$\x81\x86\x01\x01\x92[`$\x83`\x05\x1B\x83\x88\x01\x01\x01\x84\x10a\x0CAWPPPP` \x83\x01R`D\x81\x015`\x04\x81\x10\x15a\x0C=W`@\x83\x01R`d\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=W\x81\x01\x90``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x836\x03\x01\x12a\x0C=Wa\x0B\xACa\x14\xC1V[`\x04\x83\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C9Wa\x0B\xD0\x90`\x046\x91\x86\x01\x01a\x15\xA5V[\x81R`$\x83\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C9Wa\x0B\xF6\x90`\x046\x91\x86\x01\x01a\x15\xA5V[` \x82\x01R`D\x83\x015\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11a\x0C9Wa\x0C5\x94a\x0C(``\x92`\x04`\x84\x976\x92\x01\x01a\x16bV[`@\x84\x01R\x01R\x01a\x16\x1BV[P\x80\xF3[\x85\x80\xFD[\x83\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\x05W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x82\x85\x8A\x01\x016\x03\x01\x12a\r\x05Wa\x0C\x8Aa\x15\x01V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$\x82\x86\x8B\x01\x01\x015\x11a\r\x01Wa\x0C\xB86`$\x86\x8B\x01\x84\x01\x81\x81\x015\x01\x01a\x15\xA5V[\x82Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`D\x82\x86\x8B\x01\x01\x015\x11a\r\x01W`$\x92` \x92\x83\x92a\x0C\xF0\x906\x90\x88\x8D\x01\x01`D\x81\x015\x01\x87\x01a\x1B\x9EV[\x83\x82\x01R\x81R\x01\x94\x01\x93\x90Pa\x0B4V[\x89\x80\xFD[\x88\x80\xFD[\x86\x80\xFD[P\x80\xFD[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x80Q5\x11a\r\tW`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x81Q5\x86\x85\x01\x016\x03\x01\x12a\r\tWa\r]a\x15!V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$`\x80Q5\x87\x86\x01\x01\x015\x11a\x121W`\x80Qa\r\x94\x906\x90`$\x905\x88\x87\x01\x01\x81\x81\x015\x01\x01a\x1E\xA0V[\x82R`D`\x80Q5\x86\x85\x01\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\x05Wa\r\xC8\x90`$6\x91`\x80Q5\x89\x88\x01\x01\x01\x01a\x1F&V[` \x83\x01R`d`\x80Q5\x86\x85\x01\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\x05W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x82`\x80Q5\x89\x88\x01\x01\x016\x03\x01\x12a\r\x05Wa\x0E%a\x15AV[\x90`$\x81`\x80Q5\x89\x88\x01\x01\x01\x015\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x10-W6`C\x83\x83`\x80Q5\x8C\x8B\x01\x01\x01\x01\x01\x12\x15a\x10-W`$\x82\x82`\x80Q5\x8B\x8A\x01\x01\x01\x01\x015a\x0Eva\x07\x07\x82a\x19\x15V[\x92` \x84\x83\x81R\x01\x926`D\x8C\x84\x84\x8D\x88`\x05\x1B\x93`\x80Q5\x91\x01\x01\x01\x01\x01\x01\x11a\x11uW`D\x82\x82\x8D`\x80Q5\x90\x8D\x01\x01\x01\x01\x01\x93[`D\x8C\x84\x84\x8D\x88`\x05\x1B\x93`\x80Q5\x91\x01\x01\x01\x01\x01\x01\x85\x10a\x11yWPPPPP\x81R`@\x83\x01R`\x84`\x80Q5\x86\x85\x01\x01\x015\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\r\x05W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x83`\x80Q5\x89\x88\x01\x01\x016\x03\x01\x12a\r\x05Wa\x0F.a\x15\x01V[\x92`$\x83`\x80Q5\x89\x88\x01\x01\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x10-W6`C\x82\x86`\x80Q5\x8C\x8B\x01\x01\x01\x01\x01\x12\x15a\x10-W`$\x81\x85`\x80Q5\x8B\x8A\x01\x01\x01\x01\x015a\x0F~a\x07\x07\x82a\x19\x15V[\x91` \x83\x83\x81R\x01\x906`D\x8C\x83\x8A\x8D\x88`\x05\x1B\x93`\x80Q5\x91\x01\x01\x01\x01\x01\x01\x11a\x11uW`D\x81\x88\x8D`\x80Q5\x90\x8D\x01\x01\x01\x01\x01\x91[`D\x8C\x83\x8A\x8D\x88`\x05\x1B\x93`\x80Q5\x91\x01\x01\x01\x01\x01\x01\x83\x10a\x101WPPPP\x84R`D\x83`\x80Q5\x89\x88\x01\x01\x01\x015\x93g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x11a\x10-Wa\x10\x11` \x94`$\x80\x976\x92`\x80Q5\x8D\x8C\x01\x01\x01\x01\x01a\x1D\xB3V[\x81\x85\x01R``\x82\x01R\x81R`\x80\x80Q` \x01\x90R\x01\x90Pa\nWV[\x8A\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11qW\x82\x89\x8C\x8F`\x80Q5\x91\x01\x01\x01\x01\x01\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xBC\x90`@\x82\x846\x03\x01\x12a\x11lWa\x10\x87a\x15\x01V[\x92`D\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11eWa\x10\xAC\x90`D6\x91\x84\x01\x01a\x1F\x8FV[\x84R`d\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11eW``\x91\x01\x92\x836\x03\x01\x12a\x11lWa\x10\xD8a\x14\xC1V[\x92`D\x83\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11eWa\x10\xFD\x90`D6\x91\x86\x01\x01a\x15\xA5V[\x84R`d\x83\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11eWa\x11#\x90`D6\x91\x86\x01\x01a\x1F\x8FV[` \x85\x01R`\x84\x83\x015\x93g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x11a\x11eWa\x11Q` \x95\x94`D\x87\x966\x92\x01\x01a\x1F\x8FV[`@\x82\x01R\x83\x82\x01R\x81R\x01\x92\x01\x91a\x0F\xB5V[PPP\x8F\x80\xFD[P\x8F\x80\xFD[\x8F\x80\xFD[\x8D\x80\xFD[\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11qW\x83\x83\x8C\x8F`\x80Q5\x91\x01\x01\x01\x01\x01`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xBC\x826\x03\x01\x12a\x11qWa\x11\xCCa\x15\x01V[\x91`D\x82\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x12+Wa\x11\xF1\x90`D6\x91\x85\x01\x01a\x1E\xA0V[\x83R`d\x82\x015\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11a\x12+Wa\x12\x1C` \x94\x93`D\x86\x956\x92\x01\x01a\x1F&V[\x83\x82\x01R\x81R\x01\x94\x01\x93a\x0E\xADV[PP\x8F\x80\xFD[\x87\x80\xFD[\x82\x80\xFD[\x84\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x121W`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x82\x85a\x01\xA45\x01\x016\x03\x01\x12a\x121Wa\x12\x89a\x15!V[\x90`$\x81\x85a\x01\xA45\x01\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\x01Wa\x12\xBC\x90`$6\x91\x84\x88a\x01\xA45\x01\x01\x01\x01a\x1A\xBFV[\x82R`D\x81\x85a\x01\xA45\x01\x01\x015\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11a\r\x01W`\xC0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x85\x84\x88a\x01\xA45\x01\x01\x016\x03\x01\x12a\r\x01Wa\x13\x17a\x14rV[\x93g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$\x82\x85\x89a\x01\xA45\x01\x01\x01\x015\x11a\x10-Wa\x13O6`$a\x01\xA45\x89\x01\x86\x01\x84\x01\x81\x81\x015\x01\x01a\x1B@V[\x85Ra\x13f`D\x82\x85\x89a\x01\xA45\x01\x01\x01\x01a\x19\x07V[` \x86\x01Ra\x13\x80`d\x82\x85\x89a\x01\xA45\x01\x01\x01\x01a\x19\x07V[`@\x86\x01Ra\x13\x9A`\x84\x82\x85\x89a\x01\xA45\x01\x01\x01\x01a\x19\x07V[``\x86\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xA4\x82\x85\x89a\x01\xA45\x01\x01\x01\x015\x11a\x10-W`\xC4\x90a\x13\xDA6a\x01\xA45\x89\x01\x86\x01\x83\x01`\xA4\x81\x015\x01`$\x01a\x15\xA5V[`\x80\x87\x01R\x83\x87a\x01\xA45\x01\x01\x01\x015\x92`\x07\x84\x10\x15a\x10-Wa\x140`\x84` \x95\x94\x87\x87\x96`\xA0`$\x9A\x01R\x86\x85\x01Ra\x14\x1E`d\x82\x8Ba\x01\xA45\x01\x01\x01a\x19\x07V[`@\x85\x01R\x88a\x01\xA45\x01\x01\x01a\x19\x07V[``\x82\x01R\x81R\x01\x94\x01\x93\x90Pa\x074V[`$\x82\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`A`\x04R\xFD[\x80\xFD[`@Q\x90`\xC0\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`@Q\x90``\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[`@Q\x90`\xA0\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[`@Q\x90`@\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[`@Q\x90`\x80\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[`@Q\x90` \x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F`@Q\x93\x01\x16\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[\x81`\x1F\x82\x01\x12\x15a\x16\x16W\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x14\x92Wa\x15\xF3` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x85\x01\x16\x01a\x15aV[\x92\x82\x84R` \x83\x83\x01\x01\x11a\x16\x16W\x81`\0\x92` \x80\x93\x01\x83\x86\x017\x83\x01\x01R\x90V[`\0\x80\xFD[5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x16\x16WV[\x91\x90\x82`@\x91\x03\x12a\x16\x16Wa\x16[` a\x16Ia\x15\x01V[\x93a\x16S\x81a\x16\x1BV[\x85R\x01a\x16\x1BV[` \x83\x01RV[\x91\x90\x91` \x81\x84\x03\x12a\x16\x16Wa\x16wa\x15AV[\x92\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x16\x16Wa\x16\x93\x92\x01a\x15\xA5V[\x82RV[5\x90\x81`\x07\x0B\x82\x03a\x16\x16WV[\x91\x90\x82`@\x91\x03\x12a\x16\x16Wa\x16[` a\x16\xBEa\x15\x01V[\x93a\x16\xC8\x81a\x16\x97V[\x85R\x01a\x16\x97V[\x91\x90\x91`@\x81\x84\x03\x12a\x16\x16Wa\x16\xE5a\x15\x01V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x805\x83\x81\x11a\x16\x16W\x82a\x17\x05\x91\x83\x01a\x15\xA5V[\x85R` \x81\x015\x90\x83\x82\x11a\x16\x16W\x01\x90`@\x82\x82\x03\x12a\x16\x16Wa\x17(a\x15\x01V[\x92\x825c\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x16\x16W\x84R` \x83\x015\x90\x81\x11a\x16\x16Wa\x17P\x92\x01a\x15\xA5V[` \x82\x01R` \x83\x01RV[\x91\x90\x91a\x02\0\x81\x84\x03\x12a\x16\x16W`@Q\x90a\x01\xC0\x90\x81\x83\x01\x94g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x95\x84\x81\x10\x87\x82\x11\x17a\x14\x92W`@R\x83\x95a\x17\x9A\x82\x84a\x160V[\x85R`@\x83\x015\x81\x81\x11a\x16\x16W\x82a\x17\xB4\x91\x85\x01a\x15\xA5V[` \x86\x01Ra\x17\xC5``\x84\x01a\x16\x97V[`@\x86\x01Ra\x17\xD7\x82`\x80\x85\x01a\x16\xA5V[``\x86\x01R`\xC0\x83\x015\x81\x81\x11a\x16\x16W\x82a\x17\xF4\x91\x85\x01a\x16\xD0V[`\x80\x86\x01R`\xE0\x83\x015\x81\x81\x11a\x16\x16W\x82a\x18\x11\x91\x85\x01a\x15\xA5V[`\xA0\x86\x01Ra\x01\0\x80\x84\x015\x82\x81\x11a\x16\x16W\x83a\x180\x91\x86\x01a\x15\xA5V[`\xC0\x87\x01Ra\x01 \x94\x85\x85\x015\x83\x81\x11a\x16\x16W\x84a\x18P\x91\x87\x01a\x15\xA5V[`\xE0\x88\x01Ra\x01@\x91\x82\x86\x015\x84\x81\x11a\x16\x16W\x85a\x18p\x91\x88\x01a\x15\xA5V[\x90\x88\x01Ra\x01`\x95\x86\x86\x015\x84\x81\x11a\x16\x16W\x85a\x18\x8F\x91\x88\x01a\x15\xA5V[\x90\x88\x01Ra\x01\x80\x91\x82\x86\x015\x84\x81\x11a\x16\x16W\x85a\x18\xAE\x91\x88\x01a\x15\xA5V[\x90\x88\x01Ra\x01\xA0\x95\x86\x86\x015\x84\x81\x11a\x16\x16W\x85a\x18\xCD\x91\x88\x01a\x15\xA5V[\x90\x88\x01R\x84\x015\x82\x81\x11a\x16\x16W\x83a\x18\xE7\x91\x86\x01a\x15\xA5V[\x90\x86\x01Ra\x01\xE0\x83\x015\x90\x81\x11a\x16\x16Wa\x19\x02\x92\x01a\x15\xA5V[\x91\x01RV[5\x90\x81`\x03\x0B\x82\x03a\x16\x16WV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x14\x92W`\x05\x1B` \x01\x90V[\x91\x90\x91`\x80\x81\x84\x03\x12a\x16\x16Wa\x19Ba\x15!V[\x92a\x19L\x82a\x16\x97V[\x84R` \x90a\x19\\\x82\x84\x01a\x19\x07V[\x82\x86\x01R`@\x90`@\x84\x015\x93g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x85\x81\x11a\x16\x16W\x82a\x19\x86\x91\x83\x01a\x16\xD0V[`@\x88\x01R``\x90``\x81\x015\x90\x86\x82\x11a\x16\x16W\x01\x92\x82`\x1F\x85\x01\x12\x15a\x16\x16W\x835\x91a\x19\xB7a\x07\x07\x84a\x19\x15V[\x96\x86\x80\x89\x86\x81R\x01\x94`\x05\x1B\x87\x01\x01\x95\x85\x87\x11a\x16\x16W\x87\x81\x01\x94[\x87\x86\x10a\x19\xEAWPPPPPPPPP``\x83\x01RV[\x855\x83\x81\x11a\x16\x16W\x82\x01\x90`\xA0\x90\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x84\x8B\x03\x01\x12a\x16\x16Wa\x1A,a\x15!V[\x91\x8B\x84\x015`\x04\x81\x10\x15a\x16\x16W\x83R\x87\x84\x015\x86\x81\x11a\x16\x16W\x8A\x8Da\x1AU\x92\x87\x01\x01a\x15\xA5V[\x8C\x84\x01Ra\x1Ae\x8A\x88\x86\x01a\x16\xA5V[\x88\x84\x01R\x83\x015\x91\x85\x83\x11a\x16\x16Wa\x1A\x85\x8A\x8D\x80\x96\x95\x81\x96\x01\x01a\x15\xA5V[\x87\x82\x01R\x81R\x01\x95\x01\x94a\x19\xD3V[\x91\x90\x82`@\x91\x03\x12a\x16\x16Wa\x16[` a\x1A\xADa\x15\x01V[\x93a\x1A\xB7\x81a\x16\x97V[\x85R\x01a\x19\x07V[\x91\x90\x91`\xA0\x81\x84\x03\x12a\x16\x16Wa\x1A\xD4a\x14\xE1V[\x92\x815`\x07\x81\x10\x15a\x16\x16W\x84R` \x82\x015`\x07\x81\x10\x15a\x16\x16W` \x85\x01R`@\x82\x015`\x07\x81\x10\x15a\x16\x16W`@\x85\x01R``\x82\x015`\t\x81\x10\x15a\x16\x16W``\x85\x01R`\x80\x82\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x16\x16Wa\x1B9\x92\x01a\x15\xA5V[`\x80\x83\x01RV[\x90\x80`\x1F\x83\x01\x12\x15a\x16\x16W` \x90\x825a\x1B]a\x07\x07\x82a\x19\x15V[\x93` \x80\x86\x84\x81R\x01\x92`\x05\x1B\x82\x01\x01\x92\x83\x11a\x16\x16W` \x01\x90[\x82\x82\x10a\x1B\x87WPPPP\x90V[\x83\x80\x91a\x1B\x93\x84a\x19\x07V[\x81R\x01\x91\x01\x90a\x1ByV[\x81`\x1F\x82\x01\x12\x15a\x16\x16W\x805\x91` \x91a\x1B\xBBa\x07\x07\x85a\x19\x15V[\x93\x83\x80\x86\x83\x81R\x01\x91`\x05\x1B\x83\x01\x01\x92\x80\x84\x11a\x16\x16W\x84\x83\x01\x91[\x84\x83\x10a\x1B\xE7WPPPPPP\x90V[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x16\x16W\x86\x91a\x1C\t\x84\x84\x80\x94\x89\x01\x01a\x15\xA5V[\x81R\x01\x92\x01\x91a\x1B\xD7V[5\x90\x81\x15\x15\x82\x03a\x16\x16WV[\x91\x90`\x80\x83\x82\x03\x12a\x16\x16Wa\x1C5a\x15!V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x805\x82\x81\x11a\x16\x16W\x83a\x1CU\x91\x83\x01a\x15\xA5V[\x85R` \x81\x015\x82\x81\x11a\x16\x16W\x81\x01``\x81\x85\x03\x12a\x16\x16Wa\x1Cwa\x14\xC1V[\x90\x805\x84\x81\x11a\x16\x16W\x85a\x1C\x8D\x91\x83\x01a\x15\xA5V[\x82R` \x81\x015\x84\x81\x11a\x16\x16W\x85a\x1C\xA7\x91\x83\x01a\x15\xA5V[` \x83\x01R`@\x81\x015\x93\x84\x11a\x16\x16Wa\x1C\xEA\x94``\x94a\x1C\xC9\x92\x01a\x15\xA5V[`@\x82\x01R` \x86\x01Ra\x1C\xDF`@\x82\x01a\x16\x97V[`@\x86\x01R\x01a\x16\x97V[``\x83\x01RV[\x91\x90\x91``\x81\x84\x03\x12a\x16\x16Wa\x1D\x06a\x14\xC1V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x805\x83\x81\x11a\x16\x16W\x81\x01\x82`\x1F\x82\x01\x12\x15a\x16\x16W` \x90\x805a\x1D8a\x07\x07\x82a\x19\x15V[\x91\x83\x80\x84\x84\x81R\x01\x92`\x05\x1B\x82\x01\x01\x91\x86\x83\x11a\x16\x16W\x84\x82\x01\x90[\x83\x82\x10a\x1D\x8EWPPPP\x86R\x80\x82\x015\x93\x84\x11a\x16\x16Wa\x1D}`@\x93a\x1D\x87\x95\x84\x01a\x1C!V[\x90\x86\x01R\x01a\x16\x97V[`@\x83\x01RV[\x815\x89\x81\x11a\x16\x16W\x86\x91a\x1D\xA8\x8A\x84\x80\x94\x88\x01\x01a\x1C!V[\x81R\x01\x91\x01\x90a\x1DTV[\x81`\x1F\x82\x01\x12\x15a\x16\x16W\x805\x91` \x91a\x1D\xD0a\x07\x07\x85a\x19\x15V[\x93\x83\x80\x86\x83\x81R\x01\x91`\x05\x1B\x83\x01\x01\x92\x80\x84\x11a\x16\x16W\x84\x83\x01\x91[\x84\x83\x10a\x1D\xFCWPPPPPP\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x835\x81\x81\x11a\x16\x16W\x85\x01\x91``\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x85\x87\x03\x01\x12a\x16\x16Wa\x1EFa\x14\xC1V[\x90\x89\x85\x015`\x07\x81\x10\x15a\x16\x16W\x82R`@\x90\x81\x86\x015\x85\x81\x11a\x16\x16W\x87\x8Ca\x1Er\x92\x89\x01\x01a\x15\xA5V[\x8B\x84\x01R\x85\x015\x93\x84\x11a\x16\x16Wa\x1E\x91\x86\x8B\x80\x97\x96\x81\x97\x01\x01a\x15\xA5V[\x90\x82\x01R\x81R\x01\x92\x01\x91a\x1D\xECV[\x91\x90\x91`\x80\x81\x84\x03\x12a\x16\x16Wa\x1E\xB5a\x15!V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x825\x81\x81\x11a\x16\x16W\x82a\x1E\xD4\x91\x85\x01a\x15\xA5V[\x85R` \x83\x015\x81\x81\x11a\x16\x16W\x82a\x1E\xEE\x91\x85\x01a\x15\xA5V[` \x86\x01R`@\x83\x015\x81\x81\x11a\x16\x16W\x82a\x1F\x0B\x91\x85\x01a\x1A\xBFV[`@\x86\x01R``\x83\x015\x90\x81\x11a\x16\x16Wa\x1C\xEA\x92\x01a\x1D\xB3V[\x91\x90\x91``\x81\x84\x03\x12a\x16\x16Wa\x1F;a\x14\xC1V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x825\x81\x81\x11a\x16\x16W\x82a\x1FZ\x91\x85\x01a\x15\xA5V[\x85R` \x83\x015\x81\x81\x11a\x16\x16W\x82a\x1Ft\x91\x85\x01a\x1E\xA0V[` \x86\x01R`@\x83\x015\x90\x81\x11a\x16\x16Wa\x1D\x87\x92\x01a\x1E\xA0V[\x91\x90\x91`\x80\x81\x84\x03\x12a\x16\x16Wa\x1F\xA4a\x15!V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x825\x81\x81\x11a\x16\x16W\x82a\x1F\xC3\x91\x85\x01a\x15\xA5V[\x85R` \x83\x015\x81\x81\x11a\x16\x16W\x82a\x1F\xDD\x91\x85\x01a\x15\xA5V[` \x86\x01R`@\x83\x015\x81\x81\x11a\x16\x16W\x82a\x1F\xFA\x91\x85\x01a\x1A\xBFV[`@\x86\x01R``\x83\x015\x90\x81\x11a\x16\x16Wa\x1C\xEA\x92\x01a\x1B@V"; - /// The bytecode of the contract. - #[cfg(feature = "providers")] - pub static GLUE_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__BYTECODE); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __DEPLOYED_BYTECODE: &[u8] = b"`\xA0`@R`\x046\x10\x15a\0\x12W`\0\x80\xFD[`\0\x805`\xE0\x1CcFR\xDC\x1F\x14a\0(W`\0\x80\xFD[4a\x14oWa\x02@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x14oW`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\rWa\x01\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x826\x03\x01\x12a\r\rWa\0\x9Fa\x14rV[\x90\x80`\x04\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=W`\xA0\x91a\0\xCAa\x01\x1B\x92`\x046\x91\x84\x01\x01a\x15\xA5V[\x84Ra\0\xD8`$\x82\x01a\x16\x1BV[` \x85\x01Ra\0\xE9`D\x82\x01a\x16\x1BV[`@\x85\x01Ra\0\xFA`d\x82\x01a\x16\x1BV[``\x85\x01Ra\x01\x0C6`\x84\x83\x01a\x160V[`\x80\x85\x01R`\xC46\x91\x01a\x160V[\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$5\x11a\x14oW``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`$56\x03\x01\x12a\x14oWa\x01ea\x14\xC1V[a\x01s`$5`\x04\x01a\x16\x1BV[\x81R`$\x805\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125Wa\x01\x9C\x90`\x046\x91`$5\x01\x01a\x16bV[` \x82\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`D`$5\x015\x11a\r\rW`@a\x01\xCD6`$5`D\x81\x015\x01`\x04\x01a\x15\xA5V[\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`D5\x11a\x14oW`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`D56\x03\x01\x12a\x14oWa\x02\x17a\x14\xC1V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`D5`\x04\x015\x11a\r\rW`\xC0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`D5`\x04\x015`D5\x016\x03\x01\x12a\r\rWa\x02ja\x14\xE1V[a\x02\x7F`\x04`D5\x81\x015`D5\x01\x01a\x16\x97V[\x81Ra\x02\x986`$`D5`\x04\x015`D5\x01\x01a\x16\xA5V[` \x82\x01R`d`D5`\x04\x015`D5\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=Wa\x02\xD4\x90`\x046\x91`D5\x82\x015`D5\x01\x01\x01a\x15\xA5V[`@\x82\x01R`\x84`D5`\x04\x015`D5\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=Wa\x03\x10\x90`\x046\x91`D5\x82\x015`D5\x01\x01\x01a\x15\xA5V[``\x82\x01R`\xA4`D5`\x04\x015`D5\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=Wa\x03L\x90`\x046\x91`D5\x82\x015`D5\x01\x01\x01a\x15\xA5V[`\x80\x82\x01R\x81Ra\x03b6`$`D5\x01a\x160V[` \x82\x01R`d`D5\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125Wa\x03\x91`@\x91`\x046\x91`D5\x01\x01a\x15\xA5V[\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`d5\x11a\x14oWa\x03\xB46`d5`\x04\x01a\x17\\V[Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x845\x11a\x14oWa\x03\xD56`\x845`\x04\x01a\x19-V[P`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\\6\x01\x12a\x14oWa\x04\x08a\x15\x01V[`\xA45g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x125W\x81R`\xC45\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x125W` \x01R``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x1C6\x01\x12a\x14oWa\x04ia\x14\xC1V[`\xE45g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x125W\x81Ra\x01\x045` \x82\x01R`@a\x01$5\x91\x01R`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFE\xBC6\x01\x12a\x14oWa\x04\xC3a\x15\x01V[a\x01D5\x81R` a\x01d5\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x01\x845\x11a\x14oW`\xA0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFCa\x01\x8456\x03\x01\x12a\x14oWa\x05\x1Ba\x14\xE1V[a\x01\x845`\x04\x015`\x04\x81\x10\x15a\x125W\x81Ra\x05=`$a\x01\x845\x01a\x16\x97V[` \x82\x01Ra\x05Q`Da\x01\x845\x01a\x16\x97V[`@\x82\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`da\x01\x845\x015\x11a\r\rWa\x05\x826a\x01\x845`d\x81\x015\x01`\x04\x01a\x16\xD0V[``\x82\x01R`\x84a\x01\x845\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125Wa\x05\xB3`\x80\x91`\x046\x91a\x01\x845\x01\x01a\x15\xA5V[\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x01\xA45\x11a\x14oWa\x02 \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFCa\x01\xA456\x03\x01\x12a\x14oW`@Q\x80a\x01`\x81\x01\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x01`\x83\x01\x11\x17a\x14BWa\x01`\x81\x01`@Ra\x01\xA45`\x04\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125Wa\x06H\x90`\x046\x91a\x01\xA45\x01\x01a\x15\xA5V[\x81Ra\x06Z6`$a\x01\xA45\x01a\x160V[` \x82\x01Ra\x06o6`da\x01\xA45\x01a\x1A\x94V[`@\x82\x01Ra\x06\x846`\xA4a\x01\xA45\x01a\x1A\x94V[``\x82\x01Ra\x06\x996`\xE4a\x01\xA45\x01a\x1A\x94V[`\x80\x82\x01Ra\x06\xAF6a\x01$a\x01\xA45\x01a\x160V[`\xA0\x82\x01Ra\x06\xC56a\x01da\x01\xA45\x01a\x160V[`\xC0\x82\x01Ra\x01\xA4\x805\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125W6`#\x82a\x01\xA45\x01\x01\x12\x15a\x125W`\x04\x81a\x01\xA45\x01\x015\x90a\x07\x0Ca\x07\x07\x83a\x19\x15V[a\x15aV[\x91` \x83\x82\x81R\x01\x916`$\x83`\x05\x1B\x83a\x01\xA45\x01\x01\x01\x11a\x0C9W`$\x81a\x01\xA45\x01\x01\x92[`$\x83`\x05\x1B\x83a\x01\xA45\x01\x01\x01\x84\x10a\x12=WPPPP`\xE0\x82\x01Ra\x01\xC4\x80a\x01\xA45\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=Wa\x07}\x90`\x046\x91a\x01\xA45\x01\x01a\x1B\x9EV[a\x01\0\x83\x01Ra\x01\xE4\x91a\x07\x95\x83a\x01\xA45\x01a\x1C\x14V[a\x01 \x82\x01Ra\x01@a\x07\xAEa\x02\x04a\x01\xA45\x01a\x1C\x14V[\x91\x01R5g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x125W`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x826\x03\x01\x12a\x125Wa\x07\xF5a\x14\xC1V[\x90a\x08\x036\x82`\x04\x01a\x16\xA5V[\x82R`D\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x129Wa\x08)\x90`\x046\x91\x84\x01\x01a\x16bV[` \x83\x01R`d\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x129W`@\x91`\x04a\x08T\x926\x92\x01\x01a\x15\xA5V[\x91\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x11a\r\rW`\xA0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x8256\x03\x01\x12a\r\rWa\x08\x9Ca\x15!V[\x90\x805`\x04\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x82\x845\x016\x03\x01\x12a\x0C=Wa\x08\xE9a\x15\x01V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x04\x82\x855\x01\x015\x11a\x129Wa\t\x156`\x04\x855\x84\x01\x81\x81\x015\x01\x01a\x17\\V[\x82R`$\x81\x845\x01\x015\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x0C9W`\x04a\tA\x926\x92\x865\x01\x01\x01a\x19-V[` \x82\x01R\x82Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$\x825\x015\x11a\x125Wa\tp6\x825`$\x81\x015\x01`\x04\x01a\x1C\xF1V[` \x83\x01Ra\t\x836`D\x835\x01a\x160V[`@\x83\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x84\x825\x015\x11a\x125W``\x90a\t\xB4\x906\x905`\x84\x81\x015\x01`\x04\x01a\x1C\xF1V[\x91\x01Ra\x02\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\rW` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x826\x03\x01\x12a\r\rWa\t\xFEa\x15AV[\x81`\x04\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=W6`#\x82\x85\x01\x01\x12\x15a\x0C=W`\x04\x81\x84\x01\x015a\n2a\x07\x07\x82a\x19\x15V[\x93` \x85\x83\x81R\x01\x916`$\x82`\x05\x1B\x86\x85\x01\x01\x01\x11a\r\tW\x91`$\x84\x83\x01\x01`\x80R[`$\x83`\x05\x1B\x85\x84\x01\x01\x01`\x80Q\x10a\r\x11WPPPPRa\x02$5g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\rW`\xA0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x826\x03\x01\x12a\r\rWa\n\xB6a\x14\xE1V[\x90\x80`\x04\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=Wa\n\xDB\x90`\x046\x91\x84\x01\x01a\x15\xA5V[\x82R`$\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=W6`#\x82\x84\x01\x01\x12\x15a\x0C=W`\x04\x81\x83\x01\x015\x90a\x0B\x12a\x07\x07\x83a\x19\x15V[\x91` \x83\x82\x81R\x01\x916`$\x83`\x05\x1B\x83\x88\x01\x01\x01\x11a\r\tW`$\x81\x86\x01\x01\x92[`$\x83`\x05\x1B\x83\x88\x01\x01\x01\x84\x10a\x0CAWPPPP` \x83\x01R`D\x81\x015`\x04\x81\x10\x15a\x0C=W`@\x83\x01R`d\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C=W\x81\x01\x90``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x836\x03\x01\x12a\x0C=Wa\x0B\xACa\x14\xC1V[`\x04\x83\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C9Wa\x0B\xD0\x90`\x046\x91\x86\x01\x01a\x15\xA5V[\x81R`$\x83\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x0C9Wa\x0B\xF6\x90`\x046\x91\x86\x01\x01a\x15\xA5V[` \x82\x01R`D\x83\x015\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11a\x0C9Wa\x0C5\x94a\x0C(``\x92`\x04`\x84\x976\x92\x01\x01a\x16bV[`@\x84\x01R\x01R\x01a\x16\x1BV[P\x80\xF3[\x85\x80\xFD[\x83\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\x05W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x82\x85\x8A\x01\x016\x03\x01\x12a\r\x05Wa\x0C\x8Aa\x15\x01V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$\x82\x86\x8B\x01\x01\x015\x11a\r\x01Wa\x0C\xB86`$\x86\x8B\x01\x84\x01\x81\x81\x015\x01\x01a\x15\xA5V[\x82Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`D\x82\x86\x8B\x01\x01\x015\x11a\r\x01W`$\x92` \x92\x83\x92a\x0C\xF0\x906\x90\x88\x8D\x01\x01`D\x81\x015\x01\x87\x01a\x1B\x9EV[\x83\x82\x01R\x81R\x01\x94\x01\x93\x90Pa\x0B4V[\x89\x80\xFD[\x88\x80\xFD[\x86\x80\xFD[P\x80\xFD[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x80Q5\x11a\r\tW`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x81Q5\x86\x85\x01\x016\x03\x01\x12a\r\tWa\r]a\x15!V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$`\x80Q5\x87\x86\x01\x01\x015\x11a\x121W`\x80Qa\r\x94\x906\x90`$\x905\x88\x87\x01\x01\x81\x81\x015\x01\x01a\x1E\xA0V[\x82R`D`\x80Q5\x86\x85\x01\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\x05Wa\r\xC8\x90`$6\x91`\x80Q5\x89\x88\x01\x01\x01\x01a\x1F&V[` \x83\x01R`d`\x80Q5\x86\x85\x01\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\x05W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x82`\x80Q5\x89\x88\x01\x01\x016\x03\x01\x12a\r\x05Wa\x0E%a\x15AV[\x90`$\x81`\x80Q5\x89\x88\x01\x01\x01\x015\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x10-W6`C\x83\x83`\x80Q5\x8C\x8B\x01\x01\x01\x01\x01\x12\x15a\x10-W`$\x82\x82`\x80Q5\x8B\x8A\x01\x01\x01\x01\x015a\x0Eva\x07\x07\x82a\x19\x15V[\x92` \x84\x83\x81R\x01\x926`D\x8C\x84\x84\x8D\x88`\x05\x1B\x93`\x80Q5\x91\x01\x01\x01\x01\x01\x01\x11a\x11uW`D\x82\x82\x8D`\x80Q5\x90\x8D\x01\x01\x01\x01\x01\x93[`D\x8C\x84\x84\x8D\x88`\x05\x1B\x93`\x80Q5\x91\x01\x01\x01\x01\x01\x01\x85\x10a\x11yWPPPPP\x81R`@\x83\x01R`\x84`\x80Q5\x86\x85\x01\x01\x015\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\r\x05W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x83`\x80Q5\x89\x88\x01\x01\x016\x03\x01\x12a\r\x05Wa\x0F.a\x15\x01V[\x92`$\x83`\x80Q5\x89\x88\x01\x01\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x10-W6`C\x82\x86`\x80Q5\x8C\x8B\x01\x01\x01\x01\x01\x12\x15a\x10-W`$\x81\x85`\x80Q5\x8B\x8A\x01\x01\x01\x01\x015a\x0F~a\x07\x07\x82a\x19\x15V[\x91` \x83\x83\x81R\x01\x906`D\x8C\x83\x8A\x8D\x88`\x05\x1B\x93`\x80Q5\x91\x01\x01\x01\x01\x01\x01\x11a\x11uW`D\x81\x88\x8D`\x80Q5\x90\x8D\x01\x01\x01\x01\x01\x91[`D\x8C\x83\x8A\x8D\x88`\x05\x1B\x93`\x80Q5\x91\x01\x01\x01\x01\x01\x01\x83\x10a\x101WPPPP\x84R`D\x83`\x80Q5\x89\x88\x01\x01\x01\x015\x93g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x11a\x10-Wa\x10\x11` \x94`$\x80\x976\x92`\x80Q5\x8D\x8C\x01\x01\x01\x01\x01a\x1D\xB3V[\x81\x85\x01R``\x82\x01R\x81R`\x80\x80Q` \x01\x90R\x01\x90Pa\nWV[\x8A\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11qW\x82\x89\x8C\x8F`\x80Q5\x91\x01\x01\x01\x01\x01\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xBC\x90`@\x82\x846\x03\x01\x12a\x11lWa\x10\x87a\x15\x01V[\x92`D\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11eWa\x10\xAC\x90`D6\x91\x84\x01\x01a\x1F\x8FV[\x84R`d\x81\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11eW``\x91\x01\x92\x836\x03\x01\x12a\x11lWa\x10\xD8a\x14\xC1V[\x92`D\x83\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11eWa\x10\xFD\x90`D6\x91\x86\x01\x01a\x15\xA5V[\x84R`d\x83\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11eWa\x11#\x90`D6\x91\x86\x01\x01a\x1F\x8FV[` \x85\x01R`\x84\x83\x015\x93g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x11a\x11eWa\x11Q` \x95\x94`D\x87\x966\x92\x01\x01a\x1F\x8FV[`@\x82\x01R\x83\x82\x01R\x81R\x01\x92\x01\x91a\x0F\xB5V[PPP\x8F\x80\xFD[P\x8F\x80\xFD[\x8F\x80\xFD[\x8D\x80\xFD[\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x11qW\x83\x83\x8C\x8F`\x80Q5\x91\x01\x01\x01\x01\x01`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xBC\x826\x03\x01\x12a\x11qWa\x11\xCCa\x15\x01V[\x91`D\x82\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x12+Wa\x11\xF1\x90`D6\x91\x85\x01\x01a\x1E\xA0V[\x83R`d\x82\x015\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11a\x12+Wa\x12\x1C` \x94\x93`D\x86\x956\x92\x01\x01a\x1F&V[\x83\x82\x01R\x81R\x01\x94\x01\x93a\x0E\xADV[PP\x8F\x80\xFD[\x87\x80\xFD[\x82\x80\xFD[\x84\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x121W`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x82\x85a\x01\xA45\x01\x016\x03\x01\x12a\x121Wa\x12\x89a\x15!V[\x90`$\x81\x85a\x01\xA45\x01\x01\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\r\x01Wa\x12\xBC\x90`$6\x91\x84\x88a\x01\xA45\x01\x01\x01\x01a\x1A\xBFV[\x82R`D\x81\x85a\x01\xA45\x01\x01\x015\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11a\r\x01W`\xC0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC\x85\x84\x88a\x01\xA45\x01\x01\x016\x03\x01\x12a\r\x01Wa\x13\x17a\x14rV[\x93g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$\x82\x85\x89a\x01\xA45\x01\x01\x01\x015\x11a\x10-Wa\x13O6`$a\x01\xA45\x89\x01\x86\x01\x84\x01\x81\x81\x015\x01\x01a\x1B@V[\x85Ra\x13f`D\x82\x85\x89a\x01\xA45\x01\x01\x01\x01a\x19\x07V[` \x86\x01Ra\x13\x80`d\x82\x85\x89a\x01\xA45\x01\x01\x01\x01a\x19\x07V[`@\x86\x01Ra\x13\x9A`\x84\x82\x85\x89a\x01\xA45\x01\x01\x01\x01a\x19\x07V[``\x86\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xA4\x82\x85\x89a\x01\xA45\x01\x01\x01\x015\x11a\x10-W`\xC4\x90a\x13\xDA6a\x01\xA45\x89\x01\x86\x01\x83\x01`\xA4\x81\x015\x01`$\x01a\x15\xA5V[`\x80\x87\x01R\x83\x87a\x01\xA45\x01\x01\x01\x015\x92`\x07\x84\x10\x15a\x10-Wa\x140`\x84` \x95\x94\x87\x87\x96`\xA0`$\x9A\x01R\x86\x85\x01Ra\x14\x1E`d\x82\x8Ba\x01\xA45\x01\x01\x01a\x19\x07V[`@\x85\x01R\x88a\x01\xA45\x01\x01\x01a\x19\x07V[``\x82\x01R\x81R\x01\x94\x01\x93\x90Pa\x074V[`$\x82\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`A`\x04R\xFD[\x80\xFD[`@Q\x90`\xC0\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`@Q\x90``\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[`@Q\x90`\xA0\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[`@Q\x90`@\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[`@Q\x90`\x80\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[`@Q\x90` \x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F`@Q\x93\x01\x16\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x14\x92W`@RV[\x81`\x1F\x82\x01\x12\x15a\x16\x16W\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x14\x92Wa\x15\xF3` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x85\x01\x16\x01a\x15aV[\x92\x82\x84R` \x83\x83\x01\x01\x11a\x16\x16W\x81`\0\x92` \x80\x93\x01\x83\x86\x017\x83\x01\x01R\x90V[`\0\x80\xFD[5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x16\x16WV[\x91\x90\x82`@\x91\x03\x12a\x16\x16Wa\x16[` a\x16Ia\x15\x01V[\x93a\x16S\x81a\x16\x1BV[\x85R\x01a\x16\x1BV[` \x83\x01RV[\x91\x90\x91` \x81\x84\x03\x12a\x16\x16Wa\x16wa\x15AV[\x92\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x16\x16Wa\x16\x93\x92\x01a\x15\xA5V[\x82RV[5\x90\x81`\x07\x0B\x82\x03a\x16\x16WV[\x91\x90\x82`@\x91\x03\x12a\x16\x16Wa\x16[` a\x16\xBEa\x15\x01V[\x93a\x16\xC8\x81a\x16\x97V[\x85R\x01a\x16\x97V[\x91\x90\x91`@\x81\x84\x03\x12a\x16\x16Wa\x16\xE5a\x15\x01V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x805\x83\x81\x11a\x16\x16W\x82a\x17\x05\x91\x83\x01a\x15\xA5V[\x85R` \x81\x015\x90\x83\x82\x11a\x16\x16W\x01\x90`@\x82\x82\x03\x12a\x16\x16Wa\x17(a\x15\x01V[\x92\x825c\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x16\x16W\x84R` \x83\x015\x90\x81\x11a\x16\x16Wa\x17P\x92\x01a\x15\xA5V[` \x82\x01R` \x83\x01RV[\x91\x90\x91a\x02\0\x81\x84\x03\x12a\x16\x16W`@Q\x90a\x01\xC0\x90\x81\x83\x01\x94g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x95\x84\x81\x10\x87\x82\x11\x17a\x14\x92W`@R\x83\x95a\x17\x9A\x82\x84a\x160V[\x85R`@\x83\x015\x81\x81\x11a\x16\x16W\x82a\x17\xB4\x91\x85\x01a\x15\xA5V[` \x86\x01Ra\x17\xC5``\x84\x01a\x16\x97V[`@\x86\x01Ra\x17\xD7\x82`\x80\x85\x01a\x16\xA5V[``\x86\x01R`\xC0\x83\x015\x81\x81\x11a\x16\x16W\x82a\x17\xF4\x91\x85\x01a\x16\xD0V[`\x80\x86\x01R`\xE0\x83\x015\x81\x81\x11a\x16\x16W\x82a\x18\x11\x91\x85\x01a\x15\xA5V[`\xA0\x86\x01Ra\x01\0\x80\x84\x015\x82\x81\x11a\x16\x16W\x83a\x180\x91\x86\x01a\x15\xA5V[`\xC0\x87\x01Ra\x01 \x94\x85\x85\x015\x83\x81\x11a\x16\x16W\x84a\x18P\x91\x87\x01a\x15\xA5V[`\xE0\x88\x01Ra\x01@\x91\x82\x86\x015\x84\x81\x11a\x16\x16W\x85a\x18p\x91\x88\x01a\x15\xA5V[\x90\x88\x01Ra\x01`\x95\x86\x86\x015\x84\x81\x11a\x16\x16W\x85a\x18\x8F\x91\x88\x01a\x15\xA5V[\x90\x88\x01Ra\x01\x80\x91\x82\x86\x015\x84\x81\x11a\x16\x16W\x85a\x18\xAE\x91\x88\x01a\x15\xA5V[\x90\x88\x01Ra\x01\xA0\x95\x86\x86\x015\x84\x81\x11a\x16\x16W\x85a\x18\xCD\x91\x88\x01a\x15\xA5V[\x90\x88\x01R\x84\x015\x82\x81\x11a\x16\x16W\x83a\x18\xE7\x91\x86\x01a\x15\xA5V[\x90\x86\x01Ra\x01\xE0\x83\x015\x90\x81\x11a\x16\x16Wa\x19\x02\x92\x01a\x15\xA5V[\x91\x01RV[5\x90\x81`\x03\x0B\x82\x03a\x16\x16WV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x14\x92W`\x05\x1B` \x01\x90V[\x91\x90\x91`\x80\x81\x84\x03\x12a\x16\x16Wa\x19Ba\x15!V[\x92a\x19L\x82a\x16\x97V[\x84R` \x90a\x19\\\x82\x84\x01a\x19\x07V[\x82\x86\x01R`@\x90`@\x84\x015\x93g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x85\x81\x11a\x16\x16W\x82a\x19\x86\x91\x83\x01a\x16\xD0V[`@\x88\x01R``\x90``\x81\x015\x90\x86\x82\x11a\x16\x16W\x01\x92\x82`\x1F\x85\x01\x12\x15a\x16\x16W\x835\x91a\x19\xB7a\x07\x07\x84a\x19\x15V[\x96\x86\x80\x89\x86\x81R\x01\x94`\x05\x1B\x87\x01\x01\x95\x85\x87\x11a\x16\x16W\x87\x81\x01\x94[\x87\x86\x10a\x19\xEAWPPPPPPPPP``\x83\x01RV[\x855\x83\x81\x11a\x16\x16W\x82\x01\x90`\xA0\x90\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x84\x8B\x03\x01\x12a\x16\x16Wa\x1A,a\x15!V[\x91\x8B\x84\x015`\x04\x81\x10\x15a\x16\x16W\x83R\x87\x84\x015\x86\x81\x11a\x16\x16W\x8A\x8Da\x1AU\x92\x87\x01\x01a\x15\xA5V[\x8C\x84\x01Ra\x1Ae\x8A\x88\x86\x01a\x16\xA5V[\x88\x84\x01R\x83\x015\x91\x85\x83\x11a\x16\x16Wa\x1A\x85\x8A\x8D\x80\x96\x95\x81\x96\x01\x01a\x15\xA5V[\x87\x82\x01R\x81R\x01\x95\x01\x94a\x19\xD3V[\x91\x90\x82`@\x91\x03\x12a\x16\x16Wa\x16[` a\x1A\xADa\x15\x01V[\x93a\x1A\xB7\x81a\x16\x97V[\x85R\x01a\x19\x07V[\x91\x90\x91`\xA0\x81\x84\x03\x12a\x16\x16Wa\x1A\xD4a\x14\xE1V[\x92\x815`\x07\x81\x10\x15a\x16\x16W\x84R` \x82\x015`\x07\x81\x10\x15a\x16\x16W` \x85\x01R`@\x82\x015`\x07\x81\x10\x15a\x16\x16W`@\x85\x01R``\x82\x015`\t\x81\x10\x15a\x16\x16W``\x85\x01R`\x80\x82\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x16\x16Wa\x1B9\x92\x01a\x15\xA5V[`\x80\x83\x01RV[\x90\x80`\x1F\x83\x01\x12\x15a\x16\x16W` \x90\x825a\x1B]a\x07\x07\x82a\x19\x15V[\x93` \x80\x86\x84\x81R\x01\x92`\x05\x1B\x82\x01\x01\x92\x83\x11a\x16\x16W` \x01\x90[\x82\x82\x10a\x1B\x87WPPPP\x90V[\x83\x80\x91a\x1B\x93\x84a\x19\x07V[\x81R\x01\x91\x01\x90a\x1ByV[\x81`\x1F\x82\x01\x12\x15a\x16\x16W\x805\x91` \x91a\x1B\xBBa\x07\x07\x85a\x19\x15V[\x93\x83\x80\x86\x83\x81R\x01\x91`\x05\x1B\x83\x01\x01\x92\x80\x84\x11a\x16\x16W\x84\x83\x01\x91[\x84\x83\x10a\x1B\xE7WPPPPPP\x90V[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x16\x16W\x86\x91a\x1C\t\x84\x84\x80\x94\x89\x01\x01a\x15\xA5V[\x81R\x01\x92\x01\x91a\x1B\xD7V[5\x90\x81\x15\x15\x82\x03a\x16\x16WV[\x91\x90`\x80\x83\x82\x03\x12a\x16\x16Wa\x1C5a\x15!V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x805\x82\x81\x11a\x16\x16W\x83a\x1CU\x91\x83\x01a\x15\xA5V[\x85R` \x81\x015\x82\x81\x11a\x16\x16W\x81\x01``\x81\x85\x03\x12a\x16\x16Wa\x1Cwa\x14\xC1V[\x90\x805\x84\x81\x11a\x16\x16W\x85a\x1C\x8D\x91\x83\x01a\x15\xA5V[\x82R` \x81\x015\x84\x81\x11a\x16\x16W\x85a\x1C\xA7\x91\x83\x01a\x15\xA5V[` \x83\x01R`@\x81\x015\x93\x84\x11a\x16\x16Wa\x1C\xEA\x94``\x94a\x1C\xC9\x92\x01a\x15\xA5V[`@\x82\x01R` \x86\x01Ra\x1C\xDF`@\x82\x01a\x16\x97V[`@\x86\x01R\x01a\x16\x97V[``\x83\x01RV[\x91\x90\x91``\x81\x84\x03\x12a\x16\x16Wa\x1D\x06a\x14\xC1V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x805\x83\x81\x11a\x16\x16W\x81\x01\x82`\x1F\x82\x01\x12\x15a\x16\x16W` \x90\x805a\x1D8a\x07\x07\x82a\x19\x15V[\x91\x83\x80\x84\x84\x81R\x01\x92`\x05\x1B\x82\x01\x01\x91\x86\x83\x11a\x16\x16W\x84\x82\x01\x90[\x83\x82\x10a\x1D\x8EWPPPP\x86R\x80\x82\x015\x93\x84\x11a\x16\x16Wa\x1D}`@\x93a\x1D\x87\x95\x84\x01a\x1C!V[\x90\x86\x01R\x01a\x16\x97V[`@\x83\x01RV[\x815\x89\x81\x11a\x16\x16W\x86\x91a\x1D\xA8\x8A\x84\x80\x94\x88\x01\x01a\x1C!V[\x81R\x01\x91\x01\x90a\x1DTV[\x81`\x1F\x82\x01\x12\x15a\x16\x16W\x805\x91` \x91a\x1D\xD0a\x07\x07\x85a\x19\x15V[\x93\x83\x80\x86\x83\x81R\x01\x91`\x05\x1B\x83\x01\x01\x92\x80\x84\x11a\x16\x16W\x84\x83\x01\x91[\x84\x83\x10a\x1D\xFCWPPPPPP\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x835\x81\x81\x11a\x16\x16W\x85\x01\x91``\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x85\x87\x03\x01\x12a\x16\x16Wa\x1EFa\x14\xC1V[\x90\x89\x85\x015`\x07\x81\x10\x15a\x16\x16W\x82R`@\x90\x81\x86\x015\x85\x81\x11a\x16\x16W\x87\x8Ca\x1Er\x92\x89\x01\x01a\x15\xA5V[\x8B\x84\x01R\x85\x015\x93\x84\x11a\x16\x16Wa\x1E\x91\x86\x8B\x80\x97\x96\x81\x97\x01\x01a\x15\xA5V[\x90\x82\x01R\x81R\x01\x92\x01\x91a\x1D\xECV[\x91\x90\x91`\x80\x81\x84\x03\x12a\x16\x16Wa\x1E\xB5a\x15!V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x825\x81\x81\x11a\x16\x16W\x82a\x1E\xD4\x91\x85\x01a\x15\xA5V[\x85R` \x83\x015\x81\x81\x11a\x16\x16W\x82a\x1E\xEE\x91\x85\x01a\x15\xA5V[` \x86\x01R`@\x83\x015\x81\x81\x11a\x16\x16W\x82a\x1F\x0B\x91\x85\x01a\x1A\xBFV[`@\x86\x01R``\x83\x015\x90\x81\x11a\x16\x16Wa\x1C\xEA\x92\x01a\x1D\xB3V[\x91\x90\x91``\x81\x84\x03\x12a\x16\x16Wa\x1F;a\x14\xC1V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x825\x81\x81\x11a\x16\x16W\x82a\x1FZ\x91\x85\x01a\x15\xA5V[\x85R` \x83\x015\x81\x81\x11a\x16\x16W\x82a\x1Ft\x91\x85\x01a\x1E\xA0V[` \x86\x01R`@\x83\x015\x90\x81\x11a\x16\x16Wa\x1D\x87\x92\x01a\x1E\xA0V[\x91\x90\x91`\x80\x81\x84\x03\x12a\x16\x16Wa\x1F\xA4a\x15!V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x825\x81\x81\x11a\x16\x16W\x82a\x1F\xC3\x91\x85\x01a\x15\xA5V[\x85R` \x83\x015\x81\x81\x11a\x16\x16W\x82a\x1F\xDD\x91\x85\x01a\x15\xA5V[` \x86\x01R`@\x83\x015\x81\x81\x11a\x16\x16W\x82a\x1F\xFA\x91\x85\x01a\x1A\xBFV[`@\x86\x01R``\x83\x015\x90\x81\x11a\x16\x16Wa\x1C\xEA\x92\x01a\x1B@V"; - /// The deployed bytecode of the contract. - #[cfg(feature = "providers")] - pub static GLUE_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE); - #[cfg(feature = "providers")] - pub struct Glue(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for Glue { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for Glue { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for Glue { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for Glue { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(Glue)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl Glue { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - GLUE_ABI.clone(), - client, - )) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - GLUE_ABI.clone(), - GLUE_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - /// Calls the contract's `typesTelescope` (0x4652dc1f) function - pub fn types_telescope( - &self, - p0: IbcCoreConnectionV1ConnectionEndData, - p1: IbcCoreConnectionV1ConnectionEndData, - p2: IbcCoreConnectionV1ConnectionEndData, - p3: IbcCoreConnectionV1ConnectionEndData, - p4: IbcCoreConnectionV1ConnectionEndData, - p5: IbcCoreConnectionV1ConnectionEndData, - p6: IbcCoreConnectionV1ConnectionEndData, - p7: IbcCoreConnectionV1ConnectionEndData, - p8: IbcCoreConnectionV1ConnectionEndData, - p9: IbcCoreConnectionV1ConnectionEndData, - p10: IbcCoreConnectionV1ConnectionEndData, - p11: IbcCoreConnectionV1ConnectionEndData, - p12: IbcCoreConnectionV1ConnectionEndData, - p13: IbcCoreConnectionV1ConnectionEndData, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [70, 82, 220, 31], - (p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13), - ) - .expect("method not found (this should never happen)") - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> for Glue { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - /// Container type for all input parameters for the `typesTelescope` function with signature `typesTelescope((string,uint64,uint64,uint64,(uint64,uint64),(uint64,uint64)),(uint64,(bytes),bytes),((int64,(int64,int64),bytes,bytes,bytes),(uint64,uint64),bytes),((uint64,uint64),string,int64,(int64,int64),(bytes,(uint32,bytes)),bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes),(int64,int32,(bytes,(uint32,bytes)),(uint8,bytes,(int64,int64),bytes)[]),(uint64,uint64),(uint64,bytes32,bytes32),(uint256,uint256),(uint8,int64,int64,(bytes,(uint32,bytes)),string),(string,(uint64,uint64),(int64,int32),(int64,int32),(int64,int32),(uint64,uint64),(uint64,uint64),((uint8,uint8,uint8,uint8,bytes),(int32[],int32,int32,int32,bytes,uint8),int32,int32)[],string[],bool,bool),((int64,int64),(bytes),bytes),((((uint64,uint64),string,int64,(int64,int64),(bytes,(uint32,bytes)),bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes),(int64,int32,(bytes,(uint32,bytes)),(uint8,bytes,(int64,int64),bytes)[])),((bytes,(bytes,bytes,bytes),int64,int64)[],(bytes,(bytes,bytes,bytes),int64,int64),int64),(uint64,uint64),((bytes,(bytes,bytes,bytes),int64,int64)[],(bytes,(bytes,bytes,bytes),int64,int64),int64)),(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])),(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])))[]),(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[])))[],(uint8,bytes,bytes)[]))[]),(string,(string,string[])[],uint8,(string,string,(bytes)),uint64))` and selector `0x4652dc1f` - #[derive(Clone, ::ethers::contract::EthCall, ::ethers::contract::EthDisplay)] - #[ethcall( - name = "typesTelescope", - abi = "typesTelescope((string,uint64,uint64,uint64,(uint64,uint64),(uint64,uint64)),(uint64,(bytes),bytes),((int64,(int64,int64),bytes,bytes,bytes),(uint64,uint64),bytes),((uint64,uint64),string,int64,(int64,int64),(bytes,(uint32,bytes)),bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes),(int64,int32,(bytes,(uint32,bytes)),(uint8,bytes,(int64,int64),bytes)[]),(uint64,uint64),(uint64,bytes32,bytes32),(uint256,uint256),(uint8,int64,int64,(bytes,(uint32,bytes)),string),(string,(uint64,uint64),(int64,int32),(int64,int32),(int64,int32),(uint64,uint64),(uint64,uint64),((uint8,uint8,uint8,uint8,bytes),(int32[],int32,int32,int32,bytes,uint8),int32,int32)[],string[],bool,bool),((int64,int64),(bytes),bytes),((((uint64,uint64),string,int64,(int64,int64),(bytes,(uint32,bytes)),bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes),(int64,int32,(bytes,(uint32,bytes)),(uint8,bytes,(int64,int64),bytes)[])),((bytes,(bytes,bytes,bytes),int64,int64)[],(bytes,(bytes,bytes,bytes),int64,int64),int64),(uint64,uint64),((bytes,(bytes,bytes,bytes),int64,int64)[],(bytes,(bytes,bytes,bytes),int64,int64),int64)),(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])),(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])))[]),(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[])))[],(uint8,bytes,bytes)[]))[]),(string,(string,string[])[],uint8,(string,string,(bytes)),uint64))" - )] - pub struct TypesTelescopeCall( - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - pub IbcCoreConnectionV1ConnectionEndData, - ); - /// `CosmosIcs23V1BatchEntryData((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1BatchEntryData { - pub exist: CosmosIcs23V1ExistenceProofData, - pub nonexist: CosmosIcs23V1NonExistenceProofData, - } - /// `CosmosIcs23V1BatchProofData(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])))[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1BatchProofData { - pub entries: ::std::vec::Vec, - } - /// `CosmosIcs23V1CommitmentProofData((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])),(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])))[]),(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[])))[],(uint8,bytes,bytes)[]))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1CommitmentProofData { - pub exist: CosmosIcs23V1ExistenceProofData, - pub nonexist: CosmosIcs23V1NonExistenceProofData, - pub batch: CosmosIcs23V1BatchProofData, - pub compressed: CosmosIcs23V1CompressedBatchProofData, - } - /// `CosmosIcs23V1CompressedBatchEntryData((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[])))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1CompressedBatchEntryData { - pub exist: CosmosIcs23V1CompressedExistenceProofData, - pub nonexist: CosmosIcs23V1CompressedNonExistenceProofData, - } - /// `CosmosIcs23V1CompressedBatchProofData(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[])))[],(uint8,bytes,bytes)[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1CompressedBatchProofData { - pub entries: ::std::vec::Vec, - pub lookup_inners: ::std::vec::Vec, - } - /// `CosmosIcs23V1CompressedExistenceProofData(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1CompressedExistenceProofData { - pub key: ::ethers::core::types::Bytes, - pub value: ::ethers::core::types::Bytes, - pub leaf: CosmosIcs23V1LeafOpData, - pub path: ::std::vec::Vec, - } - /// `CosmosIcs23V1CompressedNonExistenceProofData(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1CompressedNonExistenceProofData { - pub key: ::ethers::core::types::Bytes, - pub left: CosmosIcs23V1CompressedExistenceProofData, - pub right: CosmosIcs23V1CompressedExistenceProofData, - } - /// `CosmosIcs23V1ExistenceProofData(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1ExistenceProofData { - pub key: ::ethers::core::types::Bytes, - pub value: ::ethers::core::types::Bytes, - pub leaf: CosmosIcs23V1LeafOpData, - pub path: ::std::vec::Vec, - } - /// `CosmosIcs23V1InnerOpData(uint8,bytes,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1InnerOpData { - pub hash: u8, - pub prefix: ::ethers::core::types::Bytes, - pub suffix: ::ethers::core::types::Bytes, - } - /// `CosmosIcs23V1InnerSpecData(int32[],int32,int32,int32,bytes,uint8)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1InnerSpecData { - pub child_order: ::std::vec::Vec, - pub child_size: i32, - pub min_prefix_length: i32, - pub max_prefix_length: i32, - pub empty_child: ::ethers::core::types::Bytes, - pub hash: u8, - } - /// `CosmosIcs23V1LeafOpData(uint8,uint8,uint8,uint8,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1LeafOpData { - pub hash: u8, - pub prehash_key: u8, - pub prehash_value: u8, - pub length: u8, - pub prefix: ::ethers::core::types::Bytes, - } - /// `CosmosIcs23V1NonExistenceProofData(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1NonExistenceProofData { - pub key: ::ethers::core::types::Bytes, - pub left: CosmosIcs23V1ExistenceProofData, - pub right: CosmosIcs23V1ExistenceProofData, - } - /// `CosmosIcs23V1ProofSpecData((uint8,uint8,uint8,uint8,bytes),(int32[],int32,int32,int32,bytes,uint8),int32,int32)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CosmosIcs23V1ProofSpecData { - pub leaf_spec: CosmosIcs23V1LeafOpData, - pub inner_spec: CosmosIcs23V1InnerSpecData, - pub max_depth: i32, - pub min_depth: i32, - } - /// `GoogleProtobufDurationData(int64,int32)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GoogleProtobufDurationData { - pub seconds: i64, - pub nanos: i32, - } - /// `IbcCoreCommitmentV1MerkleProofData(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])),(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),(uint8,bytes,bytes)[])))[]),(((bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[]),(bytes,bytes,(uint8,uint8,uint8,uint8,bytes),int32[])))[],(uint8,bytes,bytes)[]))[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct IbcCoreCommitmentV1MerkleProofData { - pub proofs: ::std::vec::Vec, - } - /// `IbcCoreCommitmentV1MerkleRootData(bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct IbcCoreCommitmentV1MerkleRootData { - pub hash: ::ethers::core::types::Bytes, - } - /// `IbcLightclientsTendermintV1ClientStateData(string,(uint64,uint64),(int64,int32),(int64,int32),(int64,int32),(uint64,uint64),(uint64,uint64),((uint8,uint8,uint8,uint8,bytes),(int32[],int32,int32,int32,bytes,uint8),int32,int32)[],string[],bool,bool)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct IbcLightclientsTendermintV1ClientStateData { - pub chain_id: ::std::string::String, - pub trust_level: IbcLightclientsTendermintV1FractionData, - pub trusting_period: GoogleProtobufDurationData, - pub unbonding_period: GoogleProtobufDurationData, - pub max_clock_drift: GoogleProtobufDurationData, - pub frozen_height: IbcCoreClientV1HeightData, - pub latest_height: IbcCoreClientV1HeightData, - pub proof_specs: ::std::vec::Vec, - pub upgrade_path: ::std::vec::Vec<::std::string::String>, - pub allow_update_after_expiry: bool, - pub allow_update_after_misbehaviour: bool, - } - /// `IbcLightclientsTendermintV1ConsensusStateData((int64,int64),(bytes),bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct IbcLightclientsTendermintV1ConsensusStateData { - pub timestamp: GoogleProtobufTimestampData, - pub root: IbcCoreCommitmentV1MerkleRootData, - pub next_validators_hash: ::ethers::core::types::Bytes, - } - /// `IbcLightclientsTendermintV1FractionData(uint64,uint64)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct IbcLightclientsTendermintV1FractionData { - pub numerator: u64, - pub denominator: u64, - } - /// `IbcLightclientsTendermintV1HeaderData((((uint64,uint64),string,int64,(int64,int64),(bytes,(uint32,bytes)),bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes),(int64,int32,(bytes,(uint32,bytes)),(uint8,bytes,(int64,int64),bytes)[])),((bytes,(bytes,bytes,bytes),int64,int64)[],(bytes,(bytes,bytes,bytes),int64,int64),int64),(uint64,uint64),((bytes,(bytes,bytes,bytes),int64,int64)[],(bytes,(bytes,bytes,bytes),int64,int64),int64))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct IbcLightclientsTendermintV1HeaderData { - pub signed_header: TendermintTypesSignedHeaderData, - pub validator_set: TendermintTypesValidatorSetData, - pub trusted_height: IbcCoreClientV1HeightData, - pub trusted_validators: TendermintTypesValidatorSetData, - } - /// `OptimizedConsensusState(uint64,bytes32,bytes32)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct OptimizedConsensusState { - pub timestamp: u64, - pub app_hash: [u8; 32], - pub next_validators_hash: [u8; 32], - } - /// `ProcessedMoment(uint256,uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ProcessedMoment { - pub timestamp: ::ethers::core::types::U256, - pub height: ::ethers::core::types::U256, - } - /// `TendermintCryptoPublicKeyData(bytes,bytes,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintCryptoPublicKeyData { - pub ed_25519: ::ethers::core::types::Bytes, - pub secp_25_6k_1: ::ethers::core::types::Bytes, - pub bn_254: ::ethers::core::types::Bytes, - } - /// `TendermintTypesBlockIDData(bytes,(uint32,bytes))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintTypesBlockIDData { - pub hash: ::ethers::core::types::Bytes, - pub part_set_header: TendermintTypesPartSetHeaderData, - } - /// `TendermintTypesCanonicalBlockIDData(bytes,(uint32,bytes))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintTypesCanonicalBlockIDData { - pub hash: ::ethers::core::types::Bytes, - pub part_set_header: TendermintTypesCanonicalPartSetHeaderData, - } - /// `TendermintTypesCanonicalPartSetHeaderData(uint32,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintTypesCanonicalPartSetHeaderData { - pub total: u32, - pub hash: ::ethers::core::types::Bytes, - } - /// `TendermintTypesCanonicalVoteData(uint8,int64,int64,(bytes,(uint32,bytes)),string)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintTypesCanonicalVoteData { - pub type_: u8, - pub height: i64, - pub round: i64, - pub block_id: TendermintTypesCanonicalBlockIDData, - pub chain_id: ::std::string::String, - } - /// `TendermintTypesCommitData(int64,int32,(bytes,(uint32,bytes)),(uint8,bytes,(int64,int64),bytes)[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintTypesCommitData { - pub height: i64, - pub round: i32, - pub block_id: TendermintTypesBlockIDData, - pub signatures: ::std::vec::Vec, - } - /// `TendermintTypesCommitSigData(uint8,bytes,(int64,int64),bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintTypesCommitSigData { - pub block_id_flag: u8, - pub validator_address: ::ethers::core::types::Bytes, - pub timestamp: GoogleProtobufTimestampData, - pub signature: ::ethers::core::types::Bytes, - } - /// `TendermintTypesHeaderData((uint64,uint64),string,int64,(int64,int64),(bytes,(uint32,bytes)),bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintTypesHeaderData { - pub version: TendermintVersionConsensusData, - pub chain_id: ::std::string::String, - pub height: i64, - pub time: GoogleProtobufTimestampData, - pub last_block_id: TendermintTypesBlockIDData, - pub last_commit_hash: ::ethers::core::types::Bytes, - pub data_hash: ::ethers::core::types::Bytes, - pub validators_hash: ::ethers::core::types::Bytes, - pub next_validators_hash: ::ethers::core::types::Bytes, - pub consensus_hash: ::ethers::core::types::Bytes, - pub app_hash: ::ethers::core::types::Bytes, - pub last_results_hash: ::ethers::core::types::Bytes, - pub evidence_hash: ::ethers::core::types::Bytes, - pub proposer_address: ::ethers::core::types::Bytes, - } - /// `TendermintTypesPartSetHeaderData(uint32,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintTypesPartSetHeaderData { - pub total: u32, - pub hash: ::ethers::core::types::Bytes, - } - /// `TendermintTypesSignedHeaderData(((uint64,uint64),string,int64,(int64,int64),(bytes,(uint32,bytes)),bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes,bytes),(int64,int32,(bytes,(uint32,bytes)),(uint8,bytes,(int64,int64),bytes)[]))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintTypesSignedHeaderData { - pub header: TendermintTypesHeaderData, - pub commit: TendermintTypesCommitData, - } - /// `Data(bytes,(bytes,bytes,bytes),int64,int64)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct Data { - pub addr: ::ethers::core::types::Bytes, - pub pub_key: TendermintCryptoPublicKeyData, - pub voting_power: i64, - pub proposer_priority: i64, - } - /// `TendermintTypesValidatorSetData((bytes,(bytes,bytes,bytes),int64,int64)[],(bytes,(bytes,bytes,bytes),int64,int64),int64)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintTypesValidatorSetData { - pub validators: ::std::vec::Vec, - pub proposer: Data, - pub total_voting_power: i64, - } - /// `TendermintVersionConsensusData(uint64,uint64)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct TendermintVersionConsensusData { - pub block: u64, - pub app: u64, - } - /// `UnionIbcLightclientsCometblsV1ClientStateData(string,uint64,uint64,uint64,(uint64,uint64),(uint64,uint64))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct UnionIbcLightclientsCometblsV1ClientStateData { - pub chain_id: ::std::string::String, - pub trusting_period: u64, - pub unbonding_period: u64, - pub max_clock_drift: u64, - pub frozen_height: IbcCoreClientV1HeightData, - pub latest_height: IbcCoreClientV1HeightData, - } - /// `UnionIbcLightclientsCometblsV1ConsensusStateData(uint64,(bytes),bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct UnionIbcLightclientsCometblsV1ConsensusStateData { - pub timestamp: u64, - pub root: IbcCoreCommitmentV1MerkleRootData, - pub next_validators_hash: ::ethers::core::types::Bytes, - } -} diff --git a/generated/rust/contracts/src/i_light_client.rs b/generated/rust/contracts/src/i_light_client.rs deleted file mode 100644 index 05a83c91de..0000000000 --- a/generated/rust/contracts/src/i_light_client.rs +++ /dev/null @@ -1,975 +0,0 @@ -pub use i_light_client::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod i_light_client { - pub use super::super::shared_types::*; - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("createClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("createClient"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientStateBytes"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("consensusStateBytes",), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientStateCommitment",), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("update"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct ConsensusStateUpdate",), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ok"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getClientState"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getClientState"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getConsensusState"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getConsensusState"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("height"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getLatestHeight"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getLatestHeight"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getTimestampAtHeight"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getTimestampAtHeight",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("height"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("updateClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("updateClient"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientMessageBytes",), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientStateCommitment",), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("updates"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize - ), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint( - 64usize - ), - ::ethers::core::abi::ethabi::ParamType::Uint( - 64usize - ), - ], - ), - ],), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct ConsensusStateUpdate[]", - ), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("verifyMembership"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("verifyMembership"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("height"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delayTimePeriod"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delayBlockPeriod"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("proof"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("prefix"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("path"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("verifyNonMembership"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("verifyNonMembership",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("height"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delayTimePeriod"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delayBlockPeriod"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("proof"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("prefix"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("path"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static ILIGHTCLIENT_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[cfg(feature = "providers")] - pub struct ILightClient(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for ILightClient { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for ILightClient { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for ILightClient { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for ILightClient { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(ILightClient)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl ILightClient { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - ILIGHTCLIENT_ABI.clone(), - client, - )) - } - /// Calls the contract's `createClient` (0x2629636b) function - pub fn create_client( - &self, - client_id: ::std::string::String, - client_state_bytes: ::ethers::core::types::Bytes, - consensus_state_bytes: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall - { - self.0 - .method_hash( - [38, 41, 99, 107], - (client_id, client_state_bytes, consensus_state_bytes), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getClientState` (0x76c81c42) function - pub fn get_client_state( - &self, - client_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([118, 200, 28, 66], client_id) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getConsensusState` (0x6cf44bf4) function - pub fn get_consensus_state( - &self, - client_id: ::std::string::String, - height: IbcCoreClientV1HeightData, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([108, 244, 75, 244], (client_id, height)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getLatestHeight` (0x329681d0) function - pub fn get_latest_height( - &self, - client_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([50, 150, 129, 208], client_id) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getTimestampAtHeight` (0x4b0bbdc4) function - pub fn get_timestamp_at_height( - &self, - client_id: ::std::string::String, - height: IbcCoreClientV1HeightData, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([75, 11, 189, 196], (client_id, height)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `updateClient` (0x6fbf8079) function - pub fn update_client( - &self, - client_id: ::std::string::String, - client_message_bytes: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall< - M, - ([u8; 32], ::std::vec::Vec), - > { - self.0 - .method_hash([111, 191, 128, 121], (client_id, client_message_bytes)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `verifyMembership` (0xf9bb5a51) function - pub fn verify_membership( - &self, - client_id: ::std::string::String, - height: IbcCoreClientV1HeightData, - delay_time_period: u64, - delay_block_period: u64, - proof: ::ethers::core::types::Bytes, - prefix: ::ethers::core::types::Bytes, - path: ::ethers::core::types::Bytes, - value: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [249, 187, 90, 81], - ( - client_id, - height, - delay_time_period, - delay_block_period, - proof, - prefix, - path, - value, - ), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `verifyNonMembership` (0x999fbbb3) function - pub fn verify_non_membership( - &self, - client_id: ::std::string::String, - height: IbcCoreClientV1HeightData, - delay_time_period: u64, - delay_block_period: u64, - proof: ::ethers::core::types::Bytes, - prefix: ::ethers::core::types::Bytes, - path: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [153, 159, 187, 179], - ( - client_id, - height, - delay_time_period, - delay_block_period, - proof, - prefix, - path, - ), - ) - .expect("method not found (this should never happen)") - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> for ILightClient { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - /// Container type for all input parameters for the `createClient` function with signature `createClient(string,bytes,bytes)` and selector `0x2629636b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "createClient", abi = "createClient(string,bytes,bytes)")] - pub struct CreateClientCall { - pub client_id: ::std::string::String, - pub client_state_bytes: ::ethers::core::types::Bytes, - pub consensus_state_bytes: ::ethers::core::types::Bytes, - } - /// Container type for all input parameters for the `getClientState` function with signature `getClientState(string)` and selector `0x76c81c42` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getClientState", abi = "getClientState(string)")] - pub struct GetClientStateCall { - pub client_id: ::std::string::String, - } - /// Container type for all input parameters for the `getConsensusState` function with signature `getConsensusState(string,(uint64,uint64))` and selector `0x6cf44bf4` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "getConsensusState", - abi = "getConsensusState(string,(uint64,uint64))" - )] - pub struct GetConsensusStateCall { - pub client_id: ::std::string::String, - pub height: IbcCoreClientV1HeightData, - } - /// Container type for all input parameters for the `getLatestHeight` function with signature `getLatestHeight(string)` and selector `0x329681d0` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getLatestHeight", abi = "getLatestHeight(string)")] - pub struct GetLatestHeightCall { - pub client_id: ::std::string::String, - } - /// Container type for all input parameters for the `getTimestampAtHeight` function with signature `getTimestampAtHeight(string,(uint64,uint64))` and selector `0x4b0bbdc4` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "getTimestampAtHeight", - abi = "getTimestampAtHeight(string,(uint64,uint64))" - )] - pub struct GetTimestampAtHeightCall { - pub client_id: ::std::string::String, - pub height: IbcCoreClientV1HeightData, - } - /// Container type for all input parameters for the `updateClient` function with signature `updateClient(string,bytes)` and selector `0x6fbf8079` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "updateClient", abi = "updateClient(string,bytes)")] - pub struct UpdateClientCall { - pub client_id: ::std::string::String, - pub client_message_bytes: ::ethers::core::types::Bytes, - } - /// Container type for all input parameters for the `verifyMembership` function with signature `verifyMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes,bytes)` and selector `0xf9bb5a51` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "verifyMembership", - abi = "verifyMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes,bytes)" - )] - pub struct VerifyMembershipCall { - pub client_id: ::std::string::String, - pub height: IbcCoreClientV1HeightData, - pub delay_time_period: u64, - pub delay_block_period: u64, - pub proof: ::ethers::core::types::Bytes, - pub prefix: ::ethers::core::types::Bytes, - pub path: ::ethers::core::types::Bytes, - pub value: ::ethers::core::types::Bytes, - } - /// Container type for all input parameters for the `verifyNonMembership` function with signature `verifyNonMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes)` and selector `0x999fbbb3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "verifyNonMembership", - abi = "verifyNonMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes)" - )] - pub struct VerifyNonMembershipCall { - pub client_id: ::std::string::String, - pub height: IbcCoreClientV1HeightData, - pub delay_time_period: u64, - pub delay_block_period: u64, - pub proof: ::ethers::core::types::Bytes, - pub prefix: ::ethers::core::types::Bytes, - pub path: ::ethers::core::types::Bytes, - } - /// Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum ILightClientCalls { - CreateClient(CreateClientCall), - GetClientState(GetClientStateCall), - GetConsensusState(GetConsensusStateCall), - GetLatestHeight(GetLatestHeightCall), - GetTimestampAtHeight(GetTimestampAtHeightCall), - UpdateClient(UpdateClientCall), - VerifyMembership(VerifyMembershipCall), - VerifyNonMembership(VerifyNonMembershipCall), - } - impl ::ethers::core::abi::AbiDecode for ILightClientCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::CreateClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetClientState(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetConsensusState(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetLatestHeight(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetTimestampAtHeight(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::UpdateClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::VerifyMembership(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::VerifyNonMembership(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for ILightClientCalls { - fn encode(self) -> Vec { - match self { - Self::CreateClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetClientState(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetConsensusState(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetLatestHeight(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetTimestampAtHeight(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UpdateClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::VerifyMembership(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::VerifyNonMembership(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for ILightClientCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::CreateClient(element) => ::core::fmt::Display::fmt(element, f), - Self::GetClientState(element) => ::core::fmt::Display::fmt(element, f), - Self::GetConsensusState(element) => ::core::fmt::Display::fmt(element, f), - Self::GetLatestHeight(element) => ::core::fmt::Display::fmt(element, f), - Self::GetTimestampAtHeight(element) => ::core::fmt::Display::fmt(element, f), - Self::UpdateClient(element) => ::core::fmt::Display::fmt(element, f), - Self::VerifyMembership(element) => ::core::fmt::Display::fmt(element, f), - Self::VerifyNonMembership(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for ILightClientCalls { - fn from(value: CreateClientCall) -> Self { - Self::CreateClient(value) - } - } - impl ::core::convert::From for ILightClientCalls { - fn from(value: GetClientStateCall) -> Self { - Self::GetClientState(value) - } - } - impl ::core::convert::From for ILightClientCalls { - fn from(value: GetConsensusStateCall) -> Self { - Self::GetConsensusState(value) - } - } - impl ::core::convert::From for ILightClientCalls { - fn from(value: GetLatestHeightCall) -> Self { - Self::GetLatestHeight(value) - } - } - impl ::core::convert::From for ILightClientCalls { - fn from(value: GetTimestampAtHeightCall) -> Self { - Self::GetTimestampAtHeight(value) - } - } - impl ::core::convert::From for ILightClientCalls { - fn from(value: UpdateClientCall) -> Self { - Self::UpdateClient(value) - } - } - impl ::core::convert::From for ILightClientCalls { - fn from(value: VerifyMembershipCall) -> Self { - Self::VerifyMembership(value) - } - } - impl ::core::convert::From for ILightClientCalls { - fn from(value: VerifyNonMembershipCall) -> Self { - Self::VerifyNonMembership(value) - } - } - /// Container type for all return fields from the `createClient` function with signature `createClient(string,bytes,bytes)` and selector `0x2629636b` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CreateClientReturn { - pub client_state_commitment: [u8; 32], - pub update: ConsensusStateUpdate, - pub ok: bool, - } - /// Container type for all return fields from the `getClientState` function with signature `getClientState(string)` and selector `0x76c81c42` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetClientStateReturn(pub ::ethers::core::types::Bytes); - /// Container type for all return fields from the `getConsensusState` function with signature `getConsensusState(string,(uint64,uint64))` and selector `0x6cf44bf4` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetConsensusStateReturn(pub ::ethers::core::types::Bytes); - /// Container type for all return fields from the `getLatestHeight` function with signature `getLatestHeight(string)` and selector `0x329681d0` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetLatestHeightReturn(pub IbcCoreClientV1HeightData); - /// Container type for all return fields from the `getTimestampAtHeight` function with signature `getTimestampAtHeight(string,(uint64,uint64))` and selector `0x4b0bbdc4` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetTimestampAtHeightReturn(pub u64); - /// Container type for all return fields from the `updateClient` function with signature `updateClient(string,bytes)` and selector `0x6fbf8079` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct UpdateClientReturn { - pub client_state_commitment: [u8; 32], - pub updates: ::std::vec::Vec, - } - /// Container type for all return fields from the `verifyMembership` function with signature `verifyMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes,bytes)` and selector `0xf9bb5a51` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct VerifyMembershipReturn(pub bool); - /// Container type for all return fields from the `verifyNonMembership` function with signature `verifyNonMembership(string,(uint64,uint64),uint64,uint64,bytes,bytes,bytes)` and selector `0x999fbbb3` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct VerifyNonMembershipReturn(pub bool); -} diff --git a/generated/rust/contracts/src/ibc_channel_handshake.rs b/generated/rust/contracts/src/ibc_channel_handshake.rs deleted file mode 100644 index 62d62ed4ae..0000000000 --- a/generated/rust/contracts/src/ibc_channel_handshake.rs +++ /dev/null @@ -1,2498 +0,0 @@ -pub use ibc_channel_handshake::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod ibc_channel_handshake { - pub use super::super::shared_types::*; - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("COMMITMENT_PREFIX"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("COMMITMENT_PREFIX"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("capabilities"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("capabilities"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelCapabilityPath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelCapabilityPath",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("portId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelCloseConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelCloseConfirm",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelCloseConfirm", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelCloseInit"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelCloseInit"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelCloseInit", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelOpenAck"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelOpenAck"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelOpenAck", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelOpenConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelOpenConfirm"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelOpenConfirm", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelOpenInit"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelOpenInit"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ::ethers::core::abi::ethabi::ParamType::String, - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelOpenInit", - ), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelOpenTry"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelOpenTry"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ::ethers::core::abi::ethabi::ParamType::String, - ],), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelOpenTry", - ), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channels"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channels"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("state"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.State", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ordering"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.Order", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterparty"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientImpls"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientImpls"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientRegistry"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientRegistry"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientTypes"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientTypes"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("commitments"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("commitments"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connections"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connections"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("client_id"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("state"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreConnectionV1GlobalEnums.State", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterparty"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes - ],), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreConnectionV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delay_period"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getClient"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("contract ILightClient"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextChannelSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextChannelSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextClientSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextClientSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextConnectionSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextConnectionSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("ChannelCloseConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ChannelCloseConfirm",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("portId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ChannelCloseInit"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ChannelCloseInit"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("portId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ChannelOpenAck"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ChannelOpenAck"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("portId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyPortId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyChannelId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("connectionId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ChannelOpenConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ChannelOpenConfirm"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("portId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyPortId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyChannelId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("connectionId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ChannelOpenInit"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ChannelOpenInit"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("portId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyPortId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("connectionId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ChannelOpenTry"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ChannelOpenTry"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("portId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyPortId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyChannelId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("connectionId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ]), - errors: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("ErrCapabilityAlreadyClaimed"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrCapabilityAlreadyClaimed",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrClientNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrClientNotFound"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrConnNotSingleHop"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrConnNotSingleHop",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrConnNotSingleVersion"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrConnNotSingleVersion",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrCounterpartyChannelNotEmpty"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrCounterpartyChannelNotEmpty",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidChannelState"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidChannelState",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidConnectionState"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidConnectionState",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidHexAddress"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidHexAddress",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidProof"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidProof"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrUnsupportedFeature"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrUnsupportedFeature",), - inputs: ::std::vec![], - },], - ), - ]), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static IBCCHANNELHANDSHAKE_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __BYTECODE: &[u8] = b"`\x80\x80`@R4a\0\x16WaB\xEC\x90\x81a\0\x1C\x829\xF3[`\0\x80\xFD\xFE`\x80`@R`\x046\x10\x15a\0\x12W`\0\x80\xFD[`\x005`\xE0\x1C\x80c%\x03WG\x14a\x01GW\x80c1\x97?\0\x14a\x01BW\x80c;\xC33\x9F\x14a\x01=W\x80cF\x80p\x86\x14a\x018W\x80cW\x17\xBC\xF5\x14a\x013W\x80c[=\xE2`\x14a\x01.W\x80cn\x92\xED\xAF\x14a\x01)W\x80c~\xB7\x892\x14a\x01$W\x80c\x83\x9D\xF9E\x14a\x01\x1FW\x80c\x86i\xFD\x15\x14a\x01\x1AW\x80c\x8Bb{\xCA\x14a\x01\x15W\x80c\x96T\x9D\x92\x14a\x01\x10W\x80c\x99\x04\x91\xA5\x14a\x01\x0BW\x80c\x99\x0C8\x88\x14a\x01\x06W\x80c\xA9U\r\xAC\x14a\x01\x01W\x80c\xC28\x01\x05\x14a\0\xFCW\x80c\xD1){\x8D\x14a\0\xF7W\x80c\xDE\xFF'\xB9\x14a\0\xF2Wc\xF5-\xED\xED\x14a\0\xEDW`\0\x80\xFD[a\x1C\xB5V[a\x19\x1DV[a\x18\xF0V[a\x18\xBEV[a\x18BV[a\x17\xD6V[a\x17\x86V[a\x16-V[a\x11,V[a\x10\xD3V[a\x10\x89V[a\x10SV[a\r\x7FV[a\x0CZV[a\x0B\xBEV[a\x0BeV[a\x0B,V[a\t\xF5V[a\x02\x1BV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x90` \x82\x82\x01\x12a\x01\x9CW`\x045\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x01\x9CW\x82``\x92\x03\x01\x12a\x01\x9CW`\x04\x01\x90V[`\0\x80\xFD[`\0[\x83\x81\x10a\x01\xB4WPP`\0\x91\x01RV[\x81\x81\x01Q\x83\x82\x01R` \x01a\x01\xA4V[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F` \x93a\x02\0\x81Q\x80\x92\x81\x87R\x87\x80\x88\x01\x91\x01a\x01\xA1V[\x01\x16\x01\x01\x90V[\x90` a\x02\x18\x92\x81\x81R\x01\x90a\x01\xC4V[\x90V[4a\x01\x9CWa\x02)6a\x01LV[` \x81\x01\x90a\x02ca\x02Ha\x02>\x84\x84a\x1E\xCCV[``\x81\x01\x90a\x1E\xFFV[a\x02]` a\x02W\x87\x87a\x1E\xCCV[\x01a\x1FSV[\x91a+\xE5V[P`\x01a\x02xa\x02s\x85\x85a\x1E\xCCV[a\x1F`V[a\x02\x81\x81a\x0C9V[\x03a\x05DWa\x02\x90\x83\x83a\x1E\xCCV[\x90a\x02\xADa\x02\xA3`@\x93\x84\x81\x01\x90a\x1FmV[` \x81\x01\x90a\x1F\xA0V[\x90Pa\x05\x1BWa\x02\xBBa-\x0FV[\x92a\x02\xEAa\x02\xC9\x86\x83a\x1E\xCCV[a\x02\xE5a\x02\xDFa\x02\xD9\x85\x80a\x1F\xA0V[\x90a\x1F\xF1V[\x87a\x08\x07V[a\"\xFBV[a\x03#a\x03\x1Da\x03\r\x86a\x03\x08a\x03\x01\x86\x80a\x1F\xA0V[6\x91a\x06\xBDV[a/rV[`\0R`\0` R`@`\0 \x90V[`\x01\x90UV[a\x03?a\x03\x1Da\x03\r\x86a\x03:a\x03\x01\x86\x80a\x1F\xA0V[a0\tV[a\x03[a\x03\x1Da\x03\r\x86a\x03Va\x03\x01\x86\x80a\x1F\xA0V[a0PV[a\x03q\x84a\x03la\x03\x01\x84\x80a\x1F\xA0V[a1_V[a\x03\x86a\x03\x81a\x03\x01\x83\x80a\x1F\xA0V[a2\x02V[\x91a\x03\xBEs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x03\xB5\x87a\x03\xB0a\x03\x01\x87\x80a\x1F\xA0V[a'JV[\x94\x16\x80\x94a2\xEBV[a\x03\xCD` a\x02W\x88\x85a\x1E\xCCV[\x92a\x03\xDBa\x02>\x88\x85a\x1E\xCCV[\x90a\x03\xE6\x85\x80a\x1F\xA0V[a\x03\xFFa\x03\xF6\x8C\x89\x9A\x94\x9Aa\x1E\xCCV[\x8A\x81\x01\x90a\x1FmV[a\x04\x16a\x04\x0C\x8D\x8Aa\x1E\xCCV[`\x80\x81\x01\x90a\x1F\xA0V[\x91a\x04\"\x8C\x8B\x01a$\xE8V[\x93\x88;\x15a\x01\x9CW\x8D\x90\x8DQ\x9C\x8D\x99\x8A\x99\x7F\xF2\xF8?z\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x8BR`\x04\x8B\x01\x99a\x04d\x9Aa&UV[\x03\x81Z`\0\x94\x85\x91\xF1\x80\x15a\x05\x16Wa\x04\xF9\x96\x7F\x96\xBE`_\xD5\x02\xB1Qa\r\xF0a\r\xFBa\r\xF6a\r\xF0\x88a'\xE5V[Pa\t4V[a3{V[\x95a\x0E4\x8Da\x0E+a\x0E\x18a\x0E\x10\x83\x80a\x1F\xA0V[\x99\x90\x93a\x1F\xA0V[\x91\x90\x92a\x0E#a\x06gV[\x996\x91a\x06\xBDV[\x88R6\x91a\x06\xBDV[` \x86\x01Ra'\xE5V[a4\xCAV[\x90a\x0Ed`\xFFa\x0EQa\x06vV[`\x04\x81R\x94[`\x08\x1C\x16` \x85\x01a'\xFFV[`@\x83\x01R``\x82\x01Ra\x0Ez`\x04\x87\x01a\t4V[`\x80\x82\x01Ra\x0E\x8C`@\x89\x01\x89a\x1F\xA0V[\x93\x90\x91a5~V[\x92a\x0E\xA1`\x01\x88\x01a\t4V[\x91a\x0E\xAE`\x02\x89\x01a\t4V[\x93``\x8B\x01\x90a6\x84V[\x15\x90V[a\x10)W\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x04\x17\x90Ua\x0F\"a\x0F\x1Ca\x0E\xFA\x84\x80a\x1F\xA0V[a\x0F\x14a\x0F\n\x86\x88\x95\x94\x95a\x1F\xA0V[\x94\x90\x926\x91a\x06\xBDV[\x926\x91a\x06\xBDV[\x90a1_V[a\x0FNa\x0F5a\x03\x81a\x03\x01\x85\x80a\x1F\xA0V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x91a\x0FY\x81\x80a\x1F\xA0V[a\x0Fc\x84\x84a\x1F\xA0V[\x95\x90\x91a\x0Fr`\xA0\x86\x01a$\xE8V[\x82;\x15a\x01\x9CW`\0\x94a\x0F\xB7\x86\x92`@Q\x9A\x8B\x97\x88\x96\x87\x95\x7F?A\xC9\xEA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R`\x04\x87\x01a(\x0BV[\x03\x92Z\xF1\x92\x83\x15a\x05\x16Wa\x0F\xFBa\x10\x04\x93a\x10\x11\x92\x7F\xF4t\xFCXP\x88@GO\xD7\x94\x07^Vu\xD2\x0B/\xDD\x9C\xA1\xD5\x85X\xBF\xF9ps\x05\xE09\xCF\x96a\x10\x16W[P\x83a\x1F\xA0V[\x93\x90\x92\x80a\x1F\xA0V[\x90`@Q\x94\x85\x94\x85a(LV[\x03\x90\xA1\0[\x80a\x05\na\x10#\x92a\x05\x9DV[8a\x0F\xF4V[`\x04`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x01\x9CW` a\x10ka\x10f6a\x07\x0FV[a(sV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x16\x81R\xF3[4a\x01\x9CW` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x9CW`\x045`\0R`\0` R` `@`\0 T`@Q\x90\x81R\xF3[4a\x01\x9CW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x9CW` `@Q\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm\x81R\xF3[4a\x01\x9CW` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x81\x816\x01\x12a\x01\x9CW`\x045\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x01\x9CW`\xE0\x83`\x04\x01\x92\x846\x03\x01\x12a\x01\x9CW`$\x83\x01\x90a\x11\xA3a\x11\x95a\x02>\x84\x86a\x1E\xCCV[a\x02]\x84a\x02W\x87\x89a\x1E\xCCV[\x92\x90\x94`\x02a\x11\xB5a\x02s\x84\x88a\x1E\xCCV[a\x11\xBE\x81a\x0C9V[\x03a\x05DWa\x11\xCD\x85\x80a\x1F\xA0V[\x94\x90a\x11\xD7a\x06gV[\x956\x90a\x11\xE3\x92a\x06\xBDV[\x85Ra\x11\xEDa\x18/V[\x84\x86\x01R\x83a\x11\xFC\x84\x88a\x1E\xCCV[\x01a\x12\x06\x90a\x1FSV[\x90a\x12\x11\x84\x88a\x1E\xCCV[``\x81\x01a\x12\x1E\x91a\x1E\xFFV[a\x12'\x91a(\xC6V[6\x90a\x122\x92a\x06\xBDV[a\x12;\x90a4\xCAV[\x91`D\x84\x01\x92a\x12K\x84\x8Aa\x1F\xA0V[\x90\x91a\x12Ua\x06vV[`\x01\x81R\x93a\x12f\x90\x85\x8B\x01a'\xFFV[`@\x99\x8A\x85\x01R``\x84\x01R6\x90a\x12}\x92a\x06\xBDV[`\x80\x82\x01Ra\x12\x8F`d\x85\x01\x89a\x1F\xA0V[\x91a\x12\x9A\x87\x8Ba\x1E\xCCV[\x89\x81\x01a\x12\xA6\x91a\x1FmV[\x80a\x12\xB0\x91a\x1F\xA0V[\x93\x90\x91a\x12\xBD\x89\x8Da\x1E\xCCV[\x8B\x81\x01a\x12\xC9\x91a\x1FmV[\x8A\x81\x01a\x12\xD5\x91a\x1F\xA0V[\x93\x90\x91a\x12\xE1\x90a5~V[\x956\x90a\x12\xED\x92a\x06\xBDV[\x926\x90a\x12\xF9\x92a\x06\xBDV[\x92`\x84\x88\x01a\x13\x07\x96a6\x84V[\x15a\x16\x04W\x84\x95\x96a\x13\x17a-\x0FV[\x96\x87\x91\x89a\x13%\x81\x80a\x1F\xA0V[\x93\x90\x92\x86a\x133\x8A\x85a\x1E\xCCV[\x83\x81\x01a\x13?\x91a\x1FmV[\x80a\x13I\x91a\x1F\xA0V[a\x13U\x8C\x87\x93\x97a\x1E\xCCV[\x85\x81\x01a\x13a\x91a\x1FmV[\x8D\x81\x01a\x13m\x91a\x1F\xA0V[\x93a\x13x\x91\x93a\x1F\xA0V[\x96\x90\x95Q\x99\x8A\x99a\x13\x89\x99\x8Ba(\xDAV[\x03\x7F\x9CZv\xE8\xBD\xDB.\\#\x8E5\xB7\xCEz\x85\n\xD2*wdy\xBF\xC8\xB4\xAF^\x88\xE0s\xFA\x9Cp\x91\xA1a\x13\xB7\x83\x88a\x1E\xCCV[a\x13\xC1\x88\x80a\x1F\xA0V[a\x13\xCA\x91a\x1F\xF1V[a\x13\xD4\x90\x88a\x08\x07V[\x90a\x13\xDE\x91a\"\xFBV[\x85a\x13\xE9\x88\x80a\x1F\xA0V[6\x90a\x13\xF4\x92a\x06\xBDV[\x90a\x13\xFE\x91a/rV[a\x14\x12\x90`\0R`\0` R`@`\0 \x90V[`\x01\x90U\x85a\x14!\x88\x80a\x1F\xA0V[6\x90a\x14,\x92a\x06\xBDV[\x90a\x146\x91a0\tV[a\x14J\x90`\0R`\0` R`@`\0 \x90V[`\x01\x90U\x85a\x14Y\x88\x80a\x1F\xA0V[6\x90a\x14d\x92a\x06\xBDV[\x90a\x14n\x91a0PV[a\x14\x82\x90`\0R`\0` R`@`\0 \x90V[`\x01\x90U\x85a\x14\x91\x88\x80a\x1F\xA0V[6\x90a\x14\x9C\x92a\x06\xBDV[\x90a\x14\xA6\x91a1_V[a\x14\xB0\x87\x80a\x1F\xA0V[6\x90a\x14\xBB\x92a\x06\xBDV[a\x14\xC4\x90a2\x02V[\x93\x86a\x14\xD0\x89\x80a\x1F\xA0V[6\x90a\x14\xDB\x92a\x06\xBDV[\x90a\x14\xE5\x91a'JV[\x94s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x94\x85a\x15\x07\x91a2\xEBV[a\x15\x11\x84\x89a\x1E\xCCV[\x01a\x15\x1B\x90a\x1FSV[\x90a\x15&\x84\x89a\x1E\xCCV[``\x81\x01a\x153\x91a\x1E\xFFV[\x94\x90\x93a\x15@\x8A\x80a\x1F\xA0V[\x93\x90\x9Aa\x15M\x84\x82a\x1E\xCCV[\x8A\x81\x01a\x15Y\x91a\x1FmV[\x93a\x15d\x90\x82a\x1E\xCCV[`\x80\x81\x01a\x15q\x91a\x1F\xA0V[\x92a\x15|\x91\x92a\x1F\xA0V[\x94\x90\x93`\xC4\x01a\x15\x8B\x90a$\xE8V[\x95\x8A;\x15a\x01\x9CW\x8C\x90\x8CQ\x9E\x8F\x9B\x8C\x9B\x7F!\x8D\x1E>\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x8DR`\x04\x8D\x01\x9Ba\x15\xCD\x9Ca)KV[\x03\x81Z`\0\x94\x85\x91\xF1\x92\x83\x15a\x05\x16Wa\x04\xF9\x93a\x15\xF1W[PQ\x91\x82\x91\x82a\x02\x07V[\x80a\x05\na\x15\xFE\x92a\x05\x9DV[8a\x15\xE6V[`\x04\x85Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x01\x9CWa\x16;6a\x01LV[a\x16Ha\x02\xD9\x82\x80a\x1F\xA0V[a\x16Z` \x83\x01\x91a\r\xAC\x83\x85a\x1F\xA0V[`\x03a\x16g\x82T`\xFF\x16\x90V[a\x16p\x81a\x0C9V[\x03a\x05DW\x80a\x16\x8Ba\r\xF6a\r\xF0`\x03a\x16\xB7\x95\x01a'\xE5V[P`\x04\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[a\x16\xC7a\x0F\x1Ca\x0E\xFA\x84\x80a\x1F\xA0V[a\x16\xDAa\x0F5a\x03\x81a\x03\x01\x85\x80a\x1F\xA0V[\x91a\x16\xE5\x81\x80a\x1F\xA0V[a\x16\xEF\x84\x84a\x1F\xA0V[\x95\x90\x91a\x16\xFE`@\x86\x01a$\xE8V[\x82;\x15a\x01\x9CW`\0\x94a\x17C\x86\x92`@Q\x9A\x8B\x97\x88\x96\x87\x95\x7Fu8\xEDh\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R`\x04\x87\x01a(\x0BV[\x03\x92Z\xF1\x92\x83\x15a\x05\x16Wa\x0F\xFBa\x10\x04\x93a\x10\x11\x92\x7F\x1CHi\xAAT\xEA\xF3\xD7\x93{b>\x04\x12\x80\xEF\xC3 \xF6\xC8\x03(\n\x84\x8E\x13\x98\x8BL\xFC2Z\x96a\x10\x16WP\x83a\x1F\xA0V[4a\x01\x9CW` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x17\xC2\x82a\x17\xAF6a\x07\x0FV[\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x01\xA1V[\x81\x01`\x01\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[4a\x01\x9CW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x9CW` `@Q\x7F\x9B\x98 Hj\x05\xC0\x19>\xFB!Ll+\xA8\xFC\xE0,Z\\\x84\xAA\x05\x7F\x81\x99\xC9\x9F\x13\xFF\x93\x9B\x81R\xF3[`@Q\x90a\x18<\x82a\x05\xD2V[`\0\x82RV[4a\x01\x9CW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x9CWa\x04\xF9`@Qa\x18\x80\x81a\x05\xEEV[`\x03\x81R\x7Fibc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R`@Q\x91\x82\x91` \x83R` \x83\x01\x90a\x01\xC4V[4a\x01\x9CWa\x04\xF9a\tpa\x0BFa\x18\xDA` a\x17\xAF6a\x07\x0FV[\x81\x01`\x02\x81R\x03\x01\x90 `@Q\x92\x83\x80\x92a\x08\x80V[4a\x01\x9CW` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x0B\xEBa\x19\x186a\x07\x0FV[a\x07\xE1V[4a\x01\x9CW\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC` \x816\x01\x12a\x01\x9CW`\x04\x90\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x01\x9CWa\x01\0\x81\x84\x01\x92\x826\x03\x01\x12a\x01\x9CWa\x19~a\x02\xD9\x83\x80a\x1F\xA0V[\x90a\x19\x91`$\x82\x01\x92a\r\xAC\x84\x86a\x1F\xA0V[\x91\x82T\x93`\x01`\xFF\x86\x16a\x19\xA4\x81a\x0C9V[\x03a\x1C\x8CWa\x19\xB3\x81\x80a\x1F\xA0V[\x94\x90\x95a\x19\xC0\x84\x84a\x1F\xA0V[\x97\x90`\x01\x84\x01\x97\x88\x92`d\x89\x01\x9Aa\x19\xD8\x8C\x89a\x1F\xA0V[\x90`\x03\x89\x01\x9Ca\x19\xE7\x8Ea'\xE5V[P\x93`@Q\x97\x88\x97a\x19\xF9\x97\x89a*]V[\x03\x7F\xE94%w\xBF\x02\xF7H\xBAx>\xDD\x90\x94\xF8\xE9;.\xF7\xFA\xCE\x9B\xC7G\x8D{05\x8D\xDE\xEFo\x91\xA1a\x1A&\x87a'\xE5V[Pa\x1A0\x90a\t4V[a\x1A9\x90a3{V[\x91a\x1AD\x85\x80a\x1F\xA0V[\x98\x90a\x1AP\x88\x88a\x1F\xA0V[\x90\x91a\x1AZa\x06gV[\x9B6\x90a\x1Af\x92a\x06\xBDV[\x8BR6\x90a\x1As\x92a\x06\xBDV[` \x8A\x01Ra\x1A\x81\x90a'\xE5V[Pa\x1A\x8B\x90a\t4V[a\x1A\x94\x90a4\xCAV[\x97`D\x88\x01\x98a\x1A\xA4\x8A\x88a\x1F\xA0V[\x91\x90\x92a\x1A\xAFa\x06vV[`\x02\x81R\x94`\x08\x1C`\xFF\x16` \x86\x01\x90a\x1A\xC8\x91a'\xFFV[`@\x85\x01R``\x84\x01R6\x90a\x1A\xDD\x92a\x06\xBDV[`\x80\x82\x01Ra\x1A\xEF`\x84\x88\x01\x86a\x1F\xA0V[a\x1A\xFC\x8B\x88\x94\x93\x94a\x1F\xA0V[\x92a\x1B\x06\x90a5~V[\x94a\x1B\x10\x90a\t4V[\x926\x90a\x1B\x1C\x92a\x06\xBDV[\x92`\xA4\x8A\x01a\x1B*\x96a6\x84V[\x15a\x1CcW\x95a\x1B\x93`\x02\x88a\x1Bja\x1B\xE5\x98\x99\x9A`\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[a\x1B\x80a\x1Bw\x8A\x87a\x1F\xA0V[\x90\x86\x84\x01a \xB6V[a\x1B\x8A\x8A\x86a\x1F\xA0V[\x92\x90\x91\x01a \xB6V[a\x1B\xB3a\x0F\x1Ca\x1B\xA3\x84\x80a\x1F\xA0V[a\x0F\x14a\x0F\n\x88\x88\x95\x94\x95a\x1F\xA0V[a\x1B\xEEa\x1B\xC9a\x0F5a\x03\x81a\x03\x01\x86\x80a\x1F\xA0V[\x94`\xE4a\x1B\xFFa\x1B\xF6a\x1B\xDC\x87\x80a\x1F\xA0V[\x9A\x90\x98\x88a\x1F\xA0V[\x95\x90\x9C\x88a\x1F\xA0V[\x9B\x90\x97a\x1F\xA0V[\x92\x90\x93\x01a$\xE8V[\x91\x87;\x15a\x01\x9CW`\0\x99\x8A\x96a\x1CD\x95`@Q\x9D\x8E\x9C\x8D\x9B\x8C\x9A\x7F`\xCAV\xEB\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x8CR\x8B\x01a*\xBBV[\x03\x92Z\xF1\x80\x15a\x05\x16Wa\x1CTW\0[\x80a\x05\na\x1Ca\x92a\x05\x9DV[\0[\x86`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x85`@Q\x7F\x96\xD0\x91F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x01\x9CWa\x1C\xC36a\r/V[a\x1C\xD0a\x02\xD9\x82\x80a\x1F\xA0V[a\x1C\xE2` \x83\x01\x91a\r\xAC\x83\x85a\x1F\xA0V[\x91\x82T`\x02`\xFF\x82\x16a\x1C\xF4\x81a\x0C9V[\x03a\x05DWa\x0E\xB9\x84a\x1Dg`\x03a\x1D\xE6a\x1D\xFD\x95\x7F\xCC\xCByTO*\x91\x0E\xCD\x04\xC3\xBD\x96\xF8p\xBEo\\t\xE0\xD0\x0C\x18D<%\xEC\xF7\xB9\x80\t\x18a\x1D4\x89\x80a\x1F\xA0V[\x90a\x1D?\x8C\x8Ca\x1F\xA0V[\x97\x90`\x01\x8A\x01\x99\x8A`\x02\x82\x01\x99\x8A\x92\x01\x9Aa\x1DY\x8Ca'\xE5V[P\x93`@Q\x97\x88\x97\x88a+!V[\x03\x90\xA1\x88a\x1D\x98a\x0E>a\r\xF0a\x1D\x83a\r\xF6a\r\xF0\x8Aa'\xE5V[\x97a\x0E4\x8Da\x0E+a\x0E\x18a\x0E\x10\x83\x80a\x1F\xA0V[\x90a\x1D\xB0`\xFFa\x1D\xA6a\x06vV[`\x03\x81R\x94a\x0EWV[`@\x83\x01R``\x82\x01Ra\x1D\xC6`\x04\x8B\x01a\t4V[`\x80\x82\x01Ra\x1D\xF2a\x1D\xECa\x1D\xDE`@\x8B\x01\x8Ba\x1F\xA0V[\x94\x90\x93a5~V[\x96a\t4V[\x93a\t4V[\x93``\x89\x01\x90a6\x84V[a\x10)Wa\x1E2`\xA0\x93`\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[a\x1ERa\x0F\x1Ca\x1EB\x83\x80a\x1F\xA0V[a\x0F\x14a\x0F\n\x87\x87\x95\x94\x95a\x1F\xA0V[a\x1Eea\x0F5a\x03\x81a\x03\x01\x84\x80a\x1F\xA0V[a\x1E~a\x1E\x87a\x1Eu\x84\x80a\x1F\xA0V[\x92\x90\x95\x85a\x1F\xA0V[\x96\x90\x94\x01a$\xE8V[\x82;\x15a\x01\x9CW`\0\x94a\x1CD\x86\x92`@Q\x98\x89\x97\x88\x96\x87\x95\x7F\xF8(\x8C\xC6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R`\x04\x87\x01a(\x0BV[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x816\x03\x01\x82\x12\x15a\x01\x9CW\x01\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x01\x9CW\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x01\x9CW` \x01\x91\x81`\x05\x1B6\x03\x83\x13a\x01\x9CWV[5`\x03\x81\x10\x15a\x01\x9CW\x90V[5`\x05\x81\x10\x15a\x01\x9CW\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC1\x816\x03\x01\x82\x12\x15a\x01\x9CW\x01\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x01\x9CW\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x01\x9CW` \x01\x91\x816\x03\x83\x13a\x01\x9CWV[` \x90\x82`@Q\x93\x84\x92\x837\x81\x01`\x05\x81R\x03\x01\x90 \x90V[` \x91\x92\x83`@Q\x94\x85\x93\x847\x82\x01\x90\x81R\x03\x01\x90 \x90V[\x90`\x05\x81\x10\x15a\t\xF0W`\xFF\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83T\x16\x91\x16\x17\x90UV[\x81\x81\x10a eWPPV[`\0\x81U`\x01\x01a ZV[\x91\x90`\x1F\x81\x11a \x80WPPPV[a\x06t\x92`\0R` `\0 \x90` `\x1F\x84\x01`\x05\x1C\x83\x01\x93\x10a \xACW[`\x1F\x01`\x05\x1C\x01\x90a ZV[\x90\x91P\x81\x90a \x9FV[\x90\x92\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x05\xB1Wa \xDC\x81a \xD6\x84Ta\x08-V[\x84a qV[`\0`\x1F\x82\x11`\x01\x14a!:W\x81\x90a!+\x93\x94\x95`\0\x92a!/W[PP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x90UV[\x015\x90P8\x80a \xF9V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x16\x94a!m\x84`\0R` `\0 \x90V[\x91\x80[\x87\x81\x10a!\xC6WP\x83`\x01\x95\x96\x97\x10a!\x8EW[PPP\x81\x1B\x01\x90UV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U8\x80\x80a!\x84V[\x90\x92` `\x01\x81\x92\x86\x86\x015\x81U\x01\x94\x01\x91\x01a!pV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[h\x01\0\0\0\0\0\0\0\0\x83\x11a\x05\xB1W\x80T\x83\x82U\x80\x84\x10a\"uW[P\x90a\"<\x81\x92`\0R` `\0 \x90V[\x90`\0\x92[\x84\x84\x10a\"OWPPPPPV[`\x01` \x82a\"ia\"b\x84\x95\x87a\x1F\xA0V[\x90\x88a \xB6V[\x01\x93\x01\x93\x01\x92\x91a\"AV[`\0\x82`\0R\x84` `\0 \x92\x83\x01\x92\x01[\x82\x81\x10a\"\x95WPPa\"*V[\x80a\"\xA2`\x01\x92Ta\x08-V[\x80a\"\xAFW[P\x01a\"\x87V[`\x1F\x90\x81\x81\x11\x84\x14a\"\xC7WPP\x82\x81U[8a\"\xA8V[\x83a\"\xE9\x92a\"\xDB\x85`\0R` `\0 \x90V[\x92\x01`\x05\x1C\x82\x01\x91\x01a ZV[`\0\x81\x81R` \x81 \x81\x83UUa\"\xC1V[\x90a#\x0Ea#\x08\x82a\x1F`V[\x83a #V[` a#\x1C` \x83\x01a\x1FSV[`\x03\x81\x10\x15a\t\xF0W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\xFFa\xFF\0\x85T\x92`\x08\x1B\x16\x91\x16\x17\x83U`\x01\x80\x84\x01\x90a#h`@\x85\x01\x85a\x1FmV[\x92a#s\x84\x80a\x1F\xA0V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11a\x05\xB1Wa#\x97\x84a#\x91\x87Ta\x08-V[\x87a qV[`\0\x92`\x1F\x85\x11`\x01\x14a$)WPPa\x06t\x96\x94a\x1B\x8A\x94a#\xF9\x85`\x04\x99\x96a$\x0F\x96a$\x05\x96`\0\x92a!/WPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x90U` \x81\x01\x90a\x1F\xA0V[\x90`\x02\x86\x01a \xB6V[a\x04\x0Ca$\x1F``\x83\x01\x83a\x1E\xFFV[\x90`\x03\x86\x01a\"\rV[\x92\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x85\x16\x90a$^\x87`\0R` `\0 \x90V[\x94\x83\x91[\x83\x83\x10a$\xD1WPPP\x94`\x01\x85a$\x0F\x95a$\x05\x95a\x06t\x9C\x9A\x95`\x04\x9C\x99a\x1B\x8A\x9B\x10a$\x99W[PPP\x81\x1B\x01\x90Ua\x02\xA3V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U8\x80\x80a$\x8CV[\x85\x85\x015\x87U\x95\x86\x01\x95\x93\x81\x01\x93\x91\x81\x01\x91a$bV[5s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x01\x9CW\x90V[`\x1F\x82` \x94\x93\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x81\x86R\x86\x86\x017`\0\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x90V[\x905\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x826\x03\x01\x81\x12\x15a\x01\x9CW\x01` \x815\x91\x01\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x01\x9CW\x816\x03\x83\x13a\x01\x9CWV[\x90\x82\x81\x81R` \x80\x91\x01\x93` \x83`\x05\x1B\x82\x01\x01\x94\x84`\0\x92[\x85\x84\x10a%\xC3WPPPPPPP\x90V[\x90\x91\x92\x93\x94\x95\x96\x85\x80a&\t\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x86`\x01\x96\x03\x01\x88Ra&\x03\x8C\x88a%HV[\x90a%\tV[\x99\x01\x94\x01\x94\x01\x92\x95\x94\x93\x91\x90a%\xB2V[a\x02\x18\x91a&Ga&=\x90\xFD[\x96\x94a' a\x02\x18\x99\x97\x94a'\x12a'<\x97\x94a'.\x96`\xA0\x8DR`\xA0\x8D\x01\x91a%\tV[\x90\x8A\x82\x03` \x8C\x01Ra\x01\xC4V[\x91\x88\x83\x03`@\x8A\x01Ra%\tV[\x90\x85\x82\x03``\x87\x01Ra\x01\xC4V[\x92`\x80\x81\x85\x03\x91\x01Ra%\tV[`!a\x06t\x91\x93\x92\x93`@Q\x94\x81a'l\x87\x93Q\x80\x92` \x80\x87\x01\x91\x01a\x01\xA1V[\x82\x01\x7F/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01Ra'\xA7\x82Q\x80\x93` \x87\x85\x01\x91\x01a\x01\xA1V[\x01\x03`\x01\x81\x01\x85R\x01\x83a\x06&V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[\x80T\x15a'\xFAW`\0R` `\0 \x90`\0\x90V[a'\xB6V[`\x03\x82\x10\x15a\t\xF0WRV[\x93\x92`@\x93a(>a&\xDA\x93s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x95\x99\x98\x99``\x89R``\x89\x01\x91a%\tV[\x91\x86\x83\x03` \x88\x01Ra%\tV[\x92\x90a(e\x90a\x02\x18\x95\x93`@\x86R`@\x86\x01\x91a%\tV[\x92` \x81\x85\x03\x91\x01Ra%\tV[a(\x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91a\x07\xE1V[T\x16\x80\x15a(\x9CW\x90V[`\x04`@Q\x7F\xB6\xC7\x1F}\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90\x15a'\xFAW\x80a(\xD6\x91a\x1F\xA0V[\x90\x91V[\x98\x96\x91\x93a\x02\x18\x9A\x98\x95a)\x13a)=\x98\x95a)\x05a)!\x95a)/\x99\x8F`\xC0\x90\x81\x81R\x01\x91a%\tV[\x8D\x81\x03` \x8F\x01R\x90a\x01\xC4V[\x91\x8B\x83\x03`@\x8D\x01Ra%\tV[\x91\x88\x83\x03``\x8A\x01Ra%\tV[\x90\x85\x82\x03`\x80\x87\x01Ra\x01\xC4V[\x92`\xA0\x81\x85\x03\x91\x01Ra%\tV[\x9A\x95a)\xBD\x90a)\xAF\x9D\x9E\x9D\x8Da)\xD9\x98a&\xDA\x9C\x98`\xE0\x9F\x9C\x96s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x9F\x99\x98a)\xCB\x99a)\xA1\x92a)\x93\x87a\x01\0\x92a\x0CMV[\x80` \x88\x01R\x86\x01\x91a%\x98V[\x92`@\x81\x85\x03\x91\x01Ra%\tV[\x8D\x81\x03``\x8F\x01R\x90a\x01\xC4V[\x90\x8B\x82\x03`\x80\x8D\x01Ra&\x1AV[\x91\x89\x83\x03`\xA0\x8B\x01Ra%\tV[\x91\x86\x83\x03`\xC0\x88\x01Ra%\tV[\x80T`\0\x93\x92a)\xF6\x82a\x08-V[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a\x08\xF7WP`\x01\x14a*\x1CWPPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a*IWPPPP\x01\x01\x908\x80\x80\x80\x80a\x08\xAFV[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a*1V[\x96\x92a*\x91\x90a\x02\x18\x99\x97\x95a*\x83a*\xAD\x98\x94a*\x9F\x96`\xA0\x8DR`\xA0\x8D\x01\x91a%\tV[\x91\x8A\x83\x03` \x8C\x01Ra%\tV[\x90\x87\x82\x03`@\x89\x01Ra)\xE7V[\x91\x85\x83\x03``\x87\x01Ra%\tV[\x91`\x80\x81\x84\x03\x91\x01Ra)\xE7V[\x97\x92\x95a+\x05s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x97`\x80\x99\x96a*\xF7a&\xDA\x99\x95\x9D\x9E\x9Da+\x13\x97`\xA0\x8F\x81\x81R\x01\x91a%\tV[\x8C\x81\x03` \x8E\x01R\x91a%\tV[\x91\x89\x83\x03`@\x8B\x01Ra%\tV[\x91\x86\x83\x03``\x88\x01Ra%\tV[\x95\x92a+T\x90a*\xAD\x95a+Fa\x02\x18\x9A\x98\x94a+b\x96`\xA0\x8CR`\xA0\x8C\x01\x91a%\tV[\x91\x89\x83\x03` \x8B\x01Ra%\tV[\x90\x86\x82\x03`@\x88\x01Ra)\xE7V[\x90\x84\x82\x03``\x86\x01Ra)\xE7V[`@Q\x90a+}\x82a\x06\nV[`\0`\x80\x83``\x80\x82R\x80` \x83\x01R\x83`@\x83\x01R`@Q\x90a+\xA0\x82a\x05\xB6V[\x80\x82R\x80` \x83\x01R`@Qa+\xB5\x81a\x05\xD2V[\x81\x81R`@\x83\x01R\x82\x01R\x01RV[\x80Q\x15a'\xFAW` \x01\x90V[\x80Q\x82\x10\x15a'\xFAW` \x91`\x05\x1B\x01\x01\x90V[\x92\x91\x92a+\xF0a+pV[P`\x01\x82\x03a,\x9BWa,\x06\x91a\x03\x01\x91a(\xC6V[a,\x0F\x81a3{V[\x92` \x84\x01`\x01\x81QQ\x03a,qWa,?\x91a,9a,2a\x0E\xB9\x93Qa+\xC4V[Q\x91a7\xF7V[\x90a8\xBBV[a,GW\x91\x90V[`\x04`@Q\x7F]\x19\x1F\xAE\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xCCo\xEF$\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xD47z\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90`\x01\x82\x01\x80\x92\x11a,\xD3WV[a!\xDEV[`\x01\x01\x90\x81`\x01\x11a,\xD3WV[\x90` \x82\x01\x80\x92\x11a,\xD3WV[` \x01\x90\x81` \x11a,\xD3WV[\x91\x90\x82\x01\x80\x92\x11a,\xD3WV[\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm`\0R`\0` R`@`\0 T\x80\x80`\0\x91z\x18O\x03\xE9?\xF9\xF4\xDA\xA7\x97\xEDn8\xEDd\xBFj\x1F\x01\0\0\0\0\0\0\0\0\x80\x82\x10\x15a/dW[Pm\x04\xEE-mA[\x85\xAC\xEF\x81\0\0\0\0\x80\x83\x10\x15a/UW[Pf#\x86\xF2o\xC1\0\0\x80\x83\x10\x15a/FW[Pc\x05\xF5\xE1\0\x80\x83\x10\x15a/7W[Pa'\x10\x80\x83\x10\x15a/(W[P`d\x82\x10\x15a/\x18W[`\n\x80\x92\x10\x15a/\x0EW[`\x01\x90\x81`!a-\xD7`\x01\x87\x01a5/V[\x95\x86\x01\x01\x90[a.\xADW[PPPPa..\x91a.Za._\x92`@Q\x94\x85\x91a.(` \x84\x01`\x08\x90\x7Fchannel-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\x01\x90V[\x90a\x07XV[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x85R\x84a\x06&V[a,\xC5V[\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm`\0\x90\x81R` R\x7F\xA9H\xE2\x9A\xC0\xE6\xA6\xA5\xE3\xC6G\xA0z\x05\x05\x17\x0C\x97-\xD4\x96\x0C\xBE\x19J\xEEwbk\xB5+XU\x90V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x91\x01\x91\x7F0123456789abcdef\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\x82\x06\x1A\x83S\x04\x91\x82\x15a/\tW\x91\x90\x82a-\xDDV[a-\xE2V[\x91`\x01\x01\x91a-\xC5V[\x91\x90`d`\x02\x91\x04\x91\x01\x91a-\xBAV[`\x04\x91\x93\x92\x04\x91\x01\x918a-\xAFV[`\x08\x91\x93\x92\x04\x91\x01\x918a-\xA2V[`\x10\x91\x93\x92\x04\x91\x01\x918a-\x93V[` \x91\x93\x92\x04\x91\x01\x918a-\x81V[`@\x93P\x81\x04\x91P8a-hV[\x90a0\x03`A`@Q\x80\x93` \x82\x01\x95\x7FnextSequenceSend/ports/\0\0\0\0\0\0\0\0\0\x87Ra/\xB9\x81Q\x80\x92` `7\x87\x01\x91\x01a\x01\xA1V[\x82\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`7\x82\x01Ra/\xF4\x82Q\x80\x93` \x87\x85\x01\x91\x01a\x01\xA1V[\x01\x03`!\x81\x01\x84R\x01\x82a\x06&V[Q\x90 \x90V[\x90a0\x03`A`@Q\x80\x93` \x82\x01\x95\x7FnextSequenceRecv/ports/\0\0\0\0\0\0\0\0\0\x87Ra/\xB9\x81Q\x80\x92` `7\x87\x01\x91\x01a\x01\xA1V[\x90a0\x03`@\x80Q\x80\x93` \x82\x01\x95\x7FnextSequenceAck/ports/\0\0\0\0\0\0\0\0\0\0\x87Ra0\x96\x81Q\x80\x92` `6\x87\x01\x91\x01a\x01\xA1V[\x82\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`6\x82\x01Ra0\xD1\x82Q\x80\x93` \x87\x85\x01\x91\x01a\x01\xA1V[\x01\x03` \x81\x01\x84R\x01\x82a\x06&V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x05\xB1W`\x05\x1B` \x01\x90V[\x90\x81Ta1\x04\x81a0\xE0V[\x92`@\x93a1\x15`@Q\x91\x82a\x06&V[\x82\x81R\x80\x94` \x80\x92\x01\x92`\0R` `\0 \x90`\0\x93[\x85\x85\x10a1\xEC\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04\x82\x10\x15a\t\xF0WRV[a3\x8D\x90a3\x87a+pV[Pa\x07oV[`@\x80Q\x91a3\x9B\x83a\x06\nV[\x81Qa3\xAB\x81a\tp\x81\x85a\x08\x80V[\x83R`\x01\x80\x82\x01\x90\x81Ta3\xBE\x81a0\xE0V[\x92a3\xCB\x86Q\x94\x85a\x06&V[\x81\x84R`\0\x90\x81R` \x80\x82 \x81\x86\x01[\x84\x84\x10a4\x8BWPPPPPP\x90`\x03\x91` \x85\x01Ra4Fa45`\x06a4\x08`\x02\x85\x01T`\xFF\x16\x90V[\x93a4\x16\x87\x89\x01\x95\x86a3oV[a4!\x86\x82\x01a\tOV[``\x89\x01R\x01Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x86\x01RV[Qa4P\x81a\t\xE6V[a4Y\x81a\t\xE6V[\x03a4bWP\x90V[`\x04\x90Q\x7F\x8C\xA9\x89\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x02\x83\x87\x92\x8BQa4\x9B\x81a\x05\xEEV[\x8CQa4\xAB\x81a\tp\x81\x8Aa\x08\x80V[\x81Ra4\xB8\x85\x87\x01a0\xF8V[\x83\x82\x01R\x81R\x01\x92\x01\x93\x01\x92\x90a3\xDCV[`@Q\x90a4\xD7\x82a\x05\xEEV[`\x01\x82R` `\0[\x81\x81\x10a5 WPPa5\x07`\x04a4\xFAa\tp\x93a\x07oV[\x01`@Q\x92\x83\x80\x92a\x08\x80V[\x81Q\x15a'\xFAW` \x82\x01Ra5\x1C\x81a+\xC4V[P\x90V[``\x84\x82\x01\x83\x01R\x81\x01a4\xE0V[\x90a59\x82a\x06\x83V[a5F`@Q\x91\x82a\x06&V[\x82\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a5t\x82\x94a\x06\x83V[\x01\x90` 6\x91\x017V[\x90a5\xEEa5\xD6a5\xB1a5\xACa5\xA7a5\xA1\x87Qa5\x9C\x81a\x0C9V[a>\xAFV[`\x03\x0B\x90V[a?$V[a,\xD8V[a5\xD0a5\xACa5\xA7a5\xA1` \x89\x01Qa5\xCB\x81a\x0CCV[a?KV[\x90a-\x02V[a5\xD0a5\xACa5\xE9`@\x87\x01Qa?\x86V[a?\xC6V[`\0\x90[``\x84\x01Q\x80Q\x83\x10\x15a6%W`\x01\x91a5\xD0a5\xACa6\x16\x86a6\x1D\x95a+\xD1V[QQa?\xC6V[\x91\x01\x90a5\xF2V[Pa6R\x91Pa6Fa6K\x91\x94\x93\x94a5\xD0a5\xAC`\x80\x87\x01QQa?\xC6V[a5/V[\x80\x92a9\x82V[\x81R\x90V[\x90\x81` \x91\x03\x12a\x01\x9CWQ\x80\x15\x15\x81\x03a\x01\x9CW\x90V[5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x01\x9CWV[\x92\x90\x93\x94\x95\x91\x95\x83Qa6\x96\x90a(sV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x95\x84Q\x94``\x01Q`@\x01QQ\x91a6\xC3\x91a:\xE8V[\x90`@Q\x97\x88\x96\x87\x96\x7F\xF9\xBBZQ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x88R`\x04\x88\x01a\x01 \x90Ra\x01$\x88\x01a7\x06\x91a\x01\xC4V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81a7\x1B\x82a6oV[\x16`$\x8A\x01R` \x01a7-\x90a6oV[\x16`D\x88\x01R`d\x87\x01`\0\x90R`\x84\x87\x01`\0\x90R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x94\x85\x88\x83\x03\x01`\xA4\x89\x01Ra7x\x92a%\tV[\x83\x86\x82\x03\x01`\xC4\x87\x01Ra7\x8B\x91a\x01\xC4V[\x82\x85\x82\x03\x01`\xE4\x86\x01Ra7\x9E\x91a\x01\xC4V[\x90\x83\x82\x03\x01a\x01\x04\x84\x01Ra7\xB2\x91a\x01\xC4V[\x03\x81Z` \x94`\0\x91\xF1\x90\x81\x15a\x05\x16W`\0\x91a7\xCEWP\x90V[a\x02\x18\x91P` =` \x11a7\xF0W[a7\xE8\x81\x83a\x06&V[\x81\x01\x90a6WV[P=a7\xDEV[`\x03\x81\x10\x15a\t\xF0W`\x01\x81\x03a8BWP`@Qa8\x15\x81a\x05\xEEV[`\x0F\x81R\x7FORDER_UNORDERED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R\x90V[`\x02\x03a8\x82W`@Qa8U\x81a\x05\xEEV[`\r\x81R\x7FORDER_ORDERED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R\x90V[`@Qa8\x8E\x81a\x05\xEEV[`\x0F\x81R\x7F_ORDER_INVALID_\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R\x90V[\x90\x80Q` \x80\x92\x01 \x90`\0[\x81\x84\x01Q\x80Q\x82\x10\x15a8\xFDWa8\xE0\x82\x85\x92a+\xD1V[Q\x83\x81Q\x91\x01 \x14a8\xF4W`\x01\x01a8\xC8V[PPPP`\x01\x90V[PPPPP`\0\x90V[\x90a9\x11\x91a:\xE8V[` \x81Q\x91\x01 \x90V[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x01\x91\x82\x11a,\xD3WV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x01\x91\x82\x11a,\xD3WV[\x91\x90\x82\x03\x91\x82\x11a,\xD3WV[\x91\x90\x91` \x90`\0\x91\x81Qa9\x96\x81a\x0C9V[a9\x9F\x81a\x0C9V[a:\xB2W[a9\xD4a9\xE3\x91\x86` \x85\x01\x80Qa9\xBB\x81a\x0CCV[a9\xC4\x81a\x0CCV[a:\x80W[Pa5\xD0\x90\x82aA|V[a5\xD0\x86\x82`@\x86\x01Qa?\xF0V[\x91``\x82\x01\x90\x81QQa:/W[PP`\x80\x01\x80QQ\x92\x93a\x02\x18\x93a:\x0BW[PPa9\x1BV[\x80a: \x84a5\xD0a5\xD0\x94a:(\x97aA\x96V[\x80\x93QaB\x9FV[8\x80a:\x04V[\x91\x93\x90\x92[\x83QQ\x83\x10\x15a:oWa:ga:Q\x82a5\xD0\x89`\x01\x95aA\x89V[a5\xD0\x88\x82a:a\x88\x8AQa+\xD1V[QaB\x9FV[\x92\x01\x91a:4V[\x90\x93\x90\x92P\x90P`\x80a\x02\x18a9\xF1V[\x81a5\xD0\x91a:\x99\x85a5\xD0a:\xA6\x96a:\xAB\x98aAoV[\x93\x84\x91Qa5\xCB\x81a\x0CCV[a?\xDBV[\x868a9\xC9V[Pa9\xE3a9\xD4a:\xE0a:\xCDa:\xC8\x88aA7V[a,\xF4V[a5\xD0\x88\x82a:\xA6\x88Qa5\x9C\x81a\x0C9V[\x91PPa9\xA4V[`\xB8\x81a\x0C9V[\x80\x15a?\x1EWa>\xC7\x81a\x0C9V[`\x01\x81\x14a?\x18Wa>\xD8\x81a\x0C9V[`\x02\x81\x14a?\x12Wa>\xE9\x81a\x0C9V[`\x03\x81\x14a?\x0CW\x80a>\xFD`\x04\x92a\x0C9V[\x14a?\x07W`\0\x80\xFD[`\x04\x90V[P`\x03\x90V[P`\x02\x90V[P`\x01\x90V[P`\0\x90V[`\0\x81`\x07\x0B\x12`\0\x14a?8WP`\n\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x02\x18\x91\x16aA\x15V[`\x03\x81\x10\x15a\t\xF0W\x80\x15a?\x1EWa?c\x81a\x0CCV[`\x01\x81\x14a?\x18W\x80a?w`\x02\x92a\x0CCV[\x14a?\x81W`\0\x80\xFD[`\x02\x90V[a?\x91\x81QQa?\xC6V[\x80`\x01\x01\x91\x82`\x01\x11a,\xD3W` a?\xAC\x91\x01QQa?\xC6V[\x80`\x01\x01`\x01\x11a,\xD3W`\x02\x91\x01\x01\x80\x91\x11a,\xD3W\x90V[a?\xCF\x81aA\x15V[\x81\x01\x80\x91\x11a,\xD3W\x90V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x02\x18\x93\x92\x16aA\xBFV[\x91a?\xFDa6F\x84a?\x86V[\x92` \x90\x80QQa@\x82W[a@\\a\x02\x18\x95a@a\x94a@1a@V\x95` a@P\x96\x01\x84\x81QQa@fWPPa9\x1BV[\x94\x85\x92a@Ha@B\x84\x8B\x87aA\xBFV[\x8Aa-\x02V[\x95\x86\x91a,\xE6V[\x92a-\x02V[\x90aB\nV[a-\x02V[a9uV[\x80a: \x84a5\xD0a5\xD0\x94a@{\x97aA\xB2V[8\x84a:\x04V[a@\x8B\x85aA\xA3V[\x91\x82\x81\x01\x92\x83\x82\x11a,\xD3W\x82Q\x90\x81Q\x91a@\xA8\x89\x87\x85aA\xBFV[\x93`\0\x90\x80\x86`\0\x95\x01\x8C\x01\x01\x92\x01\x91[\x84\x84\x10a@\xFFWPPP\x90P\x81\x01\x80\x91\x11a,\xD3Wa\x02\x18\x95a@a\x94a@1a@P\x94` a@\xEFa@\\\x96a@V\x99a-\x02V[\x97PP\x94PP\x94P\x95PPa@\tV[\x82Q\x82\x1A\x81S`\x01\x93\x84\x01\x93\x92\x83\x01\x92\x01a@\xB9V[`\x01\x80\x91`\x07\x90`\x07\x1C\x80[aA+WPPP\x90V[\x92\x82\x01\x92\x81\x1C\x80aA!V[`\x08\x90`\0\x90` \x01\x82[`\x07\x1C\x92\x83\x15aAeW`\x80\x17\x81S`\x01\x80\x91\x01\x91\x01`\x7F\x83\x16\x92\x91\x90\x91aABV[\x90`\x01\x93PS\x01\x90V[`\0\x91\x82\x91\x01`\x10aAeV[`\0\x91\x82\x91\x01`\x1AaAeV[`\0\x91\x82\x91\x01`\"aAeV[`\0\x91\x82\x91\x01`*aAeV[`\0\x90\x81\x90` \x01`\naAeV[`\0\x91\x82\x91\x01`\x12aAeV[`\x7F\x93\x92`\0\x92\x85\x83\x16\x92\x91\x01\x90[`\x07\x1C\x91\x82\x15aA\xEFW`\x80\x17\x81S`\x01\x92\x83\x01\x92\x85\x83\x16\x92\x91\x01\x90aA\xCEV[\x91P`\x01\x93\x94PS\x01\x90V[`\x1F\x81\x11a,\xD3Wa\x01\0\n\x90V[\x91\x92\x90\x83\x15aB\x99W\x92\x91[` \x93\x84\x84\x11\x15aBjW\x81Q\x81R\x84\x81\x01\x80\x91\x11a,\xD3W\x93\x81\x01\x80\x91\x11a,\xD3W\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x90\x81\x11a,\xD3W\x91aB\x16V[\x92\x90\x91\x93P` \x03` \x81\x11a,\xD3WaB\x86aB\x8B\x91aA\xFBV[a9HV[\x90Q\x82Q\x82\x16\x91\x19\x16\x17\x90RV[P\x91PPV[\x90\x81Q\x91aB\xAE\x84\x83\x85aA\xBFV[\x93` `\0\x91\x86`\0\x95\x01\x01\x92\x01\x91[\x84\x84\x10aB\xD6WPPP\x90P\x81\x01\x80\x91\x11a,\xD3W\x90V[\x82Q\x82\x1A\x81S`\x01\x93\x84\x01\x93\x92\x83\x01\x92\x01aB\xBEV"; - /// The bytecode of the contract. - #[cfg(feature = "providers")] - pub static IBCCHANNELHANDSHAKE_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__BYTECODE); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R`\x046\x10\x15a\0\x12W`\0\x80\xFD[`\x005`\xE0\x1C\x80c%\x03WG\x14a\x01GW\x80c1\x97?\0\x14a\x01BW\x80c;\xC33\x9F\x14a\x01=W\x80cF\x80p\x86\x14a\x018W\x80cW\x17\xBC\xF5\x14a\x013W\x80c[=\xE2`\x14a\x01.W\x80cn\x92\xED\xAF\x14a\x01)W\x80c~\xB7\x892\x14a\x01$W\x80c\x83\x9D\xF9E\x14a\x01\x1FW\x80c\x86i\xFD\x15\x14a\x01\x1AW\x80c\x8Bb{\xCA\x14a\x01\x15W\x80c\x96T\x9D\x92\x14a\x01\x10W\x80c\x99\x04\x91\xA5\x14a\x01\x0BW\x80c\x99\x0C8\x88\x14a\x01\x06W\x80c\xA9U\r\xAC\x14a\x01\x01W\x80c\xC28\x01\x05\x14a\0\xFCW\x80c\xD1){\x8D\x14a\0\xF7W\x80c\xDE\xFF'\xB9\x14a\0\xF2Wc\xF5-\xED\xED\x14a\0\xEDW`\0\x80\xFD[a\x1C\xB5V[a\x19\x1DV[a\x18\xF0V[a\x18\xBEV[a\x18BV[a\x17\xD6V[a\x17\x86V[a\x16-V[a\x11,V[a\x10\xD3V[a\x10\x89V[a\x10SV[a\r\x7FV[a\x0CZV[a\x0B\xBEV[a\x0BeV[a\x0B,V[a\t\xF5V[a\x02\x1BV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x90` \x82\x82\x01\x12a\x01\x9CW`\x045\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x01\x9CW\x82``\x92\x03\x01\x12a\x01\x9CW`\x04\x01\x90V[`\0\x80\xFD[`\0[\x83\x81\x10a\x01\xB4WPP`\0\x91\x01RV[\x81\x81\x01Q\x83\x82\x01R` \x01a\x01\xA4V[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F` \x93a\x02\0\x81Q\x80\x92\x81\x87R\x87\x80\x88\x01\x91\x01a\x01\xA1V[\x01\x16\x01\x01\x90V[\x90` a\x02\x18\x92\x81\x81R\x01\x90a\x01\xC4V[\x90V[4a\x01\x9CWa\x02)6a\x01LV[` \x81\x01\x90a\x02ca\x02Ha\x02>\x84\x84a\x1E\xCCV[``\x81\x01\x90a\x1E\xFFV[a\x02]` a\x02W\x87\x87a\x1E\xCCV[\x01a\x1FSV[\x91a+\xE5V[P`\x01a\x02xa\x02s\x85\x85a\x1E\xCCV[a\x1F`V[a\x02\x81\x81a\x0C9V[\x03a\x05DWa\x02\x90\x83\x83a\x1E\xCCV[\x90a\x02\xADa\x02\xA3`@\x93\x84\x81\x01\x90a\x1FmV[` \x81\x01\x90a\x1F\xA0V[\x90Pa\x05\x1BWa\x02\xBBa-\x0FV[\x92a\x02\xEAa\x02\xC9\x86\x83a\x1E\xCCV[a\x02\xE5a\x02\xDFa\x02\xD9\x85\x80a\x1F\xA0V[\x90a\x1F\xF1V[\x87a\x08\x07V[a\"\xFBV[a\x03#a\x03\x1Da\x03\r\x86a\x03\x08a\x03\x01\x86\x80a\x1F\xA0V[6\x91a\x06\xBDV[a/rV[`\0R`\0` R`@`\0 \x90V[`\x01\x90UV[a\x03?a\x03\x1Da\x03\r\x86a\x03:a\x03\x01\x86\x80a\x1F\xA0V[a0\tV[a\x03[a\x03\x1Da\x03\r\x86a\x03Va\x03\x01\x86\x80a\x1F\xA0V[a0PV[a\x03q\x84a\x03la\x03\x01\x84\x80a\x1F\xA0V[a1_V[a\x03\x86a\x03\x81a\x03\x01\x83\x80a\x1F\xA0V[a2\x02V[\x91a\x03\xBEs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x03\xB5\x87a\x03\xB0a\x03\x01\x87\x80a\x1F\xA0V[a'JV[\x94\x16\x80\x94a2\xEBV[a\x03\xCD` a\x02W\x88\x85a\x1E\xCCV[\x92a\x03\xDBa\x02>\x88\x85a\x1E\xCCV[\x90a\x03\xE6\x85\x80a\x1F\xA0V[a\x03\xFFa\x03\xF6\x8C\x89\x9A\x94\x9Aa\x1E\xCCV[\x8A\x81\x01\x90a\x1FmV[a\x04\x16a\x04\x0C\x8D\x8Aa\x1E\xCCV[`\x80\x81\x01\x90a\x1F\xA0V[\x91a\x04\"\x8C\x8B\x01a$\xE8V[\x93\x88;\x15a\x01\x9CW\x8D\x90\x8DQ\x9C\x8D\x99\x8A\x99\x7F\xF2\xF8?z\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x8BR`\x04\x8B\x01\x99a\x04d\x9Aa&UV[\x03\x81Z`\0\x94\x85\x91\xF1\x80\x15a\x05\x16Wa\x04\xF9\x96\x7F\x96\xBE`_\xD5\x02\xB1Qa\r\xF0a\r\xFBa\r\xF6a\r\xF0\x88a'\xE5V[Pa\t4V[a3{V[\x95a\x0E4\x8Da\x0E+a\x0E\x18a\x0E\x10\x83\x80a\x1F\xA0V[\x99\x90\x93a\x1F\xA0V[\x91\x90\x92a\x0E#a\x06gV[\x996\x91a\x06\xBDV[\x88R6\x91a\x06\xBDV[` \x86\x01Ra'\xE5V[a4\xCAV[\x90a\x0Ed`\xFFa\x0EQa\x06vV[`\x04\x81R\x94[`\x08\x1C\x16` \x85\x01a'\xFFV[`@\x83\x01R``\x82\x01Ra\x0Ez`\x04\x87\x01a\t4V[`\x80\x82\x01Ra\x0E\x8C`@\x89\x01\x89a\x1F\xA0V[\x93\x90\x91a5~V[\x92a\x0E\xA1`\x01\x88\x01a\t4V[\x91a\x0E\xAE`\x02\x89\x01a\t4V[\x93``\x8B\x01\x90a6\x84V[\x15\x90V[a\x10)W\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x04\x17\x90Ua\x0F\"a\x0F\x1Ca\x0E\xFA\x84\x80a\x1F\xA0V[a\x0F\x14a\x0F\n\x86\x88\x95\x94\x95a\x1F\xA0V[\x94\x90\x926\x91a\x06\xBDV[\x926\x91a\x06\xBDV[\x90a1_V[a\x0FNa\x0F5a\x03\x81a\x03\x01\x85\x80a\x1F\xA0V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x91a\x0FY\x81\x80a\x1F\xA0V[a\x0Fc\x84\x84a\x1F\xA0V[\x95\x90\x91a\x0Fr`\xA0\x86\x01a$\xE8V[\x82;\x15a\x01\x9CW`\0\x94a\x0F\xB7\x86\x92`@Q\x9A\x8B\x97\x88\x96\x87\x95\x7F?A\xC9\xEA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R`\x04\x87\x01a(\x0BV[\x03\x92Z\xF1\x92\x83\x15a\x05\x16Wa\x0F\xFBa\x10\x04\x93a\x10\x11\x92\x7F\xF4t\xFCXP\x88@GO\xD7\x94\x07^Vu\xD2\x0B/\xDD\x9C\xA1\xD5\x85X\xBF\xF9ps\x05\xE09\xCF\x96a\x10\x16W[P\x83a\x1F\xA0V[\x93\x90\x92\x80a\x1F\xA0V[\x90`@Q\x94\x85\x94\x85a(LV[\x03\x90\xA1\0[\x80a\x05\na\x10#\x92a\x05\x9DV[8a\x0F\xF4V[`\x04`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x01\x9CW` a\x10ka\x10f6a\x07\x0FV[a(sV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x16\x81R\xF3[4a\x01\x9CW` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x9CW`\x045`\0R`\0` R` `@`\0 T`@Q\x90\x81R\xF3[4a\x01\x9CW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x9CW` `@Q\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm\x81R\xF3[4a\x01\x9CW` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x81\x816\x01\x12a\x01\x9CW`\x045\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x01\x9CW`\xE0\x83`\x04\x01\x92\x846\x03\x01\x12a\x01\x9CW`$\x83\x01\x90a\x11\xA3a\x11\x95a\x02>\x84\x86a\x1E\xCCV[a\x02]\x84a\x02W\x87\x89a\x1E\xCCV[\x92\x90\x94`\x02a\x11\xB5a\x02s\x84\x88a\x1E\xCCV[a\x11\xBE\x81a\x0C9V[\x03a\x05DWa\x11\xCD\x85\x80a\x1F\xA0V[\x94\x90a\x11\xD7a\x06gV[\x956\x90a\x11\xE3\x92a\x06\xBDV[\x85Ra\x11\xEDa\x18/V[\x84\x86\x01R\x83a\x11\xFC\x84\x88a\x1E\xCCV[\x01a\x12\x06\x90a\x1FSV[\x90a\x12\x11\x84\x88a\x1E\xCCV[``\x81\x01a\x12\x1E\x91a\x1E\xFFV[a\x12'\x91a(\xC6V[6\x90a\x122\x92a\x06\xBDV[a\x12;\x90a4\xCAV[\x91`D\x84\x01\x92a\x12K\x84\x8Aa\x1F\xA0V[\x90\x91a\x12Ua\x06vV[`\x01\x81R\x93a\x12f\x90\x85\x8B\x01a'\xFFV[`@\x99\x8A\x85\x01R``\x84\x01R6\x90a\x12}\x92a\x06\xBDV[`\x80\x82\x01Ra\x12\x8F`d\x85\x01\x89a\x1F\xA0V[\x91a\x12\x9A\x87\x8Ba\x1E\xCCV[\x89\x81\x01a\x12\xA6\x91a\x1FmV[\x80a\x12\xB0\x91a\x1F\xA0V[\x93\x90\x91a\x12\xBD\x89\x8Da\x1E\xCCV[\x8B\x81\x01a\x12\xC9\x91a\x1FmV[\x8A\x81\x01a\x12\xD5\x91a\x1F\xA0V[\x93\x90\x91a\x12\xE1\x90a5~V[\x956\x90a\x12\xED\x92a\x06\xBDV[\x926\x90a\x12\xF9\x92a\x06\xBDV[\x92`\x84\x88\x01a\x13\x07\x96a6\x84V[\x15a\x16\x04W\x84\x95\x96a\x13\x17a-\x0FV[\x96\x87\x91\x89a\x13%\x81\x80a\x1F\xA0V[\x93\x90\x92\x86a\x133\x8A\x85a\x1E\xCCV[\x83\x81\x01a\x13?\x91a\x1FmV[\x80a\x13I\x91a\x1F\xA0V[a\x13U\x8C\x87\x93\x97a\x1E\xCCV[\x85\x81\x01a\x13a\x91a\x1FmV[\x8D\x81\x01a\x13m\x91a\x1F\xA0V[\x93a\x13x\x91\x93a\x1F\xA0V[\x96\x90\x95Q\x99\x8A\x99a\x13\x89\x99\x8Ba(\xDAV[\x03\x7F\x9CZv\xE8\xBD\xDB.\\#\x8E5\xB7\xCEz\x85\n\xD2*wdy\xBF\xC8\xB4\xAF^\x88\xE0s\xFA\x9Cp\x91\xA1a\x13\xB7\x83\x88a\x1E\xCCV[a\x13\xC1\x88\x80a\x1F\xA0V[a\x13\xCA\x91a\x1F\xF1V[a\x13\xD4\x90\x88a\x08\x07V[\x90a\x13\xDE\x91a\"\xFBV[\x85a\x13\xE9\x88\x80a\x1F\xA0V[6\x90a\x13\xF4\x92a\x06\xBDV[\x90a\x13\xFE\x91a/rV[a\x14\x12\x90`\0R`\0` R`@`\0 \x90V[`\x01\x90U\x85a\x14!\x88\x80a\x1F\xA0V[6\x90a\x14,\x92a\x06\xBDV[\x90a\x146\x91a0\tV[a\x14J\x90`\0R`\0` R`@`\0 \x90V[`\x01\x90U\x85a\x14Y\x88\x80a\x1F\xA0V[6\x90a\x14d\x92a\x06\xBDV[\x90a\x14n\x91a0PV[a\x14\x82\x90`\0R`\0` R`@`\0 \x90V[`\x01\x90U\x85a\x14\x91\x88\x80a\x1F\xA0V[6\x90a\x14\x9C\x92a\x06\xBDV[\x90a\x14\xA6\x91a1_V[a\x14\xB0\x87\x80a\x1F\xA0V[6\x90a\x14\xBB\x92a\x06\xBDV[a\x14\xC4\x90a2\x02V[\x93\x86a\x14\xD0\x89\x80a\x1F\xA0V[6\x90a\x14\xDB\x92a\x06\xBDV[\x90a\x14\xE5\x91a'JV[\x94s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x94\x85a\x15\x07\x91a2\xEBV[a\x15\x11\x84\x89a\x1E\xCCV[\x01a\x15\x1B\x90a\x1FSV[\x90a\x15&\x84\x89a\x1E\xCCV[``\x81\x01a\x153\x91a\x1E\xFFV[\x94\x90\x93a\x15@\x8A\x80a\x1F\xA0V[\x93\x90\x9Aa\x15M\x84\x82a\x1E\xCCV[\x8A\x81\x01a\x15Y\x91a\x1FmV[\x93a\x15d\x90\x82a\x1E\xCCV[`\x80\x81\x01a\x15q\x91a\x1F\xA0V[\x92a\x15|\x91\x92a\x1F\xA0V[\x94\x90\x93`\xC4\x01a\x15\x8B\x90a$\xE8V[\x95\x8A;\x15a\x01\x9CW\x8C\x90\x8CQ\x9E\x8F\x9B\x8C\x9B\x7F!\x8D\x1E>\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x8DR`\x04\x8D\x01\x9Ba\x15\xCD\x9Ca)KV[\x03\x81Z`\0\x94\x85\x91\xF1\x92\x83\x15a\x05\x16Wa\x04\xF9\x93a\x15\xF1W[PQ\x91\x82\x91\x82a\x02\x07V[\x80a\x05\na\x15\xFE\x92a\x05\x9DV[8a\x15\xE6V[`\x04\x85Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x01\x9CWa\x16;6a\x01LV[a\x16Ha\x02\xD9\x82\x80a\x1F\xA0V[a\x16Z` \x83\x01\x91a\r\xAC\x83\x85a\x1F\xA0V[`\x03a\x16g\x82T`\xFF\x16\x90V[a\x16p\x81a\x0C9V[\x03a\x05DW\x80a\x16\x8Ba\r\xF6a\r\xF0`\x03a\x16\xB7\x95\x01a'\xE5V[P`\x04\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[a\x16\xC7a\x0F\x1Ca\x0E\xFA\x84\x80a\x1F\xA0V[a\x16\xDAa\x0F5a\x03\x81a\x03\x01\x85\x80a\x1F\xA0V[\x91a\x16\xE5\x81\x80a\x1F\xA0V[a\x16\xEF\x84\x84a\x1F\xA0V[\x95\x90\x91a\x16\xFE`@\x86\x01a$\xE8V[\x82;\x15a\x01\x9CW`\0\x94a\x17C\x86\x92`@Q\x9A\x8B\x97\x88\x96\x87\x95\x7Fu8\xEDh\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R`\x04\x87\x01a(\x0BV[\x03\x92Z\xF1\x92\x83\x15a\x05\x16Wa\x0F\xFBa\x10\x04\x93a\x10\x11\x92\x7F\x1CHi\xAAT\xEA\xF3\xD7\x93{b>\x04\x12\x80\xEF\xC3 \xF6\xC8\x03(\n\x84\x8E\x13\x98\x8BL\xFC2Z\x96a\x10\x16WP\x83a\x1F\xA0V[4a\x01\x9CW` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x17\xC2\x82a\x17\xAF6a\x07\x0FV[\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x01\xA1V[\x81\x01`\x01\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[4a\x01\x9CW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x9CW` `@Q\x7F\x9B\x98 Hj\x05\xC0\x19>\xFB!Ll+\xA8\xFC\xE0,Z\\\x84\xAA\x05\x7F\x81\x99\xC9\x9F\x13\xFF\x93\x9B\x81R\xF3[`@Q\x90a\x18<\x82a\x05\xD2V[`\0\x82RV[4a\x01\x9CW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x9CWa\x04\xF9`@Qa\x18\x80\x81a\x05\xEEV[`\x03\x81R\x7Fibc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R`@Q\x91\x82\x91` \x83R` \x83\x01\x90a\x01\xC4V[4a\x01\x9CWa\x04\xF9a\tpa\x0BFa\x18\xDA` a\x17\xAF6a\x07\x0FV[\x81\x01`\x02\x81R\x03\x01\x90 `@Q\x92\x83\x80\x92a\x08\x80V[4a\x01\x9CW` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x0B\xEBa\x19\x186a\x07\x0FV[a\x07\xE1V[4a\x01\x9CW\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC` \x816\x01\x12a\x01\x9CW`\x04\x90\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x01\x9CWa\x01\0\x81\x84\x01\x92\x826\x03\x01\x12a\x01\x9CWa\x19~a\x02\xD9\x83\x80a\x1F\xA0V[\x90a\x19\x91`$\x82\x01\x92a\r\xAC\x84\x86a\x1F\xA0V[\x91\x82T\x93`\x01`\xFF\x86\x16a\x19\xA4\x81a\x0C9V[\x03a\x1C\x8CWa\x19\xB3\x81\x80a\x1F\xA0V[\x94\x90\x95a\x19\xC0\x84\x84a\x1F\xA0V[\x97\x90`\x01\x84\x01\x97\x88\x92`d\x89\x01\x9Aa\x19\xD8\x8C\x89a\x1F\xA0V[\x90`\x03\x89\x01\x9Ca\x19\xE7\x8Ea'\xE5V[P\x93`@Q\x97\x88\x97a\x19\xF9\x97\x89a*]V[\x03\x7F\xE94%w\xBF\x02\xF7H\xBAx>\xDD\x90\x94\xF8\xE9;.\xF7\xFA\xCE\x9B\xC7G\x8D{05\x8D\xDE\xEFo\x91\xA1a\x1A&\x87a'\xE5V[Pa\x1A0\x90a\t4V[a\x1A9\x90a3{V[\x91a\x1AD\x85\x80a\x1F\xA0V[\x98\x90a\x1AP\x88\x88a\x1F\xA0V[\x90\x91a\x1AZa\x06gV[\x9B6\x90a\x1Af\x92a\x06\xBDV[\x8BR6\x90a\x1As\x92a\x06\xBDV[` \x8A\x01Ra\x1A\x81\x90a'\xE5V[Pa\x1A\x8B\x90a\t4V[a\x1A\x94\x90a4\xCAV[\x97`D\x88\x01\x98a\x1A\xA4\x8A\x88a\x1F\xA0V[\x91\x90\x92a\x1A\xAFa\x06vV[`\x02\x81R\x94`\x08\x1C`\xFF\x16` \x86\x01\x90a\x1A\xC8\x91a'\xFFV[`@\x85\x01R``\x84\x01R6\x90a\x1A\xDD\x92a\x06\xBDV[`\x80\x82\x01Ra\x1A\xEF`\x84\x88\x01\x86a\x1F\xA0V[a\x1A\xFC\x8B\x88\x94\x93\x94a\x1F\xA0V[\x92a\x1B\x06\x90a5~V[\x94a\x1B\x10\x90a\t4V[\x926\x90a\x1B\x1C\x92a\x06\xBDV[\x92`\xA4\x8A\x01a\x1B*\x96a6\x84V[\x15a\x1CcW\x95a\x1B\x93`\x02\x88a\x1Bja\x1B\xE5\x98\x99\x9A`\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[a\x1B\x80a\x1Bw\x8A\x87a\x1F\xA0V[\x90\x86\x84\x01a \xB6V[a\x1B\x8A\x8A\x86a\x1F\xA0V[\x92\x90\x91\x01a \xB6V[a\x1B\xB3a\x0F\x1Ca\x1B\xA3\x84\x80a\x1F\xA0V[a\x0F\x14a\x0F\n\x88\x88\x95\x94\x95a\x1F\xA0V[a\x1B\xEEa\x1B\xC9a\x0F5a\x03\x81a\x03\x01\x86\x80a\x1F\xA0V[\x94`\xE4a\x1B\xFFa\x1B\xF6a\x1B\xDC\x87\x80a\x1F\xA0V[\x9A\x90\x98\x88a\x1F\xA0V[\x95\x90\x9C\x88a\x1F\xA0V[\x9B\x90\x97a\x1F\xA0V[\x92\x90\x93\x01a$\xE8V[\x91\x87;\x15a\x01\x9CW`\0\x99\x8A\x96a\x1CD\x95`@Q\x9D\x8E\x9C\x8D\x9B\x8C\x9A\x7F`\xCAV\xEB\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x8CR\x8B\x01a*\xBBV[\x03\x92Z\xF1\x80\x15a\x05\x16Wa\x1CTW\0[\x80a\x05\na\x1Ca\x92a\x05\x9DV[\0[\x86`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x85`@Q\x7F\x96\xD0\x91F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x01\x9CWa\x1C\xC36a\r/V[a\x1C\xD0a\x02\xD9\x82\x80a\x1F\xA0V[a\x1C\xE2` \x83\x01\x91a\r\xAC\x83\x85a\x1F\xA0V[\x91\x82T`\x02`\xFF\x82\x16a\x1C\xF4\x81a\x0C9V[\x03a\x05DWa\x0E\xB9\x84a\x1Dg`\x03a\x1D\xE6a\x1D\xFD\x95\x7F\xCC\xCByTO*\x91\x0E\xCD\x04\xC3\xBD\x96\xF8p\xBEo\\t\xE0\xD0\x0C\x18D<%\xEC\xF7\xB9\x80\t\x18a\x1D4\x89\x80a\x1F\xA0V[\x90a\x1D?\x8C\x8Ca\x1F\xA0V[\x97\x90`\x01\x8A\x01\x99\x8A`\x02\x82\x01\x99\x8A\x92\x01\x9Aa\x1DY\x8Ca'\xE5V[P\x93`@Q\x97\x88\x97\x88a+!V[\x03\x90\xA1\x88a\x1D\x98a\x0E>a\r\xF0a\x1D\x83a\r\xF6a\r\xF0\x8Aa'\xE5V[\x97a\x0E4\x8Da\x0E+a\x0E\x18a\x0E\x10\x83\x80a\x1F\xA0V[\x90a\x1D\xB0`\xFFa\x1D\xA6a\x06vV[`\x03\x81R\x94a\x0EWV[`@\x83\x01R``\x82\x01Ra\x1D\xC6`\x04\x8B\x01a\t4V[`\x80\x82\x01Ra\x1D\xF2a\x1D\xECa\x1D\xDE`@\x8B\x01\x8Ba\x1F\xA0V[\x94\x90\x93a5~V[\x96a\t4V[\x93a\t4V[\x93``\x89\x01\x90a6\x84V[a\x10)Wa\x1E2`\xA0\x93`\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[a\x1ERa\x0F\x1Ca\x1EB\x83\x80a\x1F\xA0V[a\x0F\x14a\x0F\n\x87\x87\x95\x94\x95a\x1F\xA0V[a\x1Eea\x0F5a\x03\x81a\x03\x01\x84\x80a\x1F\xA0V[a\x1E~a\x1E\x87a\x1Eu\x84\x80a\x1F\xA0V[\x92\x90\x95\x85a\x1F\xA0V[\x96\x90\x94\x01a$\xE8V[\x82;\x15a\x01\x9CW`\0\x94a\x1CD\x86\x92`@Q\x98\x89\x97\x88\x96\x87\x95\x7F\xF8(\x8C\xC6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R`\x04\x87\x01a(\x0BV[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x816\x03\x01\x82\x12\x15a\x01\x9CW\x01\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x01\x9CW\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x01\x9CW` \x01\x91\x81`\x05\x1B6\x03\x83\x13a\x01\x9CWV[5`\x03\x81\x10\x15a\x01\x9CW\x90V[5`\x05\x81\x10\x15a\x01\x9CW\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC1\x816\x03\x01\x82\x12\x15a\x01\x9CW\x01\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x01\x9CW\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x01\x9CW` \x01\x91\x816\x03\x83\x13a\x01\x9CWV[` \x90\x82`@Q\x93\x84\x92\x837\x81\x01`\x05\x81R\x03\x01\x90 \x90V[` \x91\x92\x83`@Q\x94\x85\x93\x847\x82\x01\x90\x81R\x03\x01\x90 \x90V[\x90`\x05\x81\x10\x15a\t\xF0W`\xFF\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83T\x16\x91\x16\x17\x90UV[\x81\x81\x10a eWPPV[`\0\x81U`\x01\x01a ZV[\x91\x90`\x1F\x81\x11a \x80WPPPV[a\x06t\x92`\0R` `\0 \x90` `\x1F\x84\x01`\x05\x1C\x83\x01\x93\x10a \xACW[`\x1F\x01`\x05\x1C\x01\x90a ZV[\x90\x91P\x81\x90a \x9FV[\x90\x92\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x05\xB1Wa \xDC\x81a \xD6\x84Ta\x08-V[\x84a qV[`\0`\x1F\x82\x11`\x01\x14a!:W\x81\x90a!+\x93\x94\x95`\0\x92a!/W[PP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x90UV[\x015\x90P8\x80a \xF9V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x16\x94a!m\x84`\0R` `\0 \x90V[\x91\x80[\x87\x81\x10a!\xC6WP\x83`\x01\x95\x96\x97\x10a!\x8EW[PPP\x81\x1B\x01\x90UV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U8\x80\x80a!\x84V[\x90\x92` `\x01\x81\x92\x86\x86\x015\x81U\x01\x94\x01\x91\x01a!pV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[h\x01\0\0\0\0\0\0\0\0\x83\x11a\x05\xB1W\x80T\x83\x82U\x80\x84\x10a\"uW[P\x90a\"<\x81\x92`\0R` `\0 \x90V[\x90`\0\x92[\x84\x84\x10a\"OWPPPPPV[`\x01` \x82a\"ia\"b\x84\x95\x87a\x1F\xA0V[\x90\x88a \xB6V[\x01\x93\x01\x93\x01\x92\x91a\"AV[`\0\x82`\0R\x84` `\0 \x92\x83\x01\x92\x01[\x82\x81\x10a\"\x95WPPa\"*V[\x80a\"\xA2`\x01\x92Ta\x08-V[\x80a\"\xAFW[P\x01a\"\x87V[`\x1F\x90\x81\x81\x11\x84\x14a\"\xC7WPP\x82\x81U[8a\"\xA8V[\x83a\"\xE9\x92a\"\xDB\x85`\0R` `\0 \x90V[\x92\x01`\x05\x1C\x82\x01\x91\x01a ZV[`\0\x81\x81R` \x81 \x81\x83UUa\"\xC1V[\x90a#\x0Ea#\x08\x82a\x1F`V[\x83a #V[` a#\x1C` \x83\x01a\x1FSV[`\x03\x81\x10\x15a\t\xF0W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\xFFa\xFF\0\x85T\x92`\x08\x1B\x16\x91\x16\x17\x83U`\x01\x80\x84\x01\x90a#h`@\x85\x01\x85a\x1FmV[\x92a#s\x84\x80a\x1F\xA0V[\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11a\x05\xB1Wa#\x97\x84a#\x91\x87Ta\x08-V[\x87a qV[`\0\x92`\x1F\x85\x11`\x01\x14a$)WPPa\x06t\x96\x94a\x1B\x8A\x94a#\xF9\x85`\x04\x99\x96a$\x0F\x96a$\x05\x96`\0\x92a!/WPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x90U` \x81\x01\x90a\x1F\xA0V[\x90`\x02\x86\x01a \xB6V[a\x04\x0Ca$\x1F``\x83\x01\x83a\x1E\xFFV[\x90`\x03\x86\x01a\"\rV[\x92\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x85\x16\x90a$^\x87`\0R` `\0 \x90V[\x94\x83\x91[\x83\x83\x10a$\xD1WPPP\x94`\x01\x85a$\x0F\x95a$\x05\x95a\x06t\x9C\x9A\x95`\x04\x9C\x99a\x1B\x8A\x9B\x10a$\x99W[PPP\x81\x1B\x01\x90Ua\x02\xA3V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U8\x80\x80a$\x8CV[\x85\x85\x015\x87U\x95\x86\x01\x95\x93\x81\x01\x93\x91\x81\x01\x91a$bV[5s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x01\x9CW\x90V[`\x1F\x82` \x94\x93\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x81\x86R\x86\x86\x017`\0\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x90V[\x905\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x826\x03\x01\x81\x12\x15a\x01\x9CW\x01` \x815\x91\x01\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x01\x9CW\x816\x03\x83\x13a\x01\x9CWV[\x90\x82\x81\x81R` \x80\x91\x01\x93` \x83`\x05\x1B\x82\x01\x01\x94\x84`\0\x92[\x85\x84\x10a%\xC3WPPPPPPP\x90V[\x90\x91\x92\x93\x94\x95\x96\x85\x80a&\t\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x86`\x01\x96\x03\x01\x88Ra&\x03\x8C\x88a%HV[\x90a%\tV[\x99\x01\x94\x01\x94\x01\x92\x95\x94\x93\x91\x90a%\xB2V[a\x02\x18\x91a&Ga&=\x90\xFD[\x96\x94a' a\x02\x18\x99\x97\x94a'\x12a'<\x97\x94a'.\x96`\xA0\x8DR`\xA0\x8D\x01\x91a%\tV[\x90\x8A\x82\x03` \x8C\x01Ra\x01\xC4V[\x91\x88\x83\x03`@\x8A\x01Ra%\tV[\x90\x85\x82\x03``\x87\x01Ra\x01\xC4V[\x92`\x80\x81\x85\x03\x91\x01Ra%\tV[`!a\x06t\x91\x93\x92\x93`@Q\x94\x81a'l\x87\x93Q\x80\x92` \x80\x87\x01\x91\x01a\x01\xA1V[\x82\x01\x7F/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01Ra'\xA7\x82Q\x80\x93` \x87\x85\x01\x91\x01a\x01\xA1V[\x01\x03`\x01\x81\x01\x85R\x01\x83a\x06&V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[\x80T\x15a'\xFAW`\0R` `\0 \x90`\0\x90V[a'\xB6V[`\x03\x82\x10\x15a\t\xF0WRV[\x93\x92`@\x93a(>a&\xDA\x93s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x95\x99\x98\x99``\x89R``\x89\x01\x91a%\tV[\x91\x86\x83\x03` \x88\x01Ra%\tV[\x92\x90a(e\x90a\x02\x18\x95\x93`@\x86R`@\x86\x01\x91a%\tV[\x92` \x81\x85\x03\x91\x01Ra%\tV[a(\x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91a\x07\xE1V[T\x16\x80\x15a(\x9CW\x90V[`\x04`@Q\x7F\xB6\xC7\x1F}\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90\x15a'\xFAW\x80a(\xD6\x91a\x1F\xA0V[\x90\x91V[\x98\x96\x91\x93a\x02\x18\x9A\x98\x95a)\x13a)=\x98\x95a)\x05a)!\x95a)/\x99\x8F`\xC0\x90\x81\x81R\x01\x91a%\tV[\x8D\x81\x03` \x8F\x01R\x90a\x01\xC4V[\x91\x8B\x83\x03`@\x8D\x01Ra%\tV[\x91\x88\x83\x03``\x8A\x01Ra%\tV[\x90\x85\x82\x03`\x80\x87\x01Ra\x01\xC4V[\x92`\xA0\x81\x85\x03\x91\x01Ra%\tV[\x9A\x95a)\xBD\x90a)\xAF\x9D\x9E\x9D\x8Da)\xD9\x98a&\xDA\x9C\x98`\xE0\x9F\x9C\x96s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x9F\x99\x98a)\xCB\x99a)\xA1\x92a)\x93\x87a\x01\0\x92a\x0CMV[\x80` \x88\x01R\x86\x01\x91a%\x98V[\x92`@\x81\x85\x03\x91\x01Ra%\tV[\x8D\x81\x03``\x8F\x01R\x90a\x01\xC4V[\x90\x8B\x82\x03`\x80\x8D\x01Ra&\x1AV[\x91\x89\x83\x03`\xA0\x8B\x01Ra%\tV[\x91\x86\x83\x03`\xC0\x88\x01Ra%\tV[\x80T`\0\x93\x92a)\xF6\x82a\x08-V[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a\x08\xF7WP`\x01\x14a*\x1CWPPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a*IWPPPP\x01\x01\x908\x80\x80\x80\x80a\x08\xAFV[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a*1V[\x96\x92a*\x91\x90a\x02\x18\x99\x97\x95a*\x83a*\xAD\x98\x94a*\x9F\x96`\xA0\x8DR`\xA0\x8D\x01\x91a%\tV[\x91\x8A\x83\x03` \x8C\x01Ra%\tV[\x90\x87\x82\x03`@\x89\x01Ra)\xE7V[\x91\x85\x83\x03``\x87\x01Ra%\tV[\x91`\x80\x81\x84\x03\x91\x01Ra)\xE7V[\x97\x92\x95a+\x05s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x97`\x80\x99\x96a*\xF7a&\xDA\x99\x95\x9D\x9E\x9Da+\x13\x97`\xA0\x8F\x81\x81R\x01\x91a%\tV[\x8C\x81\x03` \x8E\x01R\x91a%\tV[\x91\x89\x83\x03`@\x8B\x01Ra%\tV[\x91\x86\x83\x03``\x88\x01Ra%\tV[\x95\x92a+T\x90a*\xAD\x95a+Fa\x02\x18\x9A\x98\x94a+b\x96`\xA0\x8CR`\xA0\x8C\x01\x91a%\tV[\x91\x89\x83\x03` \x8B\x01Ra%\tV[\x90\x86\x82\x03`@\x88\x01Ra)\xE7V[\x90\x84\x82\x03``\x86\x01Ra)\xE7V[`@Q\x90a+}\x82a\x06\nV[`\0`\x80\x83``\x80\x82R\x80` \x83\x01R\x83`@\x83\x01R`@Q\x90a+\xA0\x82a\x05\xB6V[\x80\x82R\x80` \x83\x01R`@Qa+\xB5\x81a\x05\xD2V[\x81\x81R`@\x83\x01R\x82\x01R\x01RV[\x80Q\x15a'\xFAW` \x01\x90V[\x80Q\x82\x10\x15a'\xFAW` \x91`\x05\x1B\x01\x01\x90V[\x92\x91\x92a+\xF0a+pV[P`\x01\x82\x03a,\x9BWa,\x06\x91a\x03\x01\x91a(\xC6V[a,\x0F\x81a3{V[\x92` \x84\x01`\x01\x81QQ\x03a,qWa,?\x91a,9a,2a\x0E\xB9\x93Qa+\xC4V[Q\x91a7\xF7V[\x90a8\xBBV[a,GW\x91\x90V[`\x04`@Q\x7F]\x19\x1F\xAE\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xCCo\xEF$\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xD47z\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90`\x01\x82\x01\x80\x92\x11a,\xD3WV[a!\xDEV[`\x01\x01\x90\x81`\x01\x11a,\xD3WV[\x90` \x82\x01\x80\x92\x11a,\xD3WV[` \x01\x90\x81` \x11a,\xD3WV[\x91\x90\x82\x01\x80\x92\x11a,\xD3WV[\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm`\0R`\0` R`@`\0 T\x80\x80`\0\x91z\x18O\x03\xE9?\xF9\xF4\xDA\xA7\x97\xEDn8\xEDd\xBFj\x1F\x01\0\0\0\0\0\0\0\0\x80\x82\x10\x15a/dW[Pm\x04\xEE-mA[\x85\xAC\xEF\x81\0\0\0\0\x80\x83\x10\x15a/UW[Pf#\x86\xF2o\xC1\0\0\x80\x83\x10\x15a/FW[Pc\x05\xF5\xE1\0\x80\x83\x10\x15a/7W[Pa'\x10\x80\x83\x10\x15a/(W[P`d\x82\x10\x15a/\x18W[`\n\x80\x92\x10\x15a/\x0EW[`\x01\x90\x81`!a-\xD7`\x01\x87\x01a5/V[\x95\x86\x01\x01\x90[a.\xADW[PPPPa..\x91a.Za._\x92`@Q\x94\x85\x91a.(` \x84\x01`\x08\x90\x7Fchannel-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\x01\x90V[\x90a\x07XV[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x85R\x84a\x06&V[a,\xC5V[\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm`\0\x90\x81R` R\x7F\xA9H\xE2\x9A\xC0\xE6\xA6\xA5\xE3\xC6G\xA0z\x05\x05\x17\x0C\x97-\xD4\x96\x0C\xBE\x19J\xEEwbk\xB5+XU\x90V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x91\x01\x91\x7F0123456789abcdef\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\x82\x06\x1A\x83S\x04\x91\x82\x15a/\tW\x91\x90\x82a-\xDDV[a-\xE2V[\x91`\x01\x01\x91a-\xC5V[\x91\x90`d`\x02\x91\x04\x91\x01\x91a-\xBAV[`\x04\x91\x93\x92\x04\x91\x01\x918a-\xAFV[`\x08\x91\x93\x92\x04\x91\x01\x918a-\xA2V[`\x10\x91\x93\x92\x04\x91\x01\x918a-\x93V[` \x91\x93\x92\x04\x91\x01\x918a-\x81V[`@\x93P\x81\x04\x91P8a-hV[\x90a0\x03`A`@Q\x80\x93` \x82\x01\x95\x7FnextSequenceSend/ports/\0\0\0\0\0\0\0\0\0\x87Ra/\xB9\x81Q\x80\x92` `7\x87\x01\x91\x01a\x01\xA1V[\x82\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`7\x82\x01Ra/\xF4\x82Q\x80\x93` \x87\x85\x01\x91\x01a\x01\xA1V[\x01\x03`!\x81\x01\x84R\x01\x82a\x06&V[Q\x90 \x90V[\x90a0\x03`A`@Q\x80\x93` \x82\x01\x95\x7FnextSequenceRecv/ports/\0\0\0\0\0\0\0\0\0\x87Ra/\xB9\x81Q\x80\x92` `7\x87\x01\x91\x01a\x01\xA1V[\x90a0\x03`@\x80Q\x80\x93` \x82\x01\x95\x7FnextSequenceAck/ports/\0\0\0\0\0\0\0\0\0\0\x87Ra0\x96\x81Q\x80\x92` `6\x87\x01\x91\x01a\x01\xA1V[\x82\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`6\x82\x01Ra0\xD1\x82Q\x80\x93` \x87\x85\x01\x91\x01a\x01\xA1V[\x01\x03` \x81\x01\x84R\x01\x82a\x06&V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x05\xB1W`\x05\x1B` \x01\x90V[\x90\x81Ta1\x04\x81a0\xE0V[\x92`@\x93a1\x15`@Q\x91\x82a\x06&V[\x82\x81R\x80\x94` \x80\x92\x01\x92`\0R` `\0 \x90`\0\x93[\x85\x85\x10a1\xEC\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04\x82\x10\x15a\t\xF0WRV[a3\x8D\x90a3\x87a+pV[Pa\x07oV[`@\x80Q\x91a3\x9B\x83a\x06\nV[\x81Qa3\xAB\x81a\tp\x81\x85a\x08\x80V[\x83R`\x01\x80\x82\x01\x90\x81Ta3\xBE\x81a0\xE0V[\x92a3\xCB\x86Q\x94\x85a\x06&V[\x81\x84R`\0\x90\x81R` \x80\x82 \x81\x86\x01[\x84\x84\x10a4\x8BWPPPPPP\x90`\x03\x91` \x85\x01Ra4Fa45`\x06a4\x08`\x02\x85\x01T`\xFF\x16\x90V[\x93a4\x16\x87\x89\x01\x95\x86a3oV[a4!\x86\x82\x01a\tOV[``\x89\x01R\x01Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x86\x01RV[Qa4P\x81a\t\xE6V[a4Y\x81a\t\xE6V[\x03a4bWP\x90V[`\x04\x90Q\x7F\x8C\xA9\x89\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x02\x83\x87\x92\x8BQa4\x9B\x81a\x05\xEEV[\x8CQa4\xAB\x81a\tp\x81\x8Aa\x08\x80V[\x81Ra4\xB8\x85\x87\x01a0\xF8V[\x83\x82\x01R\x81R\x01\x92\x01\x93\x01\x92\x90a3\xDCV[`@Q\x90a4\xD7\x82a\x05\xEEV[`\x01\x82R` `\0[\x81\x81\x10a5 WPPa5\x07`\x04a4\xFAa\tp\x93a\x07oV[\x01`@Q\x92\x83\x80\x92a\x08\x80V[\x81Q\x15a'\xFAW` \x82\x01Ra5\x1C\x81a+\xC4V[P\x90V[``\x84\x82\x01\x83\x01R\x81\x01a4\xE0V[\x90a59\x82a\x06\x83V[a5F`@Q\x91\x82a\x06&V[\x82\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a5t\x82\x94a\x06\x83V[\x01\x90` 6\x91\x017V[\x90a5\xEEa5\xD6a5\xB1a5\xACa5\xA7a5\xA1\x87Qa5\x9C\x81a\x0C9V[a>\xAFV[`\x03\x0B\x90V[a?$V[a,\xD8V[a5\xD0a5\xACa5\xA7a5\xA1` \x89\x01Qa5\xCB\x81a\x0CCV[a?KV[\x90a-\x02V[a5\xD0a5\xACa5\xE9`@\x87\x01Qa?\x86V[a?\xC6V[`\0\x90[``\x84\x01Q\x80Q\x83\x10\x15a6%W`\x01\x91a5\xD0a5\xACa6\x16\x86a6\x1D\x95a+\xD1V[QQa?\xC6V[\x91\x01\x90a5\xF2V[Pa6R\x91Pa6Fa6K\x91\x94\x93\x94a5\xD0a5\xAC`\x80\x87\x01QQa?\xC6V[a5/V[\x80\x92a9\x82V[\x81R\x90V[\x90\x81` \x91\x03\x12a\x01\x9CWQ\x80\x15\x15\x81\x03a\x01\x9CW\x90V[5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x01\x9CWV[\x92\x90\x93\x94\x95\x91\x95\x83Qa6\x96\x90a(sV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x95\x84Q\x94``\x01Q`@\x01QQ\x91a6\xC3\x91a:\xE8V[\x90`@Q\x97\x88\x96\x87\x96\x7F\xF9\xBBZQ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x88R`\x04\x88\x01a\x01 \x90Ra\x01$\x88\x01a7\x06\x91a\x01\xC4V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81a7\x1B\x82a6oV[\x16`$\x8A\x01R` \x01a7-\x90a6oV[\x16`D\x88\x01R`d\x87\x01`\0\x90R`\x84\x87\x01`\0\x90R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x94\x85\x88\x83\x03\x01`\xA4\x89\x01Ra7x\x92a%\tV[\x83\x86\x82\x03\x01`\xC4\x87\x01Ra7\x8B\x91a\x01\xC4V[\x82\x85\x82\x03\x01`\xE4\x86\x01Ra7\x9E\x91a\x01\xC4V[\x90\x83\x82\x03\x01a\x01\x04\x84\x01Ra7\xB2\x91a\x01\xC4V[\x03\x81Z` \x94`\0\x91\xF1\x90\x81\x15a\x05\x16W`\0\x91a7\xCEWP\x90V[a\x02\x18\x91P` =` \x11a7\xF0W[a7\xE8\x81\x83a\x06&V[\x81\x01\x90a6WV[P=a7\xDEV[`\x03\x81\x10\x15a\t\xF0W`\x01\x81\x03a8BWP`@Qa8\x15\x81a\x05\xEEV[`\x0F\x81R\x7FORDER_UNORDERED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R\x90V[`\x02\x03a8\x82W`@Qa8U\x81a\x05\xEEV[`\r\x81R\x7FORDER_ORDERED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R\x90V[`@Qa8\x8E\x81a\x05\xEEV[`\x0F\x81R\x7F_ORDER_INVALID_\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R\x90V[\x90\x80Q` \x80\x92\x01 \x90`\0[\x81\x84\x01Q\x80Q\x82\x10\x15a8\xFDWa8\xE0\x82\x85\x92a+\xD1V[Q\x83\x81Q\x91\x01 \x14a8\xF4W`\x01\x01a8\xC8V[PPPP`\x01\x90V[PPPPP`\0\x90V[\x90a9\x11\x91a:\xE8V[` \x81Q\x91\x01 \x90V[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x01\x91\x82\x11a,\xD3WV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x01\x91\x82\x11a,\xD3WV[\x91\x90\x82\x03\x91\x82\x11a,\xD3WV[\x91\x90\x91` \x90`\0\x91\x81Qa9\x96\x81a\x0C9V[a9\x9F\x81a\x0C9V[a:\xB2W[a9\xD4a9\xE3\x91\x86` \x85\x01\x80Qa9\xBB\x81a\x0CCV[a9\xC4\x81a\x0CCV[a:\x80W[Pa5\xD0\x90\x82aA|V[a5\xD0\x86\x82`@\x86\x01Qa?\xF0V[\x91``\x82\x01\x90\x81QQa:/W[PP`\x80\x01\x80QQ\x92\x93a\x02\x18\x93a:\x0BW[PPa9\x1BV[\x80a: \x84a5\xD0a5\xD0\x94a:(\x97aA\x96V[\x80\x93QaB\x9FV[8\x80a:\x04V[\x91\x93\x90\x92[\x83QQ\x83\x10\x15a:oWa:ga:Q\x82a5\xD0\x89`\x01\x95aA\x89V[a5\xD0\x88\x82a:a\x88\x8AQa+\xD1V[QaB\x9FV[\x92\x01\x91a:4V[\x90\x93\x90\x92P\x90P`\x80a\x02\x18a9\xF1V[\x81a5\xD0\x91a:\x99\x85a5\xD0a:\xA6\x96a:\xAB\x98aAoV[\x93\x84\x91Qa5\xCB\x81a\x0CCV[a?\xDBV[\x868a9\xC9V[Pa9\xE3a9\xD4a:\xE0a:\xCDa:\xC8\x88aA7V[a,\xF4V[a5\xD0\x88\x82a:\xA6\x88Qa5\x9C\x81a\x0C9V[\x91PPa9\xA4V[`\xB8\x81a\x0C9V[\x80\x15a?\x1EWa>\xC7\x81a\x0C9V[`\x01\x81\x14a?\x18Wa>\xD8\x81a\x0C9V[`\x02\x81\x14a?\x12Wa>\xE9\x81a\x0C9V[`\x03\x81\x14a?\x0CW\x80a>\xFD`\x04\x92a\x0C9V[\x14a?\x07W`\0\x80\xFD[`\x04\x90V[P`\x03\x90V[P`\x02\x90V[P`\x01\x90V[P`\0\x90V[`\0\x81`\x07\x0B\x12`\0\x14a?8WP`\n\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x02\x18\x91\x16aA\x15V[`\x03\x81\x10\x15a\t\xF0W\x80\x15a?\x1EWa?c\x81a\x0CCV[`\x01\x81\x14a?\x18W\x80a?w`\x02\x92a\x0CCV[\x14a?\x81W`\0\x80\xFD[`\x02\x90V[a?\x91\x81QQa?\xC6V[\x80`\x01\x01\x91\x82`\x01\x11a,\xD3W` a?\xAC\x91\x01QQa?\xC6V[\x80`\x01\x01`\x01\x11a,\xD3W`\x02\x91\x01\x01\x80\x91\x11a,\xD3W\x90V[a?\xCF\x81aA\x15V[\x81\x01\x80\x91\x11a,\xD3W\x90V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x02\x18\x93\x92\x16aA\xBFV[\x91a?\xFDa6F\x84a?\x86V[\x92` \x90\x80QQa@\x82W[a@\\a\x02\x18\x95a@a\x94a@1a@V\x95` a@P\x96\x01\x84\x81QQa@fWPPa9\x1BV[\x94\x85\x92a@Ha@B\x84\x8B\x87aA\xBFV[\x8Aa-\x02V[\x95\x86\x91a,\xE6V[\x92a-\x02V[\x90aB\nV[a-\x02V[a9uV[\x80a: \x84a5\xD0a5\xD0\x94a@{\x97aA\xB2V[8\x84a:\x04V[a@\x8B\x85aA\xA3V[\x91\x82\x81\x01\x92\x83\x82\x11a,\xD3W\x82Q\x90\x81Q\x91a@\xA8\x89\x87\x85aA\xBFV[\x93`\0\x90\x80\x86`\0\x95\x01\x8C\x01\x01\x92\x01\x91[\x84\x84\x10a@\xFFWPPP\x90P\x81\x01\x80\x91\x11a,\xD3Wa\x02\x18\x95a@a\x94a@1a@P\x94` a@\xEFa@\\\x96a@V\x99a-\x02V[\x97PP\x94PP\x94P\x95PPa@\tV[\x82Q\x82\x1A\x81S`\x01\x93\x84\x01\x93\x92\x83\x01\x92\x01a@\xB9V[`\x01\x80\x91`\x07\x90`\x07\x1C\x80[aA+WPPP\x90V[\x92\x82\x01\x92\x81\x1C\x80aA!V[`\x08\x90`\0\x90` \x01\x82[`\x07\x1C\x92\x83\x15aAeW`\x80\x17\x81S`\x01\x80\x91\x01\x91\x01`\x7F\x83\x16\x92\x91\x90\x91aABV[\x90`\x01\x93PS\x01\x90V[`\0\x91\x82\x91\x01`\x10aAeV[`\0\x91\x82\x91\x01`\x1AaAeV[`\0\x91\x82\x91\x01`\"aAeV[`\0\x91\x82\x91\x01`*aAeV[`\0\x90\x81\x90` \x01`\naAeV[`\0\x91\x82\x91\x01`\x12aAeV[`\x7F\x93\x92`\0\x92\x85\x83\x16\x92\x91\x01\x90[`\x07\x1C\x91\x82\x15aA\xEFW`\x80\x17\x81S`\x01\x92\x83\x01\x92\x85\x83\x16\x92\x91\x01\x90aA\xCEV[\x91P`\x01\x93\x94PS\x01\x90V[`\x1F\x81\x11a,\xD3Wa\x01\0\n\x90V[\x91\x92\x90\x83\x15aB\x99W\x92\x91[` \x93\x84\x84\x11\x15aBjW\x81Q\x81R\x84\x81\x01\x80\x91\x11a,\xD3W\x93\x81\x01\x80\x91\x11a,\xD3W\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x90\x81\x11a,\xD3W\x91aB\x16V[\x92\x90\x91\x93P` \x03` \x81\x11a,\xD3WaB\x86aB\x8B\x91aA\xFBV[a9HV[\x90Q\x82Q\x82\x16\x91\x19\x16\x17\x90RV[P\x91PPV[\x90\x81Q\x91aB\xAE\x84\x83\x85aA\xBFV[\x93` `\0\x91\x86`\0\x95\x01\x01\x92\x01\x91[\x84\x84\x10aB\xD6WPPP\x90P\x81\x01\x80\x91\x11a,\xD3W\x90V[\x82Q\x82\x1A\x81S`\x01\x93\x84\x01\x93\x92\x83\x01\x92\x01aB\xBEV"; - /// The deployed bytecode of the contract. - #[cfg(feature = "providers")] - pub static IBCCHANNELHANDSHAKE_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE); - #[cfg(feature = "providers")] - pub struct IBCChannelHandshake(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for IBCChannelHandshake { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for IBCChannelHandshake { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for IBCChannelHandshake { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for IBCChannelHandshake { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IBCChannelHandshake)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl IBCChannelHandshake { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - IBCCHANNELHANDSHAKE_ABI.clone(), - client, - )) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - IBCCHANNELHANDSHAKE_ABI.clone(), - IBCCHANNELHANDSHAKE_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - /// Calls the contract's `COMMITMENT_PREFIX` (0xa9550dac) function - pub fn commitment_prefix( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 85, 13, 172], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `capabilities` (0x5717bcf5) function - pub fn capabilities( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([87, 23, 188, 245], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelCapabilityPath` (0x3bc3339f) function - pub fn channel_capability_path( - &self, - port_id: ::std::string::String, - channel_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([59, 195, 51, 159], (port_id, channel_id)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelCloseConfirm` (0x6e92edaf) function - pub fn channel_close_confirm( - &self, - msg: MsgChannelCloseConfirm, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([110, 146, 237, 175], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelCloseInit` (0x96549d92) function - pub fn channel_close_init( - &self, - msg: MsgChannelCloseInit, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([150, 84, 157, 146], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelOpenAck` (0xdeff27b9) function - pub fn channel_open_ack( - &self, - msg: MsgChannelOpenAck, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([222, 255, 39, 185], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelOpenConfirm` (0xf52deded) function - pub fn channel_open_confirm( - &self, - msg: MsgChannelOpenConfirm, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([245, 45, 237, 237], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelOpenInit` (0x25035747) function - pub fn channel_open_init( - &self, - msg: MsgChannelOpenInit, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([37, 3, 87, 71], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelOpenTry` (0x8b627bca) function - pub fn channel_open_try( - &self, - msg: MsgChannelOpenTry, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([139, 98, 123, 202], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channels` (0x5b3de260) function - pub fn channels( - &self, - p0: ::std::string::String, - p1: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - u8, - u8, - IbcCoreChannelV1CounterpartyData, - ::std::string::String, - ), - > { - self.0 - .method_hash([91, 61, 226, 96], (p0, p1)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientImpls` (0xd1297b8d) function - pub fn client_impls( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([209, 41, 123, 141], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientRegistry` (0x990491a5) function - pub fn client_registry( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([153, 4, 145, 165], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientTypes` (0xc2380105) function - pub fn client_types( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([194, 56, 1, 5], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `commitments` (0x839df945) function - pub fn commitments( - &self, - p0: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([131, 157, 249, 69], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connections` (0x31973f00) function - pub fn connections( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - ::std::string::String, - u8, - IbcCoreConnectionV1CounterpartyData, - u64, - ), - > { - self.0 - .method_hash([49, 151, 63, 0], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getClient` (0x7eb78932) function - pub fn get_client( - &self, - client_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([126, 183, 137, 50], client_id) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextChannelSequencePath` (0x8669fd15) function - pub fn next_channel_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([134, 105, 253, 21], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextClientSequencePath` (0x990c3888) function - pub fn next_client_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([153, 12, 56, 136], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextConnectionSequencePath` (0x46807086) function - pub fn next_connection_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([70, 128, 112, 134], ()) - .expect("method not found (this should never happen)") - } - /// Gets the contract's `ChannelCloseConfirm` event - pub fn channel_close_confirm_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ChannelCloseConfirmFilter> - { - self.0.event() - } - /// Gets the contract's `ChannelCloseInit` event - pub fn channel_close_init_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ChannelCloseInitFilter> - { - self.0.event() - } - /// Gets the contract's `ChannelOpenAck` event - pub fn channel_open_ack_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ChannelOpenAckFilter> - { - self.0.event() - } - /// Gets the contract's `ChannelOpenConfirm` event - pub fn channel_open_confirm_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ChannelOpenConfirmFilter> - { - self.0.event() - } - /// Gets the contract's `ChannelOpenInit` event - pub fn channel_open_init_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ChannelOpenInitFilter> - { - self.0.event() - } - /// Gets the contract's `ChannelOpenTry` event - pub fn channel_open_try_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ChannelOpenTryFilter> - { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, IBCChannelHandshakeEvents> - { - self.0 - .event_with_filter(::core::default::Default::default()) - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> - for IBCChannelHandshake - { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - /// Custom Error type `ErrCapabilityAlreadyClaimed` with signature `ErrCapabilityAlreadyClaimed()` and selector `0x463eec90` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrCapabilityAlreadyClaimed", - abi = "ErrCapabilityAlreadyClaimed()" - )] - pub struct ErrCapabilityAlreadyClaimed; - /// Custom Error type `ErrClientNotFound` with signature `ErrClientNotFound()` and selector `0xb6c71f7d` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrClientNotFound", abi = "ErrClientNotFound()")] - pub struct ErrClientNotFound; - /// Custom Error type `ErrConnNotSingleHop` with signature `ErrConnNotSingleHop()` and selector `0xd4377a90` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrConnNotSingleHop", abi = "ErrConnNotSingleHop()")] - pub struct ErrConnNotSingleHop; - /// Custom Error type `ErrConnNotSingleVersion` with signature `ErrConnNotSingleVersion()` and selector `0xcc6fef24` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrConnNotSingleVersion", abi = "ErrConnNotSingleVersion()")] - pub struct ErrConnNotSingleVersion; - /// Custom Error type `ErrCounterpartyChannelNotEmpty` with signature `ErrCounterpartyChannelNotEmpty()` and selector `0x32699362` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrCounterpartyChannelNotEmpty", - abi = "ErrCounterpartyChannelNotEmpty()" - )] - pub struct ErrCounterpartyChannelNotEmpty; - /// Custom Error type `ErrInvalidChannelState` with signature `ErrInvalidChannelState()` and selector `0x96d09146` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidChannelState", abi = "ErrInvalidChannelState()")] - pub struct ErrInvalidChannelState; - /// Custom Error type `ErrInvalidConnectionState` with signature `ErrInvalidConnectionState()` and selector `0x8ca98990` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidConnectionState", - abi = "ErrInvalidConnectionState()" - )] - pub struct ErrInvalidConnectionState; - /// Custom Error type `ErrInvalidHexAddress` with signature `ErrInvalidHexAddress()` and selector `0xfe6f1570` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidHexAddress", abi = "ErrInvalidHexAddress()")] - pub struct ErrInvalidHexAddress; - /// Custom Error type `ErrInvalidProof` with signature `ErrInvalidProof()` and selector `0x14209932` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidProof", abi = "ErrInvalidProof()")] - pub struct ErrInvalidProof; - /// Custom Error type `ErrUnsupportedFeature` with signature `ErrUnsupportedFeature()` and selector `0x5d191fae` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrUnsupportedFeature", abi = "ErrUnsupportedFeature()")] - pub struct ErrUnsupportedFeature; - /// Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCChannelHandshakeErrors { - ErrCapabilityAlreadyClaimed(ErrCapabilityAlreadyClaimed), - ErrClientNotFound(ErrClientNotFound), - ErrConnNotSingleHop(ErrConnNotSingleHop), - ErrConnNotSingleVersion(ErrConnNotSingleVersion), - ErrCounterpartyChannelNotEmpty(ErrCounterpartyChannelNotEmpty), - ErrInvalidChannelState(ErrInvalidChannelState), - ErrInvalidConnectionState(ErrInvalidConnectionState), - ErrInvalidHexAddress(ErrInvalidHexAddress), - ErrInvalidProof(ErrInvalidProof), - ErrUnsupportedFeature(ErrUnsupportedFeature), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for IBCChannelHandshakeErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) - { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrCapabilityAlreadyClaimed(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ErrClientNotFound(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrConnNotSingleHop(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrConnNotSingleVersion(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrCounterpartyChannelNotEmpty(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidChannelState(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidConnectionState(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidHexAddress(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ErrInvalidProof(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrUnsupportedFeature(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IBCChannelHandshakeErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::ErrCapabilityAlreadyClaimed(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrClientNotFound(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrConnNotSingleHop(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrConnNotSingleVersion(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrCounterpartyChannelNotEmpty(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidChannelState(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidConnectionState(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidHexAddress(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidProof(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrUnsupportedFeature(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for IBCChannelHandshakeErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for IBCChannelHandshakeErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ErrCapabilityAlreadyClaimed(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrClientNotFound(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrConnNotSingleHop(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrConnNotSingleVersion(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrCounterpartyChannelNotEmpty(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrInvalidChannelState(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidConnectionState(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidHexAddress(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidProof(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrUnsupportedFeature(element) => ::core::fmt::Display::fmt(element, f), - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for IBCChannelHandshakeErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeErrors { - fn from(value: ErrCapabilityAlreadyClaimed) -> Self { - Self::ErrCapabilityAlreadyClaimed(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeErrors { - fn from(value: ErrClientNotFound) -> Self { - Self::ErrClientNotFound(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeErrors { - fn from(value: ErrConnNotSingleHop) -> Self { - Self::ErrConnNotSingleHop(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeErrors { - fn from(value: ErrConnNotSingleVersion) -> Self { - Self::ErrConnNotSingleVersion(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeErrors { - fn from(value: ErrCounterpartyChannelNotEmpty) -> Self { - Self::ErrCounterpartyChannelNotEmpty(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeErrors { - fn from(value: ErrInvalidChannelState) -> Self { - Self::ErrInvalidChannelState(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeErrors { - fn from(value: ErrInvalidConnectionState) -> Self { - Self::ErrInvalidConnectionState(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeErrors { - fn from(value: ErrInvalidHexAddress) -> Self { - Self::ErrInvalidHexAddress(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeErrors { - fn from(value: ErrInvalidProof) -> Self { - Self::ErrInvalidProof(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeErrors { - fn from(value: ErrUnsupportedFeature) -> Self { - Self::ErrUnsupportedFeature(value) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "ChannelCloseConfirm", - abi = "ChannelCloseConfirm(string,string)" - )] - pub struct ChannelCloseConfirmFilter { - pub channel_id: ::std::string::String, - pub port_id: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent(name = "ChannelCloseInit", abi = "ChannelCloseInit(string,string)")] - pub struct ChannelCloseInitFilter { - pub channel_id: ::std::string::String, - pub port_id: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "ChannelOpenAck", - abi = "ChannelOpenAck(string,string,string,string,string)" - )] - pub struct ChannelOpenAckFilter { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - pub counterparty_port_id: ::std::string::String, - pub counterparty_channel_id: ::std::string::String, - pub connection_id: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "ChannelOpenConfirm", - abi = "ChannelOpenConfirm(string,string,string,string,string)" - )] - pub struct ChannelOpenConfirmFilter { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - pub counterparty_port_id: ::std::string::String, - pub counterparty_channel_id: ::std::string::String, - pub connection_id: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "ChannelOpenInit", - abi = "ChannelOpenInit(string,string,string,string,string)" - )] - pub struct ChannelOpenInitFilter { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - pub counterparty_port_id: ::std::string::String, - pub connection_id: ::std::string::String, - pub version: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "ChannelOpenTry", - abi = "ChannelOpenTry(string,string,string,string,string,string)" - )] - pub struct ChannelOpenTryFilter { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - pub counterparty_port_id: ::std::string::String, - pub counterparty_channel_id: ::std::string::String, - pub connection_id: ::std::string::String, - pub version: ::std::string::String, - } - /// Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - pub enum IBCChannelHandshakeEvents { - ChannelCloseConfirmFilter(ChannelCloseConfirmFilter), - ChannelCloseInitFilter(ChannelCloseInitFilter), - ChannelOpenAckFilter(ChannelOpenAckFilter), - ChannelOpenConfirmFilter(ChannelOpenConfirmFilter), - ChannelOpenInitFilter(ChannelOpenInitFilter), - ChannelOpenTryFilter(ChannelOpenTryFilter), - } - impl ::ethers::contract::EthLogDecode for IBCChannelHandshakeEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ChannelCloseConfirmFilter::decode_log(log) { - return Ok(IBCChannelHandshakeEvents::ChannelCloseConfirmFilter( - decoded, - )); - } - if let Ok(decoded) = ChannelCloseInitFilter::decode_log(log) { - return Ok(IBCChannelHandshakeEvents::ChannelCloseInitFilter(decoded)); - } - if let Ok(decoded) = ChannelOpenAckFilter::decode_log(log) { - return Ok(IBCChannelHandshakeEvents::ChannelOpenAckFilter(decoded)); - } - if let Ok(decoded) = ChannelOpenConfirmFilter::decode_log(log) { - return Ok(IBCChannelHandshakeEvents::ChannelOpenConfirmFilter(decoded)); - } - if let Ok(decoded) = ChannelOpenInitFilter::decode_log(log) { - return Ok(IBCChannelHandshakeEvents::ChannelOpenInitFilter(decoded)); - } - if let Ok(decoded) = ChannelOpenTryFilter::decode_log(log) { - return Ok(IBCChannelHandshakeEvents::ChannelOpenTryFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IBCChannelHandshakeEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ChannelCloseConfirmFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelCloseInitFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenAckFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenConfirmFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenInitFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenTryFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IBCChannelHandshakeEvents { - fn from(value: ChannelCloseConfirmFilter) -> Self { - Self::ChannelCloseConfirmFilter(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeEvents { - fn from(value: ChannelCloseInitFilter) -> Self { - Self::ChannelCloseInitFilter(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeEvents { - fn from(value: ChannelOpenAckFilter) -> Self { - Self::ChannelOpenAckFilter(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeEvents { - fn from(value: ChannelOpenConfirmFilter) -> Self { - Self::ChannelOpenConfirmFilter(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeEvents { - fn from(value: ChannelOpenInitFilter) -> Self { - Self::ChannelOpenInitFilter(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeEvents { - fn from(value: ChannelOpenTryFilter) -> Self { - Self::ChannelOpenTryFilter(value) - } - } - /// Container type for all input parameters for the `COMMITMENT_PREFIX` function with signature `COMMITMENT_PREFIX()` and selector `0xa9550dac` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "COMMITMENT_PREFIX", abi = "COMMITMENT_PREFIX()")] - pub struct CommitmentPrefixCall; - /// Container type for all input parameters for the `capabilities` function with signature `capabilities(string)` and selector `0x5717bcf5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "capabilities", abi = "capabilities(string)")] - pub struct CapabilitiesCall(pub ::std::string::String); - /// Container type for all input parameters for the `channelCapabilityPath` function with signature `channelCapabilityPath(string,string)` and selector `0x3bc3339f` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelCapabilityPath", - abi = "channelCapabilityPath(string,string)" - )] - pub struct ChannelCapabilityPathCall { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - } - /// Container type for all input parameters for the `channelCloseConfirm` function with signature `channelCloseConfirm((string,string,bytes,(uint64,uint64),address))` and selector `0x6e92edaf` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelCloseConfirm", - abi = "channelCloseConfirm((string,string,bytes,(uint64,uint64),address))" - )] - pub struct ChannelCloseConfirmCall { - pub msg: MsgChannelCloseConfirm, - } - /// Container type for all input parameters for the `channelCloseInit` function with signature `channelCloseInit((string,string,address))` and selector `0x96549d92` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelCloseInit", - abi = "channelCloseInit((string,string,address))" - )] - pub struct ChannelCloseInitCall { - pub msg: MsgChannelCloseInit, - } - /// Container type for all input parameters for the `channelOpenAck` function with signature `channelOpenAck((string,string,string,string,bytes,(uint64,uint64),address))` and selector `0xdeff27b9` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelOpenAck", - abi = "channelOpenAck((string,string,string,string,bytes,(uint64,uint64),address))" - )] - pub struct ChannelOpenAckCall { - pub msg: MsgChannelOpenAck, - } - /// Container type for all input parameters for the `channelOpenConfirm` function with signature `channelOpenConfirm((string,string,bytes,(uint64,uint64),address))` and selector `0xf52deded` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelOpenConfirm", - abi = "channelOpenConfirm((string,string,bytes,(uint64,uint64),address))" - )] - pub struct ChannelOpenConfirmCall { - pub msg: MsgChannelOpenConfirm, - } - /// Container type for all input parameters for the `channelOpenInit` function with signature `channelOpenInit((string,(uint8,uint8,(string,string),string[],string),address))` and selector `0x25035747` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelOpenInit", - abi = "channelOpenInit((string,(uint8,uint8,(string,string),string[],string),address))" - )] - pub struct ChannelOpenInitCall { - pub msg: MsgChannelOpenInit, - } - /// Container type for all input parameters for the `channelOpenTry` function with signature `channelOpenTry((string,(uint8,uint8,(string,string),string[],string),string,bytes,(uint64,uint64),address))` and selector `0x8b627bca` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelOpenTry", - abi = "channelOpenTry((string,(uint8,uint8,(string,string),string[],string),string,bytes,(uint64,uint64),address))" - )] - pub struct ChannelOpenTryCall { - pub msg: MsgChannelOpenTry, - } - /// Container type for all input parameters for the `channels` function with signature `channels(string,string)` and selector `0x5b3de260` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "channels", abi = "channels(string,string)")] - pub struct ChannelsCall(pub ::std::string::String, pub ::std::string::String); - /// Container type for all input parameters for the `clientImpls` function with signature `clientImpls(string)` and selector `0xd1297b8d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientImpls", abi = "clientImpls(string)")] - pub struct ClientImplsCall(pub ::std::string::String); - /// Container type for all input parameters for the `clientRegistry` function with signature `clientRegistry(string)` and selector `0x990491a5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientRegistry", abi = "clientRegistry(string)")] - pub struct ClientRegistryCall(pub ::std::string::String); - /// Container type for all input parameters for the `clientTypes` function with signature `clientTypes(string)` and selector `0xc2380105` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientTypes", abi = "clientTypes(string)")] - pub struct ClientTypesCall(pub ::std::string::String); - /// Container type for all input parameters for the `commitments` function with signature `commitments(bytes32)` and selector `0x839df945` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "commitments", abi = "commitments(bytes32)")] - pub struct CommitmentsCall(pub [u8; 32]); - /// Container type for all input parameters for the `connections` function with signature `connections(string)` and selector `0x31973f00` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "connections", abi = "connections(string)")] - pub struct ConnectionsCall(pub ::std::string::String); - /// Container type for all input parameters for the `getClient` function with signature `getClient(string)` and selector `0x7eb78932` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getClient", abi = "getClient(string)")] - pub struct GetClientCall { - pub client_id: ::std::string::String, - } - /// Container type for all input parameters for the `nextChannelSequencePath` function with signature `nextChannelSequencePath()` and selector `0x8669fd15` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "nextChannelSequencePath", abi = "nextChannelSequencePath()")] - pub struct NextChannelSequencePathCall; - /// Container type for all input parameters for the `nextClientSequencePath` function with signature `nextClientSequencePath()` and selector `0x990c3888` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "nextClientSequencePath", abi = "nextClientSequencePath()")] - pub struct NextClientSequencePathCall; - /// Container type for all input parameters for the `nextConnectionSequencePath` function with signature `nextConnectionSequencePath()` and selector `0x46807086` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "nextConnectionSequencePath", - abi = "nextConnectionSequencePath()" - )] - pub struct NextConnectionSequencePathCall; - /// Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCChannelHandshakeCalls { - CommitmentPrefix(CommitmentPrefixCall), - Capabilities(CapabilitiesCall), - ChannelCapabilityPath(ChannelCapabilityPathCall), - ChannelCloseConfirm(ChannelCloseConfirmCall), - ChannelCloseInit(ChannelCloseInitCall), - ChannelOpenAck(ChannelOpenAckCall), - ChannelOpenConfirm(ChannelOpenConfirmCall), - ChannelOpenInit(ChannelOpenInitCall), - ChannelOpenTry(ChannelOpenTryCall), - Channels(ChannelsCall), - ClientImpls(ClientImplsCall), - ClientRegistry(ClientRegistryCall), - ClientTypes(ClientTypesCall), - Commitments(CommitmentsCall), - Connections(ConnectionsCall), - GetClient(GetClientCall), - NextChannelSequencePath(NextChannelSequencePathCall), - NextClientSequencePath(NextClientSequencePathCall), - NextConnectionSequencePath(NextConnectionSequencePathCall), - } - impl ::ethers::core::abi::AbiDecode for IBCChannelHandshakeCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::CommitmentPrefix(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::Capabilities(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelCapabilityPath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelCloseConfirm(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelCloseInit(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelOpenAck(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelOpenConfirm(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelOpenInit(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelOpenTry(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Channels(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ClientImpls(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ClientRegistry(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ClientTypes(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Commitments(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Connections(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::GetClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextChannelSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextClientSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextConnectionSequencePath(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IBCChannelHandshakeCalls { - fn encode(self) -> Vec { - match self { - Self::CommitmentPrefix(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Capabilities(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChannelCapabilityPath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ChannelCloseConfirm(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ChannelCloseInit(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChannelOpenAck(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChannelOpenConfirm(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ChannelOpenInit(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChannelOpenTry(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Channels(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientImpls(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientRegistry(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientTypes(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Commitments(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Connections(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::NextChannelSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextClientSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextConnectionSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for IBCChannelHandshakeCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::CommitmentPrefix(element) => ::core::fmt::Display::fmt(element, f), - Self::Capabilities(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelCapabilityPath(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelCloseConfirm(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelCloseInit(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenAck(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenConfirm(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenInit(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenTry(element) => ::core::fmt::Display::fmt(element, f), - Self::Channels(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientImpls(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientRegistry(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientTypes(element) => ::core::fmt::Display::fmt(element, f), - Self::Commitments(element) => ::core::fmt::Display::fmt(element, f), - Self::Connections(element) => ::core::fmt::Display::fmt(element, f), - Self::GetClient(element) => ::core::fmt::Display::fmt(element, f), - Self::NextChannelSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::NextClientSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::NextConnectionSequencePath(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: CommitmentPrefixCall) -> Self { - Self::CommitmentPrefix(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: CapabilitiesCall) -> Self { - Self::Capabilities(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ChannelCapabilityPathCall) -> Self { - Self::ChannelCapabilityPath(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ChannelCloseConfirmCall) -> Self { - Self::ChannelCloseConfirm(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ChannelCloseInitCall) -> Self { - Self::ChannelCloseInit(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ChannelOpenAckCall) -> Self { - Self::ChannelOpenAck(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ChannelOpenConfirmCall) -> Self { - Self::ChannelOpenConfirm(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ChannelOpenInitCall) -> Self { - Self::ChannelOpenInit(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ChannelOpenTryCall) -> Self { - Self::ChannelOpenTry(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ChannelsCall) -> Self { - Self::Channels(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ClientImplsCall) -> Self { - Self::ClientImpls(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ClientRegistryCall) -> Self { - Self::ClientRegistry(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ClientTypesCall) -> Self { - Self::ClientTypes(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: CommitmentsCall) -> Self { - Self::Commitments(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: ConnectionsCall) -> Self { - Self::Connections(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: GetClientCall) -> Self { - Self::GetClient(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: NextChannelSequencePathCall) -> Self { - Self::NextChannelSequencePath(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: NextClientSequencePathCall) -> Self { - Self::NextClientSequencePath(value) - } - } - impl ::core::convert::From for IBCChannelHandshakeCalls { - fn from(value: NextConnectionSequencePathCall) -> Self { - Self::NextConnectionSequencePath(value) - } - } - /// Container type for all return fields from the `COMMITMENT_PREFIX` function with signature `COMMITMENT_PREFIX()` and selector `0xa9550dac` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CommitmentPrefixReturn(pub ::std::string::String); - /// Container type for all return fields from the `capabilities` function with signature `capabilities(string)` and selector `0x5717bcf5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CapabilitiesReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `channelCapabilityPath` function with signature `channelCapabilityPath(string,string)` and selector `0x3bc3339f` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelCapabilityPathReturn(pub ::std::string::String); - /// Container type for all return fields from the `channelOpenInit` function with signature `channelOpenInit((string,(uint8,uint8,(string,string),string[],string),address))` and selector `0x25035747` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelOpenInitReturn(pub ::std::string::String); - /// Container type for all return fields from the `channelOpenTry` function with signature `channelOpenTry((string,(uint8,uint8,(string,string),string[],string),string,bytes,(uint64,uint64),address))` and selector `0x8b627bca` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelOpenTryReturn(pub ::std::string::String); - /// Container type for all return fields from the `channels` function with signature `channels(string,string)` and selector `0x5b3de260` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelsReturn { - pub state: u8, - pub ordering: u8, - pub counterparty: IbcCoreChannelV1CounterpartyData, - pub version: ::std::string::String, - } - /// Container type for all return fields from the `clientImpls` function with signature `clientImpls(string)` and selector `0xd1297b8d` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientImplsReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `clientRegistry` function with signature `clientRegistry(string)` and selector `0x990491a5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientRegistryReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `clientTypes` function with signature `clientTypes(string)` and selector `0xc2380105` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientTypesReturn(pub ::std::string::String); - /// Container type for all return fields from the `commitments` function with signature `commitments(bytes32)` and selector `0x839df945` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CommitmentsReturn(pub [u8; 32]); - /// Container type for all return fields from the `connections` function with signature `connections(string)` and selector `0x31973f00` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ConnectionsReturn { - pub client_id: ::std::string::String, - pub state: u8, - pub counterparty: IbcCoreConnectionV1CounterpartyData, - pub delay_period: u64, - } - /// Container type for all return fields from the `getClient` function with signature `getClient(string)` and selector `0x7eb78932` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetClientReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `nextChannelSequencePath` function with signature `nextChannelSequencePath()` and selector `0x8669fd15` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextChannelSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `nextClientSequencePath` function with signature `nextClientSequencePath()` and selector `0x990c3888` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextClientSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `nextConnectionSequencePath` function with signature `nextConnectionSequencePath()` and selector `0x46807086` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextConnectionSequencePathReturn(pub [u8; 32]); -} diff --git a/generated/rust/contracts/src/ibc_client.rs b/generated/rust/contracts/src/ibc_client.rs deleted file mode 100644 index 299b170b6a..0000000000 --- a/generated/rust/contracts/src/ibc_client.rs +++ /dev/null @@ -1,1734 +0,0 @@ -pub use ibc_client::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod ibc_client { - pub use super::super::shared_types::*; - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("COMMITMENT_PREFIX"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("COMMITMENT_PREFIX"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("capabilities"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("capabilities"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channels"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channels"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("state"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.State", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ordering"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.Order", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterparty"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientImpls"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientImpls"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientRegistry"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientRegistry"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientTypes"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientTypes"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("commitments"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("commitments"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connections"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connections"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("client_id"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("state"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreConnectionV1GlobalEnums.State", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterparty"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes - ],), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreConnectionV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delay_period"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("createClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("createClient"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct IBCMsgs.MsgCreateClient",), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getClient"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("contract ILightClient"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextChannelSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextChannelSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextClientSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextClientSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextConnectionSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextConnectionSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("registerClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("registerClient"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientType"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("client"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("contract ILightClient"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("updateClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("updateClient"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct IBCMsgs.MsgUpdateClient",), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("ClientCreated"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ClientCreated"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ClientRegistered"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ClientRegistered"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("clientType"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("clientAddress"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ClientUpdated"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ClientUpdated"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("height"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - indexed: false, - }, - ], - anonymous: false, - },], - ), - ]), - errors: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("ErrClientMustNotBeSelf"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrClientMustNotBeSelf",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrClientNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrClientNotFound"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrClientTypeAlreadyExists"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrClientTypeAlreadyExists",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrClientTypeNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrClientTypeNotFound",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrFailedToCreateClient"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrFailedToCreateClient",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrFailedToUpdateClient"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrFailedToUpdateClient",), - inputs: ::std::vec![], - },], - ), - ]), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static IBCCLIENT_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __BYTECODE: &[u8] = b"`\x80\x80`@R4a\0\x16Wa\x1Bf\x90\x81a\0\x1C\x829\xF3[`\0\x80\xFD\xFE`\x80\x80`@R`\x046\x10\x15a\0\x13W`\0\x80\xFD[`\x005`\xE0\x1C\x90\x81c\x18\xC1\x98p\x14a\x13\xD8WP\x80c1\x97?\0\x14a\x12\x12W\x80cF\x80p\x86\x14a\x11\xB9W\x80cW\x17\xBC\xF5\x14a\x11;W\x80c[=\xE2`\x14a\x0FwW\x80c~\xB7\x892\x14a\x0F\x05W\x80c\x83\x9D\xF9E\x14a\x0E\xBBW\x80c\x86i\xFD\x15\x14a\x0EbW\x80c\x99\x04\x91\xA5\x14a\r\xE4W\x80c\x99\x0C8\x88\x14a\r\x8BW\x80c\xA9U\r\xAC\x14a\r\x0FW\x80c\xC28\x01\x05\x14a\x0C\x81W\x80c\xD1){\x8D\x14a\x0B\xF0W\x80c\xF5\xDD7E\x14a\x08\xB9Wc\xFE\xD1,\xBF\x14a\0\xC4W`\0\x80\xFD[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x11a\x06\xA0W`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`\x0456\x03\x01\x12a\x06\xA0Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF` a\x01W`\x04\x805\x01\x80a\x185V[\x91\x90\x82`@Q\x93\x84\x92\x837\x81\x01`\x01\x81R\x03\x01\x90 T\x16\x80\x15a\x08\x8FWa\x01\x82`\x04\x805\x01\x80a\x185V[\x7F\x9B\x98 Hj\x05\xC0\x19>\xFB!Ll+\xA8\xFC\xE0,Z\\\x84\xAA\x05\x7F\x81\x99\xC9\x9F\x13\xFF\x93\x9B`\0\x81\x81R` \x81\x90R\x7F\xA1|F\xF2\xD2\xA8z\xA0_\x95i\x99\0\x11x\xD4\xF3\xA1w\xD8V\x04z\x83\xCC\xEB\xD6Mz.\xF4\x9DT\x92\x93\x90\x83\x80z\x18O\x03\xE9?\xF9\xF4\xDA\xA7\x97\xEDn8\xEDd\xBFj\x1F\x01\0\0\0\0\0\0\0\0\x80\x82\x10\x15a\x08\x80W[P`\n\x90m\x04\xEE-mA[\x85\xAC\xEF\x81\0\0\0\0\x80\x82\x10\x15a\x08sW[Pf#\x86\xF2o\xC1\0\0\x80\x82\x10\x15a\x08fW[Pc\x05\xF5\xE1\0\x80\x82\x10\x15a\x08YW[Pa'\x10\x80\x82\x10\x15a\x08LW[P`d\x81\x10\x15a\x08>W[\x10\x15a\x083W[`\n\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`!`\x01\x85\x01\x94\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a\x02\xC2a\x02\xAC\x88a\x15\xB7V[\x97a\x02\xBA`@Q\x99\x8Aa\x15vV[\x80\x89Ra\x15\xB7V[\x016` \x88\x017\x85\x01\x01[\x01\x91\x7F0123456789abcdef\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\x82\x06\x1A\x83S\x04\x90\x81\x15a\x03(W`\n\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90a\x02\xCDV[PPa\x03\x87\x91`!\x91\x86`@Q\x97\x88\x93` \x85\x017\x82\x01\x7F-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01Ra\x03x\x82Q\x80\x93` \x87\x85\x01\x91\x01a\x16FV[\x01\x03`\x01\x81\x01\x86R\x01\x84a\x15vV[`\x01\x82\x01\x80\x92\x11a\x08\x04W`\0R`\0` R`@`\0 Ua\x03\xB4`\x045`\x04\x01`\x045`\x04\x01a\x185V[`@\x93\x91\x93Q` \x81\x85Qa\x03\xCC\x81\x83\x85\x8A\x01a\x16FV[\x81\x01`\x02\x81R\x03\x01\x90 \x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x07\xD5Wa\x03\xF0\x82Ta\x16iV[`\x1F\x81\x11a\x07\x91W[P`\0`\x1F\x82\x11`\x01\x14a\x06\xC3W\x91\x81`\xA0\x94\x92a\x057\x94a\x05g\x98`\0\x92a\x06\xB8W[PP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90U[`@Q` \x81\x86Qa\x04d\x81\x83\x85\x8B\x01a\x16FV[\x81\x01`\x03\x81R\x03\x01\x90 \x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82T\x16\x17\x90U`\0a\x04\xAC`$`\x045\x01`\x045`\x04\x01a\x185V[a\x04\xC3`D`\x04\x94\x93\x945\x01`\x045`\x04\x01a\x185V[\x98\x90`@Q\x99\x8A\x97\x88\x96\x87\x95\x7F&)ck\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R```\x04\x88\x01Ra\x05\x07\x8D`d\x89\x01\x90a\x17pV[\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x88\x84\x03\x01`$\x89\x01Ra\x17\xB3V[\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x85\x84\x03\x01`D\x86\x01Ra\x17\xB3V[\x03\x92Z\xF1\x91\x82\x15a\x06\xACW`\0\x92`\0\x91`\0\x91a\x06UW[P\x15a\x06+Wa\x06'\x92a\x05\x93\x83a\x19UV[` \x81Q\x91\x01 `\0R`\0` R`@`\0 Ua\x05\xCC` \x82Q\x92\x01Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF` \x81\x83Q\x16\x92\x01Q\x16\x90\x84a\x19\xCFV[`\0R`\0` R`@`\0 U\x7F\xEB\x98\xDFG\r\x17&e8\xE4\xEE\x03IR f!\xFA\xD8\xD8l\xA3\x8B\t\x0E\x92\xF6E\x89\x10\x84\x82`@Q` \x81R\x80a\x06\x10` \x82\x01\x85a\x17pV[\x03\x90\xA1`@Q\x91\x82\x91` \x83R` \x83\x01\x90a\x17pV[\x03\x90\xF3[`\x04`@Q\x7F\x8B\x9F\x95\xB2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x93PPP`\xA0=`\xA0\x11a\x06\xA5W[a\x06n\x81\x84a\x15vV[\x82\x01`\xA0\x83\x82\x03\x12a\x06\xA0W`\x80a\x06\x8B\x84Q\x92` \x86\x01a\x18\x9BV[\x93\x01Q\x90\x81\x15\x15\x82\x03a\x06\xA0W\x92\x908a\x05\x80V[`\0\x80\xFD[P=a\x06dV[`@Q=`\0\x82>=\x90\xFD[\x015\x90P8\x80a\x04\x1DV[\x82`\0R` `\0 \x90`\0[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x84\x16\x81\x10a\x07yWP\x82a\x057\x94\x92a\x05g\x98`\x01\x93\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\xA0\x9A\x98\x16\x10a\x07AW[PPP\x81\x1B\x01\x90Ua\x04OV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U8\x80\x80a\x074V[\x90\x91` `\x01\x81\x92\x85\x8B\x015\x81U\x01\x93\x01\x91\x01a\x06\xD0V[\x82`\0R` `\0 `\x1F\x83\x01`\x05\x1C\x81\x01` \x84\x10a\x07\xCEW[`\x1F\x83\x01`\x05\x1C\x82\x01\x81\x10a\x07\xC2WPPa\x03\xF9V[`\0\x81U`\x01\x01a\x07\xACV[P\x80a\x07\xACV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[`\x01\x90\x91\x01\x90a\x02UV[`d`\x02\x91\x04\x93\x01\x92a\x02NV[`\x04\x91\x04\x93\x01\x928a\x02CV[`\x08\x91\x04\x93\x01\x928a\x026V[`\x10\x91\x04\x93\x01\x928a\x02'V[` \x91\x04\x93\x01\x928a\x02\x15V[`@\x93P\x82\x04\x90P`\na\x01\xF9V[`\x04`@Q\x7F\xAAG\x8A\xF9\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x81\x816\x01\x12a\x06\xA0Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91`\x045\x83\x81\x11a\x06\xA0W\x80`\x04\x01\x90``\x90``\x85\x826\x03\x01\x12a\x06\xA0Wa\t.a\t)a\t\"\x85\x80a\x185V[6\x91a\x15\xF1V[a\x19UV[\x84\x81Q\x91\x01 `\0R`\0\x84R`@`\0 T\x15a\x0B\xC6Wa\t\xD6`\0\x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\tva\tqa\t\"\x88\x80a\x185V[a\x17\xF2V[\x16\x90\x83`$a\t\xE5a\t\x95a\t\x8B\x8A\x80a\x185V[\x93\x90\x95\x01\x8Aa\x185V[`@\x9C\x91\x9CQ\x9C\x8D\x98\x89\x97\x88\x96\x7Fo\xBF\x80y\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x88R`@`\x04\x89\x01R`D\x88\x01\x91a\x17\xB3V[\x92\x85\x84\x03\x01`$\x86\x01Ra\x17\xB3V[\x03\x92Z\xF1\x80\x15a\x06\xACW`\0\x94`\0\x91a\x0B&W[P\x80Q\x94\x85\x15a\n\xFCWa\n\x14a\t)a\t\"\x86\x80a\x185V[\x85\x81Q\x91\x01 `\0R`\0\x85R`@`\0 U`\0[\x85\x81\x10a\n3W\0[\x80a\n@`\x01\x92\x84a\x19\x12V[QQa\n\x85a\nO\x87\x80a\x185V[\x90a\n\x80\x8C\x8Ba\n_\x88\x8Ba\x19\x12V[Q\x01QQ\x16\x91\x8D\x8C\x80a\nr\x8A\x8Da\x19\x12V[Q\x01Q\x01Q\x16\x936\x91a\x15\xF1V[a\x19\xCFV[`\0R`\0\x87R`@`\0 U\x7FY0(\x10\xA0\x19%\xD2\xF6\xE0h\xC5E\x04\xEA\xEF\xB0K\xA8\x9F@|\x10\x1E\xC4\x97\x1D\x14\xE2\xFDJ\x81a\n\xBD\x86\x80a\x185V[\x88a\n\xC8\x85\x88a\x19\x12V[Q\x01Q\x8B\x8Aa\n\xE2`@Q\x95\x86\x95\x8C\x87R\x8C\x87\x01\x91a\x17\xB3V[\x92\x82\x81Q\x16\x82\x86\x01R\x01Q\x16`@\x83\x01R\x03\x90\xA1\x01a\n*V[`\x04`@Q\x7F\xF1i\x119\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x94PP=\x80`\0\x86>a\x0B9\x81\x86a\x15vV[\x84\x01\x93`@\x81\x86\x03\x12a\x06\xA0W\x80Q\x90\x84\x81\x01Q\x90\x87\x82\x11a\x06\xA0W\x01\x85`\x1F\x82\x01\x12\x15a\x06\xA0W\x80Q\x87\x81\x11a\x07\xD5W`@Q\x96a\x0B}\x87\x83`\x05\x1B\x01\x89a\x15vV[\x81\x88R\x86``\x81\x8A\x01\x93\x02\x84\x01\x01\x92\x81\x84\x11a\x06\xA0W\x87\x80\x87\x92\x01\x93[\x85\x85\x10a\x0B\xAEWPPPPPP\x93\x86a\t\xFAV[a\x0B\xB8\x84\x86a\x18\x9BV[\x81R\x01\x92\x01\x91\x87\x86\x91a\x0B\x9AV[`\x04`@Q\x7F\xB6\xC7\x1F}\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x06\xA0Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x0Cm` a\x0CZ\x81\x946\x90`\x04\x01a\x16(V[\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x16FV[\x81\x01`\x03\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x06\xA0Wa\x0C\xF4a\x0C\xFBa\x0C\xDE` a\x0CZa\x06'\x956\x90`\x04\x01a\x16(V[\x81\x01`\x02\x81R\x03\x01\x90 `@Q\x92\x83\x80\x92a\x16\xBCV[\x03\x82a\x15vV[`@Q\x91\x82\x91` \x83R` \x83\x01\x90a\x17pV[4a\x06\xA0W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0Wa\x06'`@Qa\rM\x81a\x15ZV[`\x03\x81R\x7Fibc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R`@Q\x91\x82\x91` \x83R` \x83\x01\x90a\x17pV[4a\x06\xA0W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W` `@Q\x7F\x9B\x98 Hj\x05\xC0\x19>\xFB!Ll+\xA8\xFC\xE0,Z\\\x84\xAA\x05\x7F\x81\x99\xC9\x9F\x13\xFF\x93\x9B\x81R\xF3[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x06\xA0Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x0EN` a\x0CZ\x81\x946\x90`\x04\x01a\x16(V[\x81\x01`\x01\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[4a\x06\xA0W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W` `@Q\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm\x81R\xF3[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045`\0R`\0` R` `@`\0 T`@Q\x90\x81R\xF3[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x06\xA0Wa\x0FYa\tq` \x926\x90`\x04\x01a\x16(V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x16\x81R\xF3[4a\x06\xA0W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x06\xA0Wa\x0F\xC7\x906\x90`\x04\x01a\x16(V[\x90`$5\x90\x81\x11a\x06\xA0Wa\x0F\xE3a\x10\x1B\x916\x90`\x04\x01a\x16(V[`@Q\x90\x81\x84Q\x94\x81\x86a\x0F\xFE` \x98\x89\x97\x88\x80\x96\x01a\x16FV[\x81\x01`\x05\x81R\x03\x01\x90 \x82`@Q\x94\x83\x86\x80\x95Q\x93\x84\x92\x01a\x16FV[\x82\x01\x90\x81R\x03\x01\x90 \x90\x81T\x91`\x04`\xFF\x80\x85\x16\x94`\x08\x1C\x16`@Q\x92a\x10A\x84a\x15ZV[`@Qa\x10U\x81a\x0C\xF4\x81`\x01\x86\x01a\x16\xBCV[\x84Ra\x10\x8C`@Q\x91a\x10v\x83a\x10o\x81`\x02\x85\x01a\x16\xBCV[\x03\x84a\x15vV[\x86\x86\x01\x92\x83Ra\x10o`@Q\x80\x96\x81\x93\x01a\x16\xBCV[`@Q\x95`\x05\x81\x10\x15a\x11\x0CW\x86R`\x03\x82\x10\x15a\x11\x0CWa\x10\xCDa\x06'\x94a\x10\xFE\x93\x88\x97\x88\x01R`\x80`@\x88\x01RQ`@`\x80\x88\x01R`\xC0\x87\x01\x90a\x17pV[\x90Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x86\x83\x03\x01`\xA0\x87\x01Ra\x17pV[\x90\x83\x82\x03``\x85\x01Ra\x17pV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`!`\x04R`$`\0\xFD[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x06\xA0Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x11\xA5` a\x0CZ\x81\x946\x90`\x04\x01a\x16(V[\x81\x01`\x06\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[4a\x06\xA0W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W` `@Q\x7F\x8E\xF0z\xFD\xA4\xDE\xC4\xDCf\xE7\xD1\x8F\xC0\xE3\xA7\x13\xF7J\x11\xB3:qB,\x06\xA4\xB5\xE6#\xC3\xB2\x1A\x81R\xF3[4a\x06\xA0W` \x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x06\xA0W\x82a\x0CZa\x12g\x926\x90`\x04\x01a\x16(V[\x81\x01`\x04\x81R\x03\x01\x90 \x91`@Q\x92a\x12\x8B\x84a\x12\x84\x81\x84a\x16\xBCV[\x03\x85a\x15vV[`\xFF`\x02\x82\x01T\x16\x90`@Q\x92``\x84\x01\x84\x81\x10\x86\x82\x11\x17a\x07\xD5W\x80`@Ra\x12\xE5\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA0\x86a\x12\xDD\x84`\x03\x88\x01a\x16\xBCV[\x03\x01\x82a\x15vV[\x84R`@Q\x94a\x13\x03\x86a\x12\xFC\x81`\x04\x87\x01a\x16\xBCV[\x03\x87a\x15vV[\x81\x85\x01\x95\x86R`@Q\x92\x82\x84\x01\x90\x84\x82\x10\x83\x83\x11\x17a\x07\xD5W\x81`\x06\x92`@Ra\x13U\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x87a\x12\xDD\x84`\x05\x87\x01a\x16\xBCV[\x85R`@\x87\x01\x94\x85R\x01T\x16\x93a\x13w`@Q\x97`\x80\x89R`\x80\x89\x01\x90a\x17pV[\x90`\x04\x85\x10\x15a\x11\x0CW\x87\x96a\x13\xA9a\x13\xB7\x92a\x13\xCE\x97\x86\x8B\x01R\x89\x85\x03`@\x8B\x01RQ``\x85R``\x85\x01\x90a\x17pV[\x90Q\x83\x82\x03\x85\x85\x01Ra\x17pV[\x92Q\x90`@\x81\x85\x03\x91\x01RQ\x91\x81\x81R\x01\x90a\x17pV[\x90``\x83\x01R\x03\x90\xF3[4a\x06\xA0W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11a\x06\xA0W6`#\x83\x01\x12\x15a\x06\xA0W\x81`\x04\x015\x90\x81\x11a\x06\xA0W`$\x82\x01\x91`$\x826\x92\x01\x01\x11a\x06\xA0W`$5\x92s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x85\x16\x80\x95\x03a\x06\xA0W\x82\x84\x827` \x81\x84\x81\x01`\x01\x81R\x03\x01\x90 T\x16a\x150W0\x83\x14a\x15\x06W\x7F\xF7\x80\x9E\xF0\xAEyO\xDAda;\xF1\xA5\xBF,\x8DF\x12\x0EKLo\xCC\x1D\xD9\xFBf\xA4V\xAC;A\x92`@Q\x82\x84\x827` \x81\x84\x81\x01`\x01\x81R\x03\x01\x90 \x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82T\x16\x17\x90Ua\x14\xFB`@Q\x93\x84\x93`@\x85R`@\x85\x01\x91a\x17\xB3V[\x90` \x83\x01R\x03\x90\xA1\0[`\x04`@Q\x7FF\x8E\xF7\x87\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\x0C|\xC9\xB9\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`@\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x07\xD5W`@RV[\x90`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x07\xD5W`@RV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x07\xD5W`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16` \x01\x90V[\x92\x91\x92a\x15\xFD\x82a\x15\xB7V[\x91a\x16\x0B`@Q\x93\x84a\x15vV[\x82\x94\x81\x84R\x81\x83\x01\x11a\x06\xA0W\x82\x81` \x93\x84`\0\x96\x017\x01\x01RV[\x90\x80`\x1F\x83\x01\x12\x15a\x06\xA0W\x81` a\x16C\x935\x91\x01a\x15\xF1V[\x90V[`\0[\x83\x81\x10a\x16YWPP`\0\x91\x01RV[\x81\x81\x01Q\x83\x82\x01R` \x01a\x16IV[\x90`\x01\x82\x81\x1C\x92\x16\x80\x15a\x16\xB2W[` \x83\x10\x14a\x16\x83WV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[\x91`\x7F\x16\x91a\x16xV[\x80T`\0\x93\x92a\x16\xCB\x82a\x16iV[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a\x173WP`\x01\x14a\x16\xF2W[PPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a\x17\x1FWPPPP\x01\x01\x908\x80\x80\x80\x80a\x16\xEBV[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a\x17\x07V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x86\x85\x01RPPP\x90\x15\x15`\x05\x1B\x01\x01\x91P8\x80\x80\x80\x80a\x16\xEBV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F` \x93a\x17\xAC\x81Q\x80\x92\x81\x87R\x87\x80\x88\x01\x91\x01a\x16FV[\x01\x16\x01\x01\x90V[`\x1F\x82` \x94\x93\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x81\x86R\x86\x86\x017`\0\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x90V[a\x18 ` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x16FV[\x81\x01`\x03\x81R\x03\x01\x90 T\x16\x80\x15a\x0B\xC6W\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x06\xA0W\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x06\xA0W` \x01\x91\x816\x03\x83\x13a\x06\xA0WV[Q\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x06\xA0WV[\x80\x92\x91\x03\x91``\x83\x12a\x06\xA0W`@Qa\x18\xB4\x81a\x15ZV[`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x95\x84Q\x84R\x01\x12a\x06\xA0W` \x90a\x19\n`@\x80Q\x94a\x18\xF7\x86a\x15ZV[a\x19\x02\x85\x82\x01a\x18\x86V[\x86R\x01a\x18\x86V[\x82\x84\x01R\x01RV[\x80Q\x82\x10\x15a\x19&W` \x91`\x05\x1B\x01\x01\x90V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[a\x16C`4`@Q\x80\x93\x7Fclients/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x83\x01Ra\x19\x99\x81Q\x80\x92` `(\x86\x01\x91\x01a\x16FV[\x81\x01\x7F/clientState\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`(\x82\x01R\x03`\x14\x81\x01\x84R\x01\x82a\x15vV[\x91\x90`:a\x19\xF5a\x1A\xBD\x92a\x19\xEEg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x92\x16a\x1A\xC3V[\x94\x16a\x1A\xC3V[\x92`@Q\x93\x84\x91` \x83\x01\x96\x7Fclients/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x88Ra\x1A8\x81Q\x80\x92` `(\x88\x01\x91\x01a\x16FV[\x83\x01\x7F/consensusStates/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`(\x82\x01Ra\x1At\x82Q\x80\x93` `9\x85\x01\x91\x01a\x16FV[\x01\x7F-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`9\x82\x01Ra\x1A\xAE\x82Q\x80\x93` \x87\x85\x01\x91\x01a\x16FV[\x01\x03`\x1A\x81\x01\x84R\x01\x82a\x15vV[Q\x90 \x90V[\x90`@Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x80\x82\x01\x93`\xA0\x83\x01`@R`\0\x85R\x93[\x01\x92`\n\x90\x81\x81\x06`0\x01\x85S\x04\x92\x83\x15a\x1B6W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90a\x1A\xFAV[\x92P`\x80\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x92\x03\x01\x92\x01\x91\x82RV"; - /// The bytecode of the contract. - #[cfg(feature = "providers")] - pub static IBCCLIENT_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__BYTECODE); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __DEPLOYED_BYTECODE: &[u8] = b"`\x80\x80`@R`\x046\x10\x15a\0\x13W`\0\x80\xFD[`\x005`\xE0\x1C\x90\x81c\x18\xC1\x98p\x14a\x13\xD8WP\x80c1\x97?\0\x14a\x12\x12W\x80cF\x80p\x86\x14a\x11\xB9W\x80cW\x17\xBC\xF5\x14a\x11;W\x80c[=\xE2`\x14a\x0FwW\x80c~\xB7\x892\x14a\x0F\x05W\x80c\x83\x9D\xF9E\x14a\x0E\xBBW\x80c\x86i\xFD\x15\x14a\x0EbW\x80c\x99\x04\x91\xA5\x14a\r\xE4W\x80c\x99\x0C8\x88\x14a\r\x8BW\x80c\xA9U\r\xAC\x14a\r\x0FW\x80c\xC28\x01\x05\x14a\x0C\x81W\x80c\xD1){\x8D\x14a\x0B\xF0W\x80c\xF5\xDD7E\x14a\x08\xB9Wc\xFE\xD1,\xBF\x14a\0\xC4W`\0\x80\xFD[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x11a\x06\xA0W`\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`\x0456\x03\x01\x12a\x06\xA0Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF` a\x01W`\x04\x805\x01\x80a\x185V[\x91\x90\x82`@Q\x93\x84\x92\x837\x81\x01`\x01\x81R\x03\x01\x90 T\x16\x80\x15a\x08\x8FWa\x01\x82`\x04\x805\x01\x80a\x185V[\x7F\x9B\x98 Hj\x05\xC0\x19>\xFB!Ll+\xA8\xFC\xE0,Z\\\x84\xAA\x05\x7F\x81\x99\xC9\x9F\x13\xFF\x93\x9B`\0\x81\x81R` \x81\x90R\x7F\xA1|F\xF2\xD2\xA8z\xA0_\x95i\x99\0\x11x\xD4\xF3\xA1w\xD8V\x04z\x83\xCC\xEB\xD6Mz.\xF4\x9DT\x92\x93\x90\x83\x80z\x18O\x03\xE9?\xF9\xF4\xDA\xA7\x97\xEDn8\xEDd\xBFj\x1F\x01\0\0\0\0\0\0\0\0\x80\x82\x10\x15a\x08\x80W[P`\n\x90m\x04\xEE-mA[\x85\xAC\xEF\x81\0\0\0\0\x80\x82\x10\x15a\x08sW[Pf#\x86\xF2o\xC1\0\0\x80\x82\x10\x15a\x08fW[Pc\x05\xF5\xE1\0\x80\x82\x10\x15a\x08YW[Pa'\x10\x80\x82\x10\x15a\x08LW[P`d\x81\x10\x15a\x08>W[\x10\x15a\x083W[`\n\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`!`\x01\x85\x01\x94\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a\x02\xC2a\x02\xAC\x88a\x15\xB7V[\x97a\x02\xBA`@Q\x99\x8Aa\x15vV[\x80\x89Ra\x15\xB7V[\x016` \x88\x017\x85\x01\x01[\x01\x91\x7F0123456789abcdef\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\x82\x06\x1A\x83S\x04\x90\x81\x15a\x03(W`\n\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90a\x02\xCDV[PPa\x03\x87\x91`!\x91\x86`@Q\x97\x88\x93` \x85\x017\x82\x01\x7F-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01Ra\x03x\x82Q\x80\x93` \x87\x85\x01\x91\x01a\x16FV[\x01\x03`\x01\x81\x01\x86R\x01\x84a\x15vV[`\x01\x82\x01\x80\x92\x11a\x08\x04W`\0R`\0` R`@`\0 Ua\x03\xB4`\x045`\x04\x01`\x045`\x04\x01a\x185V[`@\x93\x91\x93Q` \x81\x85Qa\x03\xCC\x81\x83\x85\x8A\x01a\x16FV[\x81\x01`\x02\x81R\x03\x01\x90 \x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x07\xD5Wa\x03\xF0\x82Ta\x16iV[`\x1F\x81\x11a\x07\x91W[P`\0`\x1F\x82\x11`\x01\x14a\x06\xC3W\x91\x81`\xA0\x94\x92a\x057\x94a\x05g\x98`\0\x92a\x06\xB8W[PP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90U[`@Q` \x81\x86Qa\x04d\x81\x83\x85\x8B\x01a\x16FV[\x81\x01`\x03\x81R\x03\x01\x90 \x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82T\x16\x17\x90U`\0a\x04\xAC`$`\x045\x01`\x045`\x04\x01a\x185V[a\x04\xC3`D`\x04\x94\x93\x945\x01`\x045`\x04\x01a\x185V[\x98\x90`@Q\x99\x8A\x97\x88\x96\x87\x95\x7F&)ck\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R```\x04\x88\x01Ra\x05\x07\x8D`d\x89\x01\x90a\x17pV[\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x88\x84\x03\x01`$\x89\x01Ra\x17\xB3V[\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x85\x84\x03\x01`D\x86\x01Ra\x17\xB3V[\x03\x92Z\xF1\x91\x82\x15a\x06\xACW`\0\x92`\0\x91`\0\x91a\x06UW[P\x15a\x06+Wa\x06'\x92a\x05\x93\x83a\x19UV[` \x81Q\x91\x01 `\0R`\0` R`@`\0 Ua\x05\xCC` \x82Q\x92\x01Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF` \x81\x83Q\x16\x92\x01Q\x16\x90\x84a\x19\xCFV[`\0R`\0` R`@`\0 U\x7F\xEB\x98\xDFG\r\x17&e8\xE4\xEE\x03IR f!\xFA\xD8\xD8l\xA3\x8B\t\x0E\x92\xF6E\x89\x10\x84\x82`@Q` \x81R\x80a\x06\x10` \x82\x01\x85a\x17pV[\x03\x90\xA1`@Q\x91\x82\x91` \x83R` \x83\x01\x90a\x17pV[\x03\x90\xF3[`\x04`@Q\x7F\x8B\x9F\x95\xB2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x93PPP`\xA0=`\xA0\x11a\x06\xA5W[a\x06n\x81\x84a\x15vV[\x82\x01`\xA0\x83\x82\x03\x12a\x06\xA0W`\x80a\x06\x8B\x84Q\x92` \x86\x01a\x18\x9BV[\x93\x01Q\x90\x81\x15\x15\x82\x03a\x06\xA0W\x92\x908a\x05\x80V[`\0\x80\xFD[P=a\x06dV[`@Q=`\0\x82>=\x90\xFD[\x015\x90P8\x80a\x04\x1DV[\x82`\0R` `\0 \x90`\0[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x84\x16\x81\x10a\x07yWP\x82a\x057\x94\x92a\x05g\x98`\x01\x93\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\xA0\x9A\x98\x16\x10a\x07AW[PPP\x81\x1B\x01\x90Ua\x04OV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U8\x80\x80a\x074V[\x90\x91` `\x01\x81\x92\x85\x8B\x015\x81U\x01\x93\x01\x91\x01a\x06\xD0V[\x82`\0R` `\0 `\x1F\x83\x01`\x05\x1C\x81\x01` \x84\x10a\x07\xCEW[`\x1F\x83\x01`\x05\x1C\x82\x01\x81\x10a\x07\xC2WPPa\x03\xF9V[`\0\x81U`\x01\x01a\x07\xACV[P\x80a\x07\xACV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[`\x01\x90\x91\x01\x90a\x02UV[`d`\x02\x91\x04\x93\x01\x92a\x02NV[`\x04\x91\x04\x93\x01\x928a\x02CV[`\x08\x91\x04\x93\x01\x928a\x026V[`\x10\x91\x04\x93\x01\x928a\x02'V[` \x91\x04\x93\x01\x928a\x02\x15V[`@\x93P\x82\x04\x90P`\na\x01\xF9V[`\x04`@Q\x7F\xAAG\x8A\xF9\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x81\x816\x01\x12a\x06\xA0Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91`\x045\x83\x81\x11a\x06\xA0W\x80`\x04\x01\x90``\x90``\x85\x826\x03\x01\x12a\x06\xA0Wa\t.a\t)a\t\"\x85\x80a\x185V[6\x91a\x15\xF1V[a\x19UV[\x84\x81Q\x91\x01 `\0R`\0\x84R`@`\0 T\x15a\x0B\xC6Wa\t\xD6`\0\x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\tva\tqa\t\"\x88\x80a\x185V[a\x17\xF2V[\x16\x90\x83`$a\t\xE5a\t\x95a\t\x8B\x8A\x80a\x185V[\x93\x90\x95\x01\x8Aa\x185V[`@\x9C\x91\x9CQ\x9C\x8D\x98\x89\x97\x88\x96\x7Fo\xBF\x80y\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x88R`@`\x04\x89\x01R`D\x88\x01\x91a\x17\xB3V[\x92\x85\x84\x03\x01`$\x86\x01Ra\x17\xB3V[\x03\x92Z\xF1\x80\x15a\x06\xACW`\0\x94`\0\x91a\x0B&W[P\x80Q\x94\x85\x15a\n\xFCWa\n\x14a\t)a\t\"\x86\x80a\x185V[\x85\x81Q\x91\x01 `\0R`\0\x85R`@`\0 U`\0[\x85\x81\x10a\n3W\0[\x80a\n@`\x01\x92\x84a\x19\x12V[QQa\n\x85a\nO\x87\x80a\x185V[\x90a\n\x80\x8C\x8Ba\n_\x88\x8Ba\x19\x12V[Q\x01QQ\x16\x91\x8D\x8C\x80a\nr\x8A\x8Da\x19\x12V[Q\x01Q\x01Q\x16\x936\x91a\x15\xF1V[a\x19\xCFV[`\0R`\0\x87R`@`\0 U\x7FY0(\x10\xA0\x19%\xD2\xF6\xE0h\xC5E\x04\xEA\xEF\xB0K\xA8\x9F@|\x10\x1E\xC4\x97\x1D\x14\xE2\xFDJ\x81a\n\xBD\x86\x80a\x185V[\x88a\n\xC8\x85\x88a\x19\x12V[Q\x01Q\x8B\x8Aa\n\xE2`@Q\x95\x86\x95\x8C\x87R\x8C\x87\x01\x91a\x17\xB3V[\x92\x82\x81Q\x16\x82\x86\x01R\x01Q\x16`@\x83\x01R\x03\x90\xA1\x01a\n*V[`\x04`@Q\x7F\xF1i\x119\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x94PP=\x80`\0\x86>a\x0B9\x81\x86a\x15vV[\x84\x01\x93`@\x81\x86\x03\x12a\x06\xA0W\x80Q\x90\x84\x81\x01Q\x90\x87\x82\x11a\x06\xA0W\x01\x85`\x1F\x82\x01\x12\x15a\x06\xA0W\x80Q\x87\x81\x11a\x07\xD5W`@Q\x96a\x0B}\x87\x83`\x05\x1B\x01\x89a\x15vV[\x81\x88R\x86``\x81\x8A\x01\x93\x02\x84\x01\x01\x92\x81\x84\x11a\x06\xA0W\x87\x80\x87\x92\x01\x93[\x85\x85\x10a\x0B\xAEWPPPPPP\x93\x86a\t\xFAV[a\x0B\xB8\x84\x86a\x18\x9BV[\x81R\x01\x92\x01\x91\x87\x86\x91a\x0B\x9AV[`\x04`@Q\x7F\xB6\xC7\x1F}\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x06\xA0Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x0Cm` a\x0CZ\x81\x946\x90`\x04\x01a\x16(V[\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x16FV[\x81\x01`\x03\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x06\xA0Wa\x0C\xF4a\x0C\xFBa\x0C\xDE` a\x0CZa\x06'\x956\x90`\x04\x01a\x16(V[\x81\x01`\x02\x81R\x03\x01\x90 `@Q\x92\x83\x80\x92a\x16\xBCV[\x03\x82a\x15vV[`@Q\x91\x82\x91` \x83R` \x83\x01\x90a\x17pV[4a\x06\xA0W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0Wa\x06'`@Qa\rM\x81a\x15ZV[`\x03\x81R\x7Fibc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R`@Q\x91\x82\x91` \x83R` \x83\x01\x90a\x17pV[4a\x06\xA0W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W` `@Q\x7F\x9B\x98 Hj\x05\xC0\x19>\xFB!Ll+\xA8\xFC\xE0,Z\\\x84\xAA\x05\x7F\x81\x99\xC9\x9F\x13\xFF\x93\x9B\x81R\xF3[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x06\xA0Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x0EN` a\x0CZ\x81\x946\x90`\x04\x01a\x16(V[\x81\x01`\x01\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[4a\x06\xA0W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W` `@Q\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm\x81R\xF3[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045`\0R`\0` R` `@`\0 T`@Q\x90\x81R\xF3[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x06\xA0Wa\x0FYa\tq` \x926\x90`\x04\x01a\x16(V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x16\x81R\xF3[4a\x06\xA0W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x06\xA0Wa\x0F\xC7\x906\x90`\x04\x01a\x16(V[\x90`$5\x90\x81\x11a\x06\xA0Wa\x0F\xE3a\x10\x1B\x916\x90`\x04\x01a\x16(V[`@Q\x90\x81\x84Q\x94\x81\x86a\x0F\xFE` \x98\x89\x97\x88\x80\x96\x01a\x16FV[\x81\x01`\x05\x81R\x03\x01\x90 \x82`@Q\x94\x83\x86\x80\x95Q\x93\x84\x92\x01a\x16FV[\x82\x01\x90\x81R\x03\x01\x90 \x90\x81T\x91`\x04`\xFF\x80\x85\x16\x94`\x08\x1C\x16`@Q\x92a\x10A\x84a\x15ZV[`@Qa\x10U\x81a\x0C\xF4\x81`\x01\x86\x01a\x16\xBCV[\x84Ra\x10\x8C`@Q\x91a\x10v\x83a\x10o\x81`\x02\x85\x01a\x16\xBCV[\x03\x84a\x15vV[\x86\x86\x01\x92\x83Ra\x10o`@Q\x80\x96\x81\x93\x01a\x16\xBCV[`@Q\x95`\x05\x81\x10\x15a\x11\x0CW\x86R`\x03\x82\x10\x15a\x11\x0CWa\x10\xCDa\x06'\x94a\x10\xFE\x93\x88\x97\x88\x01R`\x80`@\x88\x01RQ`@`\x80\x88\x01R`\xC0\x87\x01\x90a\x17pV[\x90Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x86\x83\x03\x01`\xA0\x87\x01Ra\x17pV[\x90\x83\x82\x03``\x85\x01Ra\x17pV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`!`\x04R`$`\0\xFD[4a\x06\xA0W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x06\xA0Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x11\xA5` a\x0CZ\x81\x946\x90`\x04\x01a\x16(V[\x81\x01`\x06\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[4a\x06\xA0W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W` `@Q\x7F\x8E\xF0z\xFD\xA4\xDE\xC4\xDCf\xE7\xD1\x8F\xC0\xE3\xA7\x13\xF7J\x11\xB3:qB,\x06\xA4\xB5\xE6#\xC3\xB2\x1A\x81R\xF3[4a\x06\xA0W` \x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x06\xA0W\x82a\x0CZa\x12g\x926\x90`\x04\x01a\x16(V[\x81\x01`\x04\x81R\x03\x01\x90 \x91`@Q\x92a\x12\x8B\x84a\x12\x84\x81\x84a\x16\xBCV[\x03\x85a\x15vV[`\xFF`\x02\x82\x01T\x16\x90`@Q\x92``\x84\x01\x84\x81\x10\x86\x82\x11\x17a\x07\xD5W\x80`@Ra\x12\xE5\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA0\x86a\x12\xDD\x84`\x03\x88\x01a\x16\xBCV[\x03\x01\x82a\x15vV[\x84R`@Q\x94a\x13\x03\x86a\x12\xFC\x81`\x04\x87\x01a\x16\xBCV[\x03\x87a\x15vV[\x81\x85\x01\x95\x86R`@Q\x92\x82\x84\x01\x90\x84\x82\x10\x83\x83\x11\x17a\x07\xD5W\x81`\x06\x92`@Ra\x13U\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x87a\x12\xDD\x84`\x05\x87\x01a\x16\xBCV[\x85R`@\x87\x01\x94\x85R\x01T\x16\x93a\x13w`@Q\x97`\x80\x89R`\x80\x89\x01\x90a\x17pV[\x90`\x04\x85\x10\x15a\x11\x0CW\x87\x96a\x13\xA9a\x13\xB7\x92a\x13\xCE\x97\x86\x8B\x01R\x89\x85\x03`@\x8B\x01RQ``\x85R``\x85\x01\x90a\x17pV[\x90Q\x83\x82\x03\x85\x85\x01Ra\x17pV[\x92Q\x90`@\x81\x85\x03\x91\x01RQ\x91\x81\x81R\x01\x90a\x17pV[\x90``\x83\x01R\x03\x90\xF3[4a\x06\xA0W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x06\xA0W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11a\x06\xA0W6`#\x83\x01\x12\x15a\x06\xA0W\x81`\x04\x015\x90\x81\x11a\x06\xA0W`$\x82\x01\x91`$\x826\x92\x01\x01\x11a\x06\xA0W`$5\x92s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x85\x16\x80\x95\x03a\x06\xA0W\x82\x84\x827` \x81\x84\x81\x01`\x01\x81R\x03\x01\x90 T\x16a\x150W0\x83\x14a\x15\x06W\x7F\xF7\x80\x9E\xF0\xAEyO\xDAda;\xF1\xA5\xBF,\x8DF\x12\x0EKLo\xCC\x1D\xD9\xFBf\xA4V\xAC;A\x92`@Q\x82\x84\x827` \x81\x84\x81\x01`\x01\x81R\x03\x01\x90 \x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82T\x16\x17\x90Ua\x14\xFB`@Q\x93\x84\x93`@\x85R`@\x85\x01\x91a\x17\xB3V[\x90` \x83\x01R\x03\x90\xA1\0[`\x04`@Q\x7FF\x8E\xF7\x87\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\x0C|\xC9\xB9\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`@\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x07\xD5W`@RV[\x90`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x07\xD5W`@RV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x07\xD5W`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16` \x01\x90V[\x92\x91\x92a\x15\xFD\x82a\x15\xB7V[\x91a\x16\x0B`@Q\x93\x84a\x15vV[\x82\x94\x81\x84R\x81\x83\x01\x11a\x06\xA0W\x82\x81` \x93\x84`\0\x96\x017\x01\x01RV[\x90\x80`\x1F\x83\x01\x12\x15a\x06\xA0W\x81` a\x16C\x935\x91\x01a\x15\xF1V[\x90V[`\0[\x83\x81\x10a\x16YWPP`\0\x91\x01RV[\x81\x81\x01Q\x83\x82\x01R` \x01a\x16IV[\x90`\x01\x82\x81\x1C\x92\x16\x80\x15a\x16\xB2W[` \x83\x10\x14a\x16\x83WV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[\x91`\x7F\x16\x91a\x16xV[\x80T`\0\x93\x92a\x16\xCB\x82a\x16iV[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a\x173WP`\x01\x14a\x16\xF2W[PPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a\x17\x1FWPPPP\x01\x01\x908\x80\x80\x80\x80a\x16\xEBV[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a\x17\x07V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x86\x85\x01RPPP\x90\x15\x15`\x05\x1B\x01\x01\x91P8\x80\x80\x80\x80a\x16\xEBV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F` \x93a\x17\xAC\x81Q\x80\x92\x81\x87R\x87\x80\x88\x01\x91\x01a\x16FV[\x01\x16\x01\x01\x90V[`\x1F\x82` \x94\x93\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x81\x86R\x86\x86\x017`\0\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x90V[a\x18 ` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x16FV[\x81\x01`\x03\x81R\x03\x01\x90 T\x16\x80\x15a\x0B\xC6W\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x06\xA0W\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x06\xA0W` \x01\x91\x816\x03\x83\x13a\x06\xA0WV[Q\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x06\xA0WV[\x80\x92\x91\x03\x91``\x83\x12a\x06\xA0W`@Qa\x18\xB4\x81a\x15ZV[`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x95\x84Q\x84R\x01\x12a\x06\xA0W` \x90a\x19\n`@\x80Q\x94a\x18\xF7\x86a\x15ZV[a\x19\x02\x85\x82\x01a\x18\x86V[\x86R\x01a\x18\x86V[\x82\x84\x01R\x01RV[\x80Q\x82\x10\x15a\x19&W` \x91`\x05\x1B\x01\x01\x90V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[a\x16C`4`@Q\x80\x93\x7Fclients/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x83\x01Ra\x19\x99\x81Q\x80\x92` `(\x86\x01\x91\x01a\x16FV[\x81\x01\x7F/clientState\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`(\x82\x01R\x03`\x14\x81\x01\x84R\x01\x82a\x15vV[\x91\x90`:a\x19\xF5a\x1A\xBD\x92a\x19\xEEg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x92\x16a\x1A\xC3V[\x94\x16a\x1A\xC3V[\x92`@Q\x93\x84\x91` \x83\x01\x96\x7Fclients/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x88Ra\x1A8\x81Q\x80\x92` `(\x88\x01\x91\x01a\x16FV[\x83\x01\x7F/consensusStates/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`(\x82\x01Ra\x1At\x82Q\x80\x93` `9\x85\x01\x91\x01a\x16FV[\x01\x7F-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`9\x82\x01Ra\x1A\xAE\x82Q\x80\x93` \x87\x85\x01\x91\x01a\x16FV[\x01\x03`\x1A\x81\x01\x84R\x01\x82a\x15vV[Q\x90 \x90V[\x90`@Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x80\x82\x01\x93`\xA0\x83\x01`@R`\0\x85R\x93[\x01\x92`\n\x90\x81\x81\x06`0\x01\x85S\x04\x92\x83\x15a\x1B6W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90a\x1A\xFAV[\x92P`\x80\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x92\x03\x01\x92\x01\x91\x82RV"; - /// The deployed bytecode of the contract. - #[cfg(feature = "providers")] - pub static IBCCLIENT_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE); - #[cfg(feature = "providers")] - pub struct IBCClient(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for IBCClient { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for IBCClient { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for IBCClient { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for IBCClient { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IBCClient)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl IBCClient { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - IBCCLIENT_ABI.clone(), - client, - )) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - IBCCLIENT_ABI.clone(), - IBCCLIENT_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - /// Calls the contract's `COMMITMENT_PREFIX` (0xa9550dac) function - pub fn commitment_prefix( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 85, 13, 172], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `capabilities` (0x5717bcf5) function - pub fn capabilities( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([87, 23, 188, 245], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channels` (0x5b3de260) function - pub fn channels( - &self, - p0: ::std::string::String, - p1: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - u8, - u8, - IbcCoreChannelV1CounterpartyData, - ::std::string::String, - ), - > { - self.0 - .method_hash([91, 61, 226, 96], (p0, p1)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientImpls` (0xd1297b8d) function - pub fn client_impls( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([209, 41, 123, 141], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientRegistry` (0x990491a5) function - pub fn client_registry( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([153, 4, 145, 165], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientTypes` (0xc2380105) function - pub fn client_types( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([194, 56, 1, 5], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `commitments` (0x839df945) function - pub fn commitments( - &self, - p0: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([131, 157, 249, 69], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connections` (0x31973f00) function - pub fn connections( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - ::std::string::String, - u8, - IbcCoreConnectionV1CounterpartyData, - u64, - ), - > { - self.0 - .method_hash([49, 151, 63, 0], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `createClient` (0xfed12cbf) function - pub fn create_client( - &self, - msg: MsgCreateClient, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([254, 209, 44, 191], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getClient` (0x7eb78932) function - pub fn get_client( - &self, - client_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([126, 183, 137, 50], client_id) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextChannelSequencePath` (0x8669fd15) function - pub fn next_channel_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([134, 105, 253, 21], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextClientSequencePath` (0x990c3888) function - pub fn next_client_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([153, 12, 56, 136], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextConnectionSequencePath` (0x46807086) function - pub fn next_connection_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([70, 128, 112, 134], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `registerClient` (0x18c19870) function - pub fn register_client( - &self, - client_type: ::std::string::String, - client: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 193, 152, 112], (client_type, client)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `updateClient` (0xf5dd3745) function - pub fn update_client( - &self, - msg: MsgUpdateClient, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([245, 221, 55, 69], (msg,)) - .expect("method not found (this should never happen)") - } - /// Gets the contract's `ClientCreated` event - pub fn client_created_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ClientCreatedFilter> - { - self.0.event() - } - /// Gets the contract's `ClientRegistered` event - pub fn client_registered_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ClientRegisteredFilter> - { - self.0.event() - } - /// Gets the contract's `ClientUpdated` event - pub fn client_updated_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ClientUpdatedFilter> - { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, IBCClientEvents> { - self.0 - .event_with_filter(::core::default::Default::default()) - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> for IBCClient { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - /// Custom Error type `ErrClientMustNotBeSelf` with signature `ErrClientMustNotBeSelf()` and selector `0x468ef787` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrClientMustNotBeSelf", abi = "ErrClientMustNotBeSelf()")] - pub struct ErrClientMustNotBeSelf; - /// Custom Error type `ErrClientNotFound` with signature `ErrClientNotFound()` and selector `0xb6c71f7d` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrClientNotFound", abi = "ErrClientNotFound()")] - pub struct ErrClientNotFound; - /// Custom Error type `ErrClientTypeAlreadyExists` with signature `ErrClientTypeAlreadyExists()` and selector `0x0c7cc9b9` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrClientTypeAlreadyExists", - abi = "ErrClientTypeAlreadyExists()" - )] - pub struct ErrClientTypeAlreadyExists; - /// Custom Error type `ErrClientTypeNotFound` with signature `ErrClientTypeNotFound()` and selector `0xaa478af9` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrClientTypeNotFound", abi = "ErrClientTypeNotFound()")] - pub struct ErrClientTypeNotFound; - /// Custom Error type `ErrFailedToCreateClient` with signature `ErrFailedToCreateClient()` and selector `0x8b9f95b2` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrFailedToCreateClient", abi = "ErrFailedToCreateClient()")] - pub struct ErrFailedToCreateClient; - /// Custom Error type `ErrFailedToUpdateClient` with signature `ErrFailedToUpdateClient()` and selector `0xf1691139` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrFailedToUpdateClient", abi = "ErrFailedToUpdateClient()")] - pub struct ErrFailedToUpdateClient; - /// Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCClientErrors { - ErrClientMustNotBeSelf(ErrClientMustNotBeSelf), - ErrClientNotFound(ErrClientNotFound), - ErrClientTypeAlreadyExists(ErrClientTypeAlreadyExists), - ErrClientTypeNotFound(ErrClientTypeNotFound), - ErrFailedToCreateClient(ErrFailedToCreateClient), - ErrFailedToUpdateClient(ErrFailedToUpdateClient), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for IBCClientErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) - { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrClientMustNotBeSelf(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ErrClientNotFound(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrClientTypeAlreadyExists(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrClientTypeNotFound(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrFailedToCreateClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrFailedToUpdateClient(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IBCClientErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::ErrClientMustNotBeSelf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrClientNotFound(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrClientTypeAlreadyExists(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrClientTypeNotFound(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrFailedToCreateClient(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrFailedToUpdateClient(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for IBCClientErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for IBCClientErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ErrClientMustNotBeSelf(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrClientNotFound(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrClientTypeAlreadyExists(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrClientTypeNotFound(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrFailedToCreateClient(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrFailedToUpdateClient(element) => ::core::fmt::Display::fmt(element, f), - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for IBCClientErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for IBCClientErrors { - fn from(value: ErrClientMustNotBeSelf) -> Self { - Self::ErrClientMustNotBeSelf(value) - } - } - impl ::core::convert::From for IBCClientErrors { - fn from(value: ErrClientNotFound) -> Self { - Self::ErrClientNotFound(value) - } - } - impl ::core::convert::From for IBCClientErrors { - fn from(value: ErrClientTypeAlreadyExists) -> Self { - Self::ErrClientTypeAlreadyExists(value) - } - } - impl ::core::convert::From for IBCClientErrors { - fn from(value: ErrClientTypeNotFound) -> Self { - Self::ErrClientTypeNotFound(value) - } - } - impl ::core::convert::From for IBCClientErrors { - fn from(value: ErrFailedToCreateClient) -> Self { - Self::ErrFailedToCreateClient(value) - } - } - impl ::core::convert::From for IBCClientErrors { - fn from(value: ErrFailedToUpdateClient) -> Self { - Self::ErrFailedToUpdateClient(value) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent(name = "ClientCreated", abi = "ClientCreated(string)")] - pub struct ClientCreatedFilter { - pub client_id: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent(name = "ClientRegistered", abi = "ClientRegistered(string,address)")] - pub struct ClientRegisteredFilter { - pub client_type: ::std::string::String, - pub client_address: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent(name = "ClientUpdated", abi = "ClientUpdated(string,(uint64,uint64))")] - pub struct ClientUpdatedFilter { - pub client_id: ::std::string::String, - pub height: IbcCoreClientV1HeightData, - } - /// Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - pub enum IBCClientEvents { - ClientCreatedFilter(ClientCreatedFilter), - ClientRegisteredFilter(ClientRegisteredFilter), - ClientUpdatedFilter(ClientUpdatedFilter), - } - impl ::ethers::contract::EthLogDecode for IBCClientEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ClientCreatedFilter::decode_log(log) { - return Ok(IBCClientEvents::ClientCreatedFilter(decoded)); - } - if let Ok(decoded) = ClientRegisteredFilter::decode_log(log) { - return Ok(IBCClientEvents::ClientRegisteredFilter(decoded)); - } - if let Ok(decoded) = ClientUpdatedFilter::decode_log(log) { - return Ok(IBCClientEvents::ClientUpdatedFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IBCClientEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ClientCreatedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientRegisteredFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientUpdatedFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IBCClientEvents { - fn from(value: ClientCreatedFilter) -> Self { - Self::ClientCreatedFilter(value) - } - } - impl ::core::convert::From for IBCClientEvents { - fn from(value: ClientRegisteredFilter) -> Self { - Self::ClientRegisteredFilter(value) - } - } - impl ::core::convert::From for IBCClientEvents { - fn from(value: ClientUpdatedFilter) -> Self { - Self::ClientUpdatedFilter(value) - } - } - /// Container type for all input parameters for the `COMMITMENT_PREFIX` function with signature `COMMITMENT_PREFIX()` and selector `0xa9550dac` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "COMMITMENT_PREFIX", abi = "COMMITMENT_PREFIX()")] - pub struct CommitmentPrefixCall; - /// Container type for all input parameters for the `capabilities` function with signature `capabilities(string)` and selector `0x5717bcf5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "capabilities", abi = "capabilities(string)")] - pub struct CapabilitiesCall(pub ::std::string::String); - /// Container type for all input parameters for the `channels` function with signature `channels(string,string)` and selector `0x5b3de260` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "channels", abi = "channels(string,string)")] - pub struct ChannelsCall(pub ::std::string::String, pub ::std::string::String); - /// Container type for all input parameters for the `clientImpls` function with signature `clientImpls(string)` and selector `0xd1297b8d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientImpls", abi = "clientImpls(string)")] - pub struct ClientImplsCall(pub ::std::string::String); - /// Container type for all input parameters for the `clientRegistry` function with signature `clientRegistry(string)` and selector `0x990491a5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientRegistry", abi = "clientRegistry(string)")] - pub struct ClientRegistryCall(pub ::std::string::String); - /// Container type for all input parameters for the `clientTypes` function with signature `clientTypes(string)` and selector `0xc2380105` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientTypes", abi = "clientTypes(string)")] - pub struct ClientTypesCall(pub ::std::string::String); - /// Container type for all input parameters for the `commitments` function with signature `commitments(bytes32)` and selector `0x839df945` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "commitments", abi = "commitments(bytes32)")] - pub struct CommitmentsCall(pub [u8; 32]); - /// Container type for all input parameters for the `connections` function with signature `connections(string)` and selector `0x31973f00` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "connections", abi = "connections(string)")] - pub struct ConnectionsCall(pub ::std::string::String); - /// Container type for all input parameters for the `createClient` function with signature `createClient((string,bytes,bytes,address))` and selector `0xfed12cbf` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "createClient", - abi = "createClient((string,bytes,bytes,address))" - )] - pub struct CreateClientCall { - pub msg: MsgCreateClient, - } - /// Container type for all input parameters for the `getClient` function with signature `getClient(string)` and selector `0x7eb78932` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getClient", abi = "getClient(string)")] - pub struct GetClientCall { - pub client_id: ::std::string::String, - } - /// Container type for all input parameters for the `nextChannelSequencePath` function with signature `nextChannelSequencePath()` and selector `0x8669fd15` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "nextChannelSequencePath", abi = "nextChannelSequencePath()")] - pub struct NextChannelSequencePathCall; - /// Container type for all input parameters for the `nextClientSequencePath` function with signature `nextClientSequencePath()` and selector `0x990c3888` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "nextClientSequencePath", abi = "nextClientSequencePath()")] - pub struct NextClientSequencePathCall; - /// Container type for all input parameters for the `nextConnectionSequencePath` function with signature `nextConnectionSequencePath()` and selector `0x46807086` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "nextConnectionSequencePath", - abi = "nextConnectionSequencePath()" - )] - pub struct NextConnectionSequencePathCall; - /// Container type for all input parameters for the `registerClient` function with signature `registerClient(string,address)` and selector `0x18c19870` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "registerClient", abi = "registerClient(string,address)")] - pub struct RegisterClientCall { - pub client_type: ::std::string::String, - pub client: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `updateClient` function with signature `updateClient((string,bytes,address))` and selector `0xf5dd3745` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "updateClient", abi = "updateClient((string,bytes,address))")] - pub struct UpdateClientCall { - pub msg: MsgUpdateClient, - } - /// Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCClientCalls { - CommitmentPrefix(CommitmentPrefixCall), - Capabilities(CapabilitiesCall), - Channels(ChannelsCall), - ClientImpls(ClientImplsCall), - ClientRegistry(ClientRegistryCall), - ClientTypes(ClientTypesCall), - Commitments(CommitmentsCall), - Connections(ConnectionsCall), - CreateClient(CreateClientCall), - GetClient(GetClientCall), - NextChannelSequencePath(NextChannelSequencePathCall), - NextClientSequencePath(NextClientSequencePathCall), - NextConnectionSequencePath(NextConnectionSequencePathCall), - RegisterClient(RegisterClientCall), - UpdateClient(UpdateClientCall), - } - impl ::ethers::core::abi::AbiDecode for IBCClientCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::CommitmentPrefix(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::Capabilities(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Channels(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ClientImpls(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ClientRegistry(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ClientTypes(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Commitments(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Connections(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::CreateClient(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::GetClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextChannelSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextClientSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextConnectionSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::RegisterClient(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::UpdateClient(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IBCClientCalls { - fn encode(self) -> Vec { - match self { - Self::CommitmentPrefix(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Capabilities(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Channels(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientImpls(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientRegistry(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientTypes(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Commitments(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Connections(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::CreateClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::NextChannelSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextClientSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextConnectionSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RegisterClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::UpdateClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - } - } - } - impl ::core::fmt::Display for IBCClientCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::CommitmentPrefix(element) => ::core::fmt::Display::fmt(element, f), - Self::Capabilities(element) => ::core::fmt::Display::fmt(element, f), - Self::Channels(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientImpls(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientRegistry(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientTypes(element) => ::core::fmt::Display::fmt(element, f), - Self::Commitments(element) => ::core::fmt::Display::fmt(element, f), - Self::Connections(element) => ::core::fmt::Display::fmt(element, f), - Self::CreateClient(element) => ::core::fmt::Display::fmt(element, f), - Self::GetClient(element) => ::core::fmt::Display::fmt(element, f), - Self::NextChannelSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::NextClientSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::NextConnectionSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::RegisterClient(element) => ::core::fmt::Display::fmt(element, f), - Self::UpdateClient(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: CommitmentPrefixCall) -> Self { - Self::CommitmentPrefix(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: CapabilitiesCall) -> Self { - Self::Capabilities(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: ChannelsCall) -> Self { - Self::Channels(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: ClientImplsCall) -> Self { - Self::ClientImpls(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: ClientRegistryCall) -> Self { - Self::ClientRegistry(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: ClientTypesCall) -> Self { - Self::ClientTypes(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: CommitmentsCall) -> Self { - Self::Commitments(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: ConnectionsCall) -> Self { - Self::Connections(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: CreateClientCall) -> Self { - Self::CreateClient(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: GetClientCall) -> Self { - Self::GetClient(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: NextChannelSequencePathCall) -> Self { - Self::NextChannelSequencePath(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: NextClientSequencePathCall) -> Self { - Self::NextClientSequencePath(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: NextConnectionSequencePathCall) -> Self { - Self::NextConnectionSequencePath(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: RegisterClientCall) -> Self { - Self::RegisterClient(value) - } - } - impl ::core::convert::From for IBCClientCalls { - fn from(value: UpdateClientCall) -> Self { - Self::UpdateClient(value) - } - } - /// Container type for all return fields from the `COMMITMENT_PREFIX` function with signature `COMMITMENT_PREFIX()` and selector `0xa9550dac` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CommitmentPrefixReturn(pub ::std::string::String); - /// Container type for all return fields from the `capabilities` function with signature `capabilities(string)` and selector `0x5717bcf5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CapabilitiesReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `channels` function with signature `channels(string,string)` and selector `0x5b3de260` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelsReturn { - pub state: u8, - pub ordering: u8, - pub counterparty: IbcCoreChannelV1CounterpartyData, - pub version: ::std::string::String, - } - /// Container type for all return fields from the `clientImpls` function with signature `clientImpls(string)` and selector `0xd1297b8d` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientImplsReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `clientRegistry` function with signature `clientRegistry(string)` and selector `0x990491a5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientRegistryReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `clientTypes` function with signature `clientTypes(string)` and selector `0xc2380105` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientTypesReturn(pub ::std::string::String); - /// Container type for all return fields from the `commitments` function with signature `commitments(bytes32)` and selector `0x839df945` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CommitmentsReturn(pub [u8; 32]); - /// Container type for all return fields from the `connections` function with signature `connections(string)` and selector `0x31973f00` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ConnectionsReturn { - pub client_id: ::std::string::String, - pub state: u8, - pub counterparty: IbcCoreConnectionV1CounterpartyData, - pub delay_period: u64, - } - /// Container type for all return fields from the `createClient` function with signature `createClient((string,bytes,bytes,address))` and selector `0xfed12cbf` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CreateClientReturn { - pub client_id: ::std::string::String, - } - /// Container type for all return fields from the `getClient` function with signature `getClient(string)` and selector `0x7eb78932` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetClientReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `nextChannelSequencePath` function with signature `nextChannelSequencePath()` and selector `0x8669fd15` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextChannelSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `nextClientSequencePath` function with signature `nextClientSequencePath()` and selector `0x990c3888` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextClientSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `nextConnectionSequencePath` function with signature `nextConnectionSequencePath()` and selector `0x46807086` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextConnectionSequencePathReturn(pub [u8; 32]); -} diff --git a/generated/rust/contracts/src/ibc_connection.rs b/generated/rust/contracts/src/ibc_connection.rs deleted file mode 100644 index 16b36c4b4f..0000000000 --- a/generated/rust/contracts/src/ibc_connection.rs +++ /dev/null @@ -1,2164 +0,0 @@ -pub use ibc_connection::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod ibc_connection { - pub use super::super::shared_types::*; - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("COMMITMENT_PREFIX"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("COMMITMENT_PREFIX"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("capabilities"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("capabilities"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channels"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channels"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("state"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.State", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ordering"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.Order", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterparty"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientImpls"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientImpls"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientRegistry"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientRegistry"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientTypes"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientTypes"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("commitments"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("commitments"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connectionOpenAck"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connectionOpenAck"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ],), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgConnectionOpenAck", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connectionOpenConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connectionOpenConfirm",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgConnectionOpenConfirm", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connectionOpenInit"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connectionOpenInit"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ],), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes - ],), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgConnectionOpenInit", - ), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connectionOpenTry"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connectionOpenTry"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes - ],), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ],), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgConnectionOpenTry", - ), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connections"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connections"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("client_id"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("state"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreConnectionV1GlobalEnums.State", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterparty"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes - ],), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreConnectionV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delay_period"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getClient"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("contract ILightClient"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getCompatibleVersions"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getCompatibleVersions",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ],), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreConnectionV1Version.Data[]", - ), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextChannelSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextChannelSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextClientSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextClientSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextConnectionSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextConnectionSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("ConnectionOpenAck"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ConnectionOpenAck"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("connectionId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyClientId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyConnectionId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ConnectionOpenConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ConnectionOpenConfirm",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("connectionId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyClientId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyConnectionId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ConnectionOpenInit"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ConnectionOpenInit"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("connectionId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyClientId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ConnectionOpenTry"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ConnectionOpenTry"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("connectionId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyClientId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("counterpartyConnectionId",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ]), - errors: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("ErrClientNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrClientNotFound"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrConnectionAlreadyExists"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrConnectionAlreadyExists",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidConnectionState"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidConnectionState",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidProof"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidProof"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrNoCounterpartyVersion"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrNoCounterpartyVersion",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrUnsupportedVersion"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrUnsupportedVersion",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrValidateSelfClient"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrValidateSelfClient",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrVersionMustBeUnset"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrVersionMustBeUnset",), - inputs: ::std::vec![], - },], - ), - ]), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static IBCCONNECTION_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __BYTECODE: &[u8] = b"`\x80\x80`@R4a\0\x16WaA\x9B\x90\x81a\0\x1C\x829\xF3[`\0\x80\xFD\xFE`\x80`@R`\x046\x10\x15a\0\x12W`\0\x80\xFD[`\x005`\xE0\x1C\x80c1\x97?\0\x14a\x01'W\x80cF\x80p\x86\x14a\x01\"W\x80cW\x17\xBC\xF5\x14a\x01\x1DW\x80c[=\xE2`\x14a\x01\x18W\x80c{fm\xC1\x14a\x01\x13W\x80c~\xB7\x892\x14a\x01\x0EW\x80c\x83\x9D\xF9E\x14a\x01\tW\x80c\x86i\xFD\x15\x14a\x01\x04W\x80c\x87u\xF7\xF8\x14a\0\xFFW\x80c\x87\xC5M\xD4\x14a\0\xFAW\x80c\x99\x04\x91\xA5\x14a\0\xF5W\x80c\x99\x0C8\x88\x14a\0\xF0W\x80c\xA9U\r\xAC\x14a\0\xEBW\x80c\xC28\x01\x05\x14a\0\xE6W\x80c\xC8\xE4\xBC\xB9\x14a\0\xE1W\x80c\xD1){\x8D\x14a\0\xDCWc\xE7\xF3,\x0F\x14a\0\xD7W`\0\x80\xFD[a\x15\xF9V[a\x15\xC2V[a\x14{V[a\x14IV[a\x13\xCCV[a\x13'V[a\x12\xEAV[a\x10\xE7V[a\x0E\xA6V[a\r\xFDV[a\r\xB3V[a\r}V[a\tUV[a\x08aV[a\x07\x8DV[a\x074V[a\x06[V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`@\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x01wW`@RV[a\x01,V[` \x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x01wW`@RV[``\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x01wW`@RV[\x90`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x01wW`@RV[`@Q\x90a\x02\x02\x82a\x01|V[V[`@Q\x90a\x02\x02\x82a\x01\x98V[`@Q\x90`\xA0\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x01wW`@RV[`@Q\x90a\x02\x02\x82a\x01[V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x01wW`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16` \x01\x90V[\x92\x91\x92a\x02\x84\x82a\x02>V[\x91a\x02\x92`@Q\x93\x84a\x01\xB4V[\x82\x94\x81\x84R\x81\x83\x01\x11a\x02\xAFW\x82\x81` \x93\x84`\0\x96\x017\x01\x01RV[`\0\x80\xFD[\x90\x80`\x1F\x83\x01\x12\x15a\x02\xAFW\x81` a\x02\xCF\x935\x91\x01a\x02xV[\x90V[` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x82\x01\x12a\x02\xAFW`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x02\xAFWa\x02\xCF\x91`\x04\x01a\x02\xB4V[`\0[\x83\x81\x10a\x03.WPP`\0\x91\x01RV[\x81\x81\x01Q\x83\x82\x01R` \x01a\x03\x1EV[\x90a\x03Q` \x92\x82\x81Q\x94\x85\x92\x01a\x03\x1BV[\x01\x90V[` a\x03n\x91\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x03\x1BV[\x81\x01`\x04\x81R\x03\x01\x90 \x90V[` a\x03\x94\x91\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x03\x1BV[\x81\x01`\x05\x81R\x03\x01\x90 \x90V[` a\x03\xBA\x91\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x03\x1BV[\x81\x01`\x03\x81R\x03\x01\x90 \x90V[` \x90a\x03\xE1\x92\x82`@Q\x94\x83\x86\x80\x95Q\x93\x84\x92\x01a\x03\x1BV[\x82\x01\x90\x81R\x03\x01\x90 \x90V[\x90`\x01\x82\x81\x1C\x92\x16\x80\x15a\x046W[` \x83\x10\x14a\x04\x07WV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[\x91`\x7F\x16\x91a\x03\xFCV[\x80T`\0\x93\x92a\x04O\x82a\x03\xEDV[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a\x04\xB7WP`\x01\x14a\x04vW[PPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a\x04\xA3WPPPP\x01\x01\x908\x80\x80\x80\x80a\x04oV[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a\x04\x8BV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x86\x85\x01RPPP\x90\x15\x15`\x05\x1B\x01\x01\x91P8\x80\x80\x80\x80a\x04oV[\x90a\x02\x02a\x05\x08\x92`@Q\x93\x84\x80\x92a\x04@V[\x03\x83a\x01\xB4V[\x90`@\x91\x82Q\x92``\x84\x01\x93g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x86\x10\x81\x87\x11\x17a\x01wW\x85\x83R\x81\x95a\x05k\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA0\x84a\x05c\x84\x89a\x04@V[\x03\x01\x82a\x01\xB4V[\x82R\x82Qa\x05\x87\x81a\x05\x80\x81`\x01\x89\x01a\x04@V[\x03\x82a\x01\xB4V[` \x83\x01R\x82Q\x93` \x85\x01\x91\x85\x83\x10\x90\x83\x11\x17a\x01wW\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x85a\x05c\x84`\x02a\x05\xD4\x95\x82\x8AR\x01a\x04@V[\x83R\x01RV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F` \x93a\x06\x16\x81Q\x80\x92\x81\x87R\x87\x80\x88\x01\x91\x01a\x03\x1BV[\x01\x16\x01\x01\x90V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`!`\x04R`$`\0\xFD[`\x04\x11\x15a\x06VWV[a\x06\x1DV[4a\x02\xAFWa\x06qa\x06l6a\x02\xD2V[a\x03UV[`@Q\x90a\x06\x83\x82a\x05\x08\x81\x84a\x04@V[`\xFF`\x02\x82\x01T\x16g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x06a\x06\xA2`\x03\x85\x01a\x05\x0FV[\x93\x01T\x16\x90a\x06\xBC`@Q\x94`\x80\x86R`\x80\x86\x01\x90a\x05\xDAV[`\x04\x82\x10\x15a\x06VW\x84\x93` a\x07\x1D\x92a\x070\x94\x82\x88\x01R\x86\x81\x03`@\x88\x01R`@a\x07\x05a\x06\xF5\x85Q``\x85R``\x85\x01\x90a\x05\xDAV[\x84\x86\x01Q\x84\x82\x03\x86\x86\x01Ra\x05\xDAV[\x93\x01Q\x90`@\x81\x85\x03\x91\x01RQ\x91\x81\x81R\x01\x90a\x05\xDAV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x92\x16``\x84\x01RV[\x03\x90\xF3[4a\x02\xAFW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFW` `@Q\x7F\x8E\xF0z\xFD\xA4\xDE\xC4\xDCf\xE7\xD1\x8F\xC0\xE3\xA7\x13\xF7J\x11\xB3:qB,\x06\xA4\xB5\xE6#\xC3\xB2\x1A\x81R\xF3[4a\x02\xAFW` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x07\xC9\x82a\x07\xB66a\x02\xD2V[\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x03\x1BV[\x81\x01`\x06\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[\x92\x93\x91\x90`\x05\x81\x10\x15a\x06VW\x83R`\x03\x81\x10\x15a\x06VWa\x02\xCF\x93a\x08S\x91` \x85\x01R`\x80`@\x85\x01R` a\x08!\x82Q`@`\x80\x88\x01R`\xC0\x87\x01\x90a\x05\xDAV[\x91\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x85\x83\x03\x01`\xA0\x86\x01Ra\x05\xDAV[\x91``\x81\x84\x03\x91\x01Ra\x05\xDAV[4a\x02\xAFW`@\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x02\xAFWa\x08\xB2\x906\x90`\x04\x01a\x02\xB4V[`$5\x91\x82\x11a\x02\xAFWa\x08\xD6a\x08\xD0a\x08\xDC\x936\x90`\x04\x01a\x02\xB4V[\x91a\x03{V[\x90a\x03\xC7V[\x90a\x070`\x04\x83T\x92a\t0\x81Q\x95a\x08\xF4\x87a\x01[V[\x82Qa\t\x07\x81a\x05\x80\x81`\x01\x86\x01a\x04@V[\x87R\x82Qa\t\x1C\x81a\x05\x80\x81`\x02\x86\x01a\x04@V[` \x88\x01Ra\x05\x08\x83Q\x80\x95\x81\x93\x01a\x04@V[Q\x93\x83`\xFF\x80\x87\x96`\x08\x1C\x16\x91\x16\x85a\x07\xDDV[\x90` a\x02\xCF\x92\x81\x81R\x01\x90a\x05\xDAV[4a\x02\xAFW\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC` \x816\x01\x12a\x02\xAFW`\x04\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x02\xAFWa\x01\xA0\x82\x82\x01\x93\x836\x03\x01\x12a\x02\xAFW`d\x82\x01a\t\xC1a\t\xBA\x82\x86a\x19IV[6\x91a\x02xV[P`\x84\x83\x01\x91a\t\xD1\x83\x86a\x19\x9AV[\x90P\x15a\rUWa\t\xE0a*yV[\x93a\t\xEA\x85a\x03UV[\x90`\x02\x82\x01\x93a\t\xFB\x85T`\xFF\x16\x90V[a\n\x04\x81a\x06LV[a\r,W`D\x82\x01\x94a\n\x17\x86\x8Aa\x19IV[a\n!\x91\x86a\x1AJV[a\n)a)\x1FV[a\n3\x88\x8Ba\x19\x9AV[6\x90a\n>\x92a\x1CKV[a\nG\x91a,\xDCV[a\nT\x90`\x01\x86\x01a\x1E\xF4V[\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x02\x17\x90U`$\x82\x01a\n\x8A\x81a\x1F\x94V[`\x06\x85\x01\x90a\n\xC7\x91\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\x82T\x16\x17\x90UV[a\n\xD1\x89\x80a\x1F\x9EV[`\x03\x85\x01\x90a\n\xE0\x90\x82a \xE9V[\x86\x8Aa\n\xEC\x81\x80a\x1F\x9EV[\x80a\n\xF6\x91a\x19IV[\x94\x90\x9Aa\x0B\x03\x90\x83a\x19\x9AV[\x92\x90\x91a\x0B\x0F\x90a\x1F\x94V[\x93a\x0B\x19\x91a\x19IV[\x92\x90\x9Ba\x0B$a\x13\x93V[\x9Ca\x0B-a\x01\xF5V[\x9D\x8ERa\x0B8a\x02\x04V[\x946\x90a\x0BD\x92a\x02xV[\x84Ra\x0BNa\x13\x80V[` \x85\x01R`@\x9C\x8D\x85\x01Ra\x0Bba\x02\x11V[\x966\x90a\x0Bn\x92a\x02xV[\x86R6\x90a\x0B{\x92a\x1CKV[` \x85\x01R`\x01\x8A\x85\x01R``\x84\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x83\x01Ra\x01\x04\x84\x01\x91a\x0B\xAD`\xA4\x86\x01\x8Ca\x19IV[\x91\x90a\x0B\xB9\x8D\x80a\x1F\x9EV[` \x81\x01a\x0B\xC6\x91a\x19IV[\x91a\x0B\xD16\x88a\"`V[\x946\x90a\x0B\xDD\x92a\x02xV[\x916\x90a\x0B\xE9\x92a\x02xV[\x90a\x0B\xF4\x93\x89a.1V[\x15a\r\x04W\x92a\x0CR\x94\x92a\x0CHa\x0C@\x93a\x0C@\x8Da\x0C6a\x0C.`\xC4a\x0C&a\x0C!a\x0CN\x9Da\x04\xF4V[a.\xF8V[\x98\x01\x83a\x19IV[\x96\x90\x92a\x19IV[\x97\x90\x936\x90a\"`V[\x946\x91a\x02xV[\x93a/rV[\x15\x90V[a\x0C\xDDWPa\x0C\xB7a\x070\x94a\x0C\xD0a\x0C\x95\x7F\xA6\x16\xA9\xAA,e\xE95\xAB\xBD\x15\xB0z\x9B_\xF6\xC9\xC4\x8B\x06\xB4`\xA3\x9B\x0B\x8C\xFD\xA2\xA9\x85\x86\x9F\x94a\x0C\x8F\x88a/\xE4V[\x83a\x19IV[\x93\x90\x92a\x0C\xC1a\x0C\xAEa\x0C\xA8\x83\x80a\x1F\x9EV[\x80a\x19IV[\x93\x90\x92\x80a\x1F\x9EV[` \x81\x01\x90a\x19IV[\x92\x90\x91\x88Q\x96\x87\x96\x8B\x88a\"\xD9V[\x03\x90\xA1Q\x91\x82\x91\x82a\tDV[\x82Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x85\x88Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x83`@Q\x7F\xF8c'_\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`@Q\x7F3\xCA(\x94\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x02\xAFW` a\r\x95a\r\x906a\x02\xD2V[a#%V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x16\x81R\xF3[4a\x02\xAFW` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFW`\x045`\0R`\0` R` `@`\0 T`@Q\x90\x81R\xF3[4a\x02\xAFW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFW` `@Q\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm\x81R\xF3[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x90` \x82\x82\x01\x12a\x02\xAFW`\x045\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x02\xAFW\x82`\xA0\x92\x03\x01\x12a\x02\xAFW`\x04\x01\x90V[4a\x02\xAFWa\x0E\xB46a\x0EVV[a\x0E\xBCa*yV[a\x0E\xC5\x81a\x03UV[`\x02\x81\x01\x90a\x0E\xD5\x82T`\xFF\x16\x90V[a\x0E\xDE\x81a\x06LV[a\x10\xBDWa\x0E\xF6a\x0E\xEF\x85\x80a\x19IV[\x90\x83a\x1AJV[` \x84\x01\x93a\x0F\x12a\x0F\x08\x86\x83a#xV[` \x81\x01\x90a\x19\x9AV[\x15\x90Pa\x10yWa\x0F?a\x0CNa\x0F'a)\x1FV[a\x0F9a\x0F4\x89\x86a#xV[a#\xABV[\x90a1\x11V[a\x10OWa\x0F\xAC\x7F\x9F\x1F\x1E\xA4\x1A\xE2\x0B\x9E\x07\x16\x03\xACA\xA1x?=\x7F\xCB\xAFA3e\xFE\x97\xCF\xD6\xB1\xC1U$|\x93a\x0F\x81a\x0Fxa\x070\x98\x85a#xV[`\x01\x86\x01a%&V[`\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[a\x0F\xF3a\x0F\xBB``\x83\x01a\x1F\x94V[`\x06\x84\x01\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\x82T\x16\x17\x90UV[a\x10\x0E`@\x82\x01\x92`\x03a\x10\x07\x85\x85a\x1F\x9EV[\x91\x01a \xE9V[a\x10\x17\x84a/\xE4V[a\x10@a\x102a\x0C\xA8a\x10*\x84\x80a\x19IV[\x95\x90\x94a\x1F\x9EV[\x90`@Q\x94\x85\x94\x88\x86a&\xA8V[\x03\x90\xA1`@Q\x91\x82\x91\x82a\tDV[`\x04`@Q\x7F\xBC\xDFl\xCA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[a\x070\x94Pa\x0F\xAC\x7F\x9F\x1F\x1E\xA4\x1A\xE2\x0B\x9E\x07\x16\x03\xACA\xA1x?=\x7F\xCB\xAFA3e\xFE\x97\xCF\xD6\xB1\xC1U$|\x93a\x10\xB8a\x10\xAEa)\x1FV[`\x01\x86\x01\x90a0\xB0V[a\x0F\x81V[`\x04`@Q\x7F\xF8c'_\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x02\xAFWa\x10\xF56a\x0EVV[a\x11\x08a\x11\x02\x82\x80a\x19IV[\x90a&\xE0V[\x90`\x02\x82\x01\x91`\x02a\x11\x1B\x84T`\xFF\x16\x90V[a\x11$\x81a\x06LV[\x03a\x12\xC0Wa\x113\x82\x80a\x19IV[\x92\x90a\x11ga\x11@a\x13\x93V[\x91a\x11Ia\x01\xF5V[\x92\x83Ra\x11Ta\x02\x04V[\x95a\x11^\x86a\x04\xF4V[\x87R6\x91a\x02xV[` \x85\x01R`@\x84\x01R`\x03\x82\x01\x92a\x11\xD0a\x11\x8E`\x06\x85\x01Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[a\x11\x96a\x02\x11V[\x92a\x11\xA0\x87a\x04\xF4V[\x84Ra\x11\xAE`\x01\x87\x01a&\xF9V[` \x85\x01R`\x03`@\x85\x01R``\x84\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x83\x01RV[a\x12\x12a\x0CNa\x11\xE3` \x85\x01\x85a\x19IV[`\x04\x87\x01\x94\x91a\x12\x02\x90a\x11\xFA6`@\x8A\x01a\"`V[\x926\x91a\x02xV[a\x12\x0B\x86a\x04\xF4V[\x91\x88a.1V[a\x12\x96Wa\x12\x82a\x12\x91\x92a\x12m\x7F\x06<\x0E\x96d4}\x80\x13\xD3W]P P\xFD\x93m;Q\x03_\x05f\x96\xA69R?\xEA\xEDm\x97`\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[a\x0C\xA8a\x12}a\t\xBA\x83\x80a\x19IV[a/\xE4V[\x94\x90\x93`@Q\x95\x86\x95\x86a(OV[\x03\x90\xA1\0[`\x04`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\x8C\xA9\x89\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x02\xAFW` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x13\x13\x82a\x07\xB66a\x02\xD2V[\x81\x01`\x01\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[4a\x02\xAFW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFW` `@Q\x7F\x9B\x98 Hj\x05\xC0\x19>\xFB!Ll+\xA8\xFC\xE0,Z\\\x84\xAA\x05\x7F\x81\x99\xC9\x9F\x13\xFF\x93\x9B\x81R\xF3[`@Q\x90a\x13\x8D\x82a\x01|V[`\0\x82RV[`@Q\x90a\x13\xA0\x82a\x01[V[`\x03\x82R\x7Fibc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x83\x01RV[4a\x02\xAFW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFWa\x070a\x14\x06a\x13\x93V[`@Q\x91\x82\x91` \x83R` \x83\x01\x90a\x05\xDAV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\0`\x04R`$`\0\xFD[4a\x02\xAFWa\x070a\x05\x80a\x14\x06a\x14e` a\x07\xB66a\x02\xD2V[\x81\x01`\x02\x81R\x03\x01\x90 `@Q\x92\x83\x80\x92a\x04@V[4a\x02\xAFW`\0\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFWa\x14\xB3a)\x1FV[\x90`@\x91`@Q\x91` \x80\x84\x01\x91\x81\x85R\x83Q\x80\x93R`@\x85\x01`\x05\x96\x83`@\x86`\x05\x1B\x89\x01\x01\x96\x01\x97`\0\x93[\x86\x85\x10a\x14\xEEW\x88\x88\x03\x89\xF3[\x90\x91\x92\x93\x94\x87\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\x8A\x83\x99\x9A\x03\x01\x86R\x8AQ\x82a\x151\x82Q\x88\x85R\x88\x85\x01\x90a\x05\xDAV[\x91\x01Q\x91\x83\x81\x83\x03\x91\x01R\x81Q\x80\x82R\x83\x82\x01\x90\x84\x80\x82\x89\x1B\x85\x01\x01\x94\x01\x92\x86[\x82\x81\x10a\x15vWPPPPP\x90\x80`\x01\x92\x9B\x01\x95\x01\x95\x01\x93\x98\x96\x95\x94\x92\x91\x90a\x14\xE1V[\x91\x93\x95\x80a\x15\xB0\x87\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x85`\x01\x96\x98\x9A\x03\x01\x89R\x89Qa\x05\xDAV[\x97\x01\x95\x01\x91\x01\x91\x8B\x95\x94\x93\x91\x92a\x15RV[4a\x02\xAFW` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x15\xEFa\x15\xEA6a\x02\xD2V[a\x03\xA1V[T\x16`@Q\x90\x81R\xF3[4a\x02\xAFW\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC` \x816\x01\x12a\x02\xAFW`\x04\x90\x815\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x02\xAFWa\x01\x80\x82\x84\x01\x91\x836\x03\x01\x12a\x02\xAFWa\x16[a\x11\x02\x82\x80a\x19IV[\x90`\x02\x82\x01`\x01a\x16m\x82T`\xFF\x16\x90V[a\x16v\x81a\x06LV[\x03a\x19 W`\x01\x83\x01`D\x85\x01\x94a\x16\xA8a\x0CNa\x16\x94\x88\x87a#xV[a\x0F9a\x16\xA0\x86a&\xF9V[\x916\x90a\x1B\x8AV[a\x18\xF7W`$\x81\x01\x92a\x16\xBB\x84\x86a\x19IV[6\x90a\x16\xC6\x92a\x02xV[Pa\x16\xD1\x85\x80a\x19IV[\x94\x90a\x16\xDBa\x13\x93V[\x90a\x16\xE4a\x01\xF5V[\x91\x82Ra\x16\xEFa\x02\x04V[\x96a\x16\xF9\x8Aa\x04\xF4V[\x88R6\x90a\x17\x06\x92a\x02xV[` \x87\x01R`@\x86\x01R`\x03\x87\x01\x97a\x17\x1F\x90\x87a#xV[a\x17(\x90a#\xABV[a\x171\x90a1\xD3V[\x92`\x06\x88\x01Ta\x17H\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[a\x17Pa\x02\x11V[\x96a\x17Z\x8Ba\x04\xF4V[\x88R` \x88\x01\x95\x86R`\x02`@\x89\x01R``\x88\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x87\x01R`\xE4\x81\x01\x91a\x17\x90`\x84\x83\x01\x89a\x19IV[\x90\x97`d\x84\x01\x98a\x17\xA1\x8A\x8Ca\x19IV[\x91a\x17\xAC6\x89a\"`V[\x946\x90a\x17\xB8\x92a\x02xV[\x916\x90a\x17\xC4\x92a\x02xV[\x90a\x17\xCF\x93\x8Da.1V[\x15a\x18\xCEWa\x18\x15a\x0CN\x92a\x18%a\x18,\x95a\x18\x1D\x8C\x8Fa\x18\x03`\xA4a\x17\xFBa\x0C!a\x18\x0B\x94a\x04\xF4V[\x97\x01\x83a\x19IV[\x98\x90\x92a\x19IV[\x96\x90\x936\x90a\"`V[\x966\x91a\x02xV[\x936\x91a\x02xV[\x92\x8Ba/rV[a\x18\xA5Wa\x18\x9A\x7F\xE7a[N\xBF\xFC\xB90\x06\x1F\x90\x1C\xC0~\xE6{M2\xC8\xF9\x05!A\xEB\x8B\xCE-\xEC?W\x7F\xE1\x98\x94a\x0C\x8Fa\x12\x82\x95a\x12\x91\x98\x95a\x18\x94a\x12m\x96`\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[Qa2\xA6V[\x90\x94\x87\x01\x94\x85a\x1AJV[\x87`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x8A`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x86`@Q\x7F\xBC\xDFl\xCA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x84`@Q\x7F\x8C\xA9\x89\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x02\xAFW\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x02\xAFW` \x01\x91\x816\x03\x83\x13a\x02\xAFWV[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x02\xAFW\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x02\xAFW` \x01\x91\x81`\x05\x1B6\x03\x83\x13a\x02\xAFWV[\x81\x81\x10a\x19\xF9WPPV[`\0\x81U`\x01\x01a\x19\xEEV[\x91\x90`\x1F\x81\x11a\x1A\x14WPPPV[a\x02\x02\x92`\0R` `\0 \x90` `\x1F\x84\x01`\x05\x1C\x83\x01\x93\x10a\x1A@W[`\x1F\x01`\x05\x1C\x01\x90a\x19\xEEV[\x90\x91P\x81\x90a\x1A3V[\x90\x92\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x01wWa\x1Ap\x81a\x1Aj\x84Ta\x03\xEDV[\x84a\x1A\x05V[`\0`\x1F\x82\x11`\x01\x14a\x1A\xCEW\x81\x90a\x1A\xBF\x93\x94\x95`\0\x92a\x1A\xC3W[PP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x90UV[\x015\x90P8\x80a\x1A\x8DV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x16\x94a\x1B\x01\x84`\0R` `\0 \x90V[\x91\x80[\x87\x81\x10a\x1BZWP\x83`\x01\x95\x96\x97\x10a\x1B\"W[PPP\x81\x1B\x01\x90UV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U8\x80\x80a\x1B\x18V[\x90\x92` `\x01\x81\x92\x86\x86\x015\x81U\x01\x94\x01\x91\x01a\x1B\x04V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x01wW`\x05\x1B` \x01\x90V[\x91\x90`@\x83\x82\x03\x12a\x02\xAFW`@Q\x92a\x1B\xA3\x84a\x01[V[\x83\x815\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84\x81\x11a\x02\xAFW\x81a\x1B\xC4\x91\x85\x01a\x02\xB4V[\x82R` \x92\x83\x81\x015\x90\x85\x82\x11a\x02\xAFW\x01\x81`\x1F\x82\x01\x12\x15a\x02\xAFW\x805a\x1B\xEC\x81a\x1BrV[\x95a\x1B\xFA`@Q\x97\x88a\x01\xB4V[\x81\x87R\x85\x80\x88\x01\x92`\x05\x1B\x84\x01\x01\x93\x80\x85\x11a\x02\xAFW\x86\x84\x01\x92[\x85\x84\x10a\x1C&WPPPPPP\x01RV[\x835\x83\x81\x11a\x02\xAFW\x88\x91a\x1C@\x84\x84\x80\x94\x8A\x01\x01a\x02\xB4V[\x81R\x01\x93\x01\x92a\x1C\x15V[\x92\x91\x90\x92a\x1CX\x84a\x1BrV[\x91a\x1Cf`@Q\x93\x84a\x01\xB4V[\x82\x94\x80\x84R` \x80\x94\x01\x90`\x05\x1B\x83\x01\x92\x82\x84\x11a\x02\xAFW\x80\x91[\x84\x83\x10a\x1C\x90WPPPPPPV[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x02\xAFW\x86\x91a\x1C\xB0\x86\x84\x93\x86\x01a\x1B\x8AV[\x81R\x01\x92\x01\x91a\x1C\x81V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[\x80T\x82\x10\x15a\x1D\x06W`\0R` `\0 \x90`\x01\x1B\x01\x90`\0\x90V[a\x1C\xBBV[\x91\x90\x91\x82Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x01wWa\x1D-\x81a\x1Aj\x84Ta\x03\xEDV[` \x80`\x1F\x83\x11`\x01\x14a\x1D\x88WP\x81\x90a\x1A\xBF\x93\x94\x95`\0\x92a\x1D}WPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x01Q\x90P8\x80a\x1A\x8DV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x83\x16\x95a\x1D\xBC\x85`\0R` `\0 \x90V[\x92`\0\x90[\x88\x82\x10a\x1E\x16WPP\x83`\x01\x95\x96\x97\x10a\x1D\xDFWPPP\x81\x1B\x01\x90UV[\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x84`\x03\x1B\x16\x1C\x19\x16\x90U8\x80\x80a\x1B\x18V[\x80`\x01\x85\x96\x82\x94\x96\x86\x01Q\x81U\x01\x95\x01\x93\x01\x90a\x1D\xC1V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[a\x1Eg\x81Ta\x03\xEDV[\x90\x81a\x1EqWPPV[\x81`\x1F`\0\x93\x11`\x01\x14a\x1E\x83WPUV[\x90\x80\x83\x91\x82Ra\x1E\xA2`\x1F` \x84 \x94\x01`\x05\x1C\x84\x01`\x01\x85\x01a\x19\xEEV[UUV[\x90h\x01\0\0\0\0\0\0\0\0\x81\x11a\x01wW\x81T\x91\x81\x81U\x82\x82\x10a\x1E\xC9WPPPV[`\0R` `\0 \x91\x82\x01\x91\x01[\x81\x81\x10a\x1E\xE2WPPV[\x80a\x1E\xEE`\x01\x92a\x1E]V[\x01a\x1E\xD7V[\x91\x90\x82Th\x01\0\0\0\0\0\0\0\0\x81\x10\x15a\x01wWa\x1F\x1B\x90`\x01\x94`\x01\x82\x01\x81Ua\x1C\xEAV[a\x1F}W`\x01\x90a\x1F-\x83Q\x82a\x1D\x0BV[\x01` \x80\x92\x01Q\x91` \x83Q\x93a\x1FD\x85\x85a\x1E\xA6V[\x01\x91`\0R` `\0 `\0\x92[\x84\x84\x10a\x1FbWPPPPP\x90PV[\x86\x83\x82a\x1Fq\x83\x94Q\x86a\x1D\x0BV[\x01\x92\x01\x93\x01\x92\x90a\x1FRV[a\x14\x1AV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x03a\x02\xAFWV[5a\x02\xCF\x81a\x1F\x82V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA1\x816\x03\x01\x82\x12\x15a\x02\xAFW\x01\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x02\xAFW\x01\x90V[\x91\x90a \x10\x90\x80a\x19IV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x94\x92\x94\x11a\x01wWa 0\x81a\x1Aj\x84Ta\x03\xEDV[`\0`\x1F\x82\x11`\x01\x14a ~W\x81\x90a\x1A\xBF\x93\x94\x95`\0\x92a\x1A\xC3WPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x16\x94a \xB1\x84`\0R` `\0 \x90V[\x91\x80[\x87\x81\x10a \xD1WP\x83`\x01\x95\x96\x97\x10a\x1B\"WPPP\x81\x1B\x01\x90UV[\x90\x92` `\x01\x81\x92\x86\x86\x015\x81U\x01\x94\x01\x91\x01a \xB4V[\x91\x90\x91a \xF6\x83\x80a\x19IV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x95\x92\x95\x11a\x01wWa!\x1C\x81a!\x16\x85Ta\x03\xEDV[\x85a\x1A\x05V[`\0`\x1F\x82\x11`\x01\x14a!\xA1W\x91a!s\x82a!\x9A\x93`\x02\x95a\x02\x02\x98\x99`\0\x92a\x1A\xC3WPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x84U[a!\x90a!\x86` \x83\x01\x83a\x19IV[\x90`\x01\x87\x01a\x1AJV[`@\x81\x01\x90a\x1F\xD1V[\x91\x01a \x04V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x16\x90a!\xD4\x85`\0R` `\0 \x90V[\x91\x81[\x81\x81\x10a\"WPPPPPPPV[\x84\x82Qa'J\x81a\x01[V[\x83Qa'Z\x81a\x05\x80\x81\x8Aa\x04@V[\x81R`\x01\x80\x87\x01\x90\x81Ta'm\x81a\x1BrV[\x92a'z\x88Q\x94\x85a\x01\xB4V[\x81\x84R\x88R\x84\x88 \x88\x86\x85\x01[\x83\x82\x10a'\xADWPPPPP\x92\x81`\x01\x94\x84`\x02\x95\x94\x01R\x81R\x01\x94\x01\x96\x01\x95\x92a'.V[\x93\x80\x95\x96\x97\x81\x92\x93\x94\x95\x8BQa'\xC7\x81a\x05\x80\x81\x8Aa\x04@V[\x81R\x01\x93\x01\x91\x01\x8B\x96\x95\x94\x93\x92a'\x87V[\x80T`\0\x93\x92a'\xE8\x82a\x03\xEDV[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a\x04\xB7WP`\x01\x14a(\x0EWPPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a(;WPPPP\x01\x01\x908\x80\x80\x80\x80a\x04oV[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a(#V[\x93\x90a\x02\xCF\x95\x93a(oa(}\x92a(\x8B\x95`\x80\x89R`\x80\x89\x01\x91a\"\x9AV[\x90\x86\x82\x03` \x88\x01Ra'\xD9V[\x90\x84\x82\x03`@\x86\x01Ra'\xD9V[\x91``\x81\x84\x03\x91\x01Ra'\xD9V[`@Q\x90a(\xA6\x82a\x01[V[``` \x83\x82\x81R\x01RV[`@Q\x90a(\xBF\x82a\x01[V[`\x01\x82R\x81`\0[` \x90\x81\x81\x10\x15a(\xE9W` \x91a(\xDDa(\x99V[\x90\x82\x85\x01\x01R\x01a(\xC7V[PPPV[\x80Q\x15a\x1D\x06W` \x01\x90V[\x80Q`\x01\x10\x15a\x1D\x06W`@\x01\x90V[\x80Q\x82\x10\x15a\x1D\x06W` \x91`\x05\x1B\x01\x01\x90V[a)'a(\xB2V[a)/a(\x99V[P`@\x80Q\x90a)>\x82a\x01[V[`\x01\x82R` \x7F1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x84\x01R`@Q\x91a)w\x83a\x01\x98V[`\x02\x83R`\0[\x81\x81\x10a* WPPPa*\x08\x90`@Q\x92a)\x99\x84a\x01[V[\x83R` \x83\x01\x90\x81Ra)\xED`@Qa)\xB1\x81a\x01[V[`\r\x81R\x7FORDER_ORDERED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R\x82Q\x90a)\xE7\x82a(\xEEV[Ra(\xEEV[Pa)\xF6a1\x9AV[\x90Q\x90a*\x02\x82a(\xFBV[Ra(\xFBV[Pa*\x12\x82a(\xEEV[Ra*\x1C\x81a(\xEEV[P\x90V[``\x84\x82\x01\x84\x01R\x82\x01a)~V[\x90`\x01\x82\x01\x80\x92\x11a*=WV[a\x1E.V[`\x01\x01\x90\x81`\x01\x11a*=WV[` \x01\x90\x81` \x11a*=WV[\x90` \x82\x01\x80\x92\x11a*=WV[\x91\x90\x82\x01\x80\x92\x11a*=WV[\x7F\x8E\xF0z\xFD\xA4\xDE\xC4\xDCf\xE7\xD1\x8F\xC0\xE3\xA7\x13\xF7J\x11\xB3:qB,\x06\xA4\xB5\xE6#\xC3\xB2\x1A`\0R`\0` R`@`\0 T\x80\x80`\0\x91z\x18O\x03\xE9?\xF9\xF4\xDA\xA7\x97\xEDn8\xEDd\xBFj\x1F\x01\0\0\0\0\0\0\0\0\x80\x82\x10\x15a,\xCEW[Pm\x04\xEE-mA[\x85\xAC\xEF\x81\0\0\0\0\x80\x83\x10\x15a,\xBFW[Pf#\x86\xF2o\xC1\0\0\x80\x83\x10\x15a,\xB0W[Pc\x05\xF5\xE1\0\x80\x83\x10\x15a,\xA1W[Pa'\x10\x80\x83\x10\x15a,\x92W[P`d\x82\x10\x15a,\x82W[`\n\x80\x92\x10\x15a,xW[`\x01\x90\x81`!a+A`\x01\x87\x01a3\x8AV[\x95\x86\x01\x01\x90[a,\x17W[PPPPa+\x98\x91a+\xC4a+\xC9\x92`@Q\x94\x85\x91a+\x92` \x84\x01`\x0B\x90\x7Fconnection-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\x01\x90V[\x90a\x03>V[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x85R\x84a\x01\xB4V[a*/V[\x7F\x8E\xF0z\xFD\xA4\xDE\xC4\xDCf\xE7\xD1\x8F\xC0\xE3\xA7\x13\xF7J\x11\xB3:qB,\x06\xA4\xB5\xE6#\xC3\xB2\x1A`\0\x90\x81R` R\x7F$\x07(t\xBB\x11f)4\xF0\xC6\x8C\xA2e\x9A\x14\xEF\xAEqU[\xB4\x8E\xBA$P\xFEd3\x18?\x95U\x90V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x91\x01\x91\x7F0123456789abcdef\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\x82\x06\x1A\x83S\x04\x91\x82\x15a,sW\x91\x90\x82a+GV[a+LV[\x91`\x01\x01\x91a+/V[\x91\x90`d`\x02\x91\x04\x91\x01\x91a+$V[`\x04\x91\x93\x92\x04\x91\x01\x918a+\x19V[`\x08\x91\x93\x92\x04\x91\x01\x918a+\x0CV[`\x10\x91\x93\x92\x04\x91\x01\x918a*\xFDV[` \x91\x93\x92\x04\x91\x01\x918a*\xEBV[`@\x93P\x81\x04\x91P8a*\xD2V[\x90a,\xE5a(\x99V[P\x81Q\x91`\0[\x83\x81\x10a-\x1DW`\x04`@Q\x7F\xBC\xDFl\xCA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[a-'\x81\x83a)\x0BV[Qa-2\x84\x82a3\xD9V[\x91\x90\x91\x15a-|Wa-N` \x92\x83\x80\x84\x01Q\x91\x01Q\x90a4\x9FV[\x90\x81Qa-bWPPP`\x01\x90[\x01a,\xECV[\x93P\x93P\x93PPQ\x91a-sa\x021V[\x92\x83R\x82\x01R\x90V[PP`\x01\x90a-\\V[\x90\x81` \x91\x03\x12a\x02\xAFWQ\x80\x15\x15\x81\x03a\x02\xAFW\x90V[\x94\x91\x93a-\xFAa\x02\xCF\x97\x95a.\x16\x95a-\xC2a.\x08\x95a\x01 \x80\x8CR\x8B\x01\x90a'\xD9V[\x91` g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x81Q\x16\x82\x8D\x01R\x01Q\x16`@\x8A\x01R`\0``\x8A\x01R`\0`\x80\x8A\x01R\x88\x82\x03`\xA0\x8A\x01Ra\x05\xDAV[\x90\x86\x82\x03`\xC0\x88\x01Ra'\xD9V[\x90\x84\x82\x03`\xE0\x86\x01Ra\x05\xDAV[\x91a\x01\0\x81\x84\x03\x91\x01Ra\x05\xDAV[`@Q=`\0\x82>=\x90\xFD[\x91`\0` \x94\x92a.\xB4a.ya.ss\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa.la\x05\x80a\r\x90\x8B`@Q\x92\x83\x80\x92a\x04@V[\x16\x96a5sV[\x98a5\xC6V[`@Q\x98\x89\x97\x88\x96\x87\x95\x7F\xF9\xBBZQ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R`\x05\x83\x01\x92`\x04\x88\x01a-\x9EV[\x03\x92Z\xF1\x90\x81\x15a.\xF3W`\0\x91a.\xCAWP\x90V[a\x02\xCF\x91P` =` \x11a.\xECW[a.\xE4\x81\x83a\x01\xB4V[\x81\x01\x90a-\x86V[P=a.\xDAV[a.%V[a\x02\xCF`4`@Q\x80\x93\x7Fclients/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x83\x01Ra/<\x81Q\x80\x92` `(\x86\x01\x91\x01a\x03\x1BV[\x81\x01\x7F/clientState\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`(\x82\x01R\x03`\x14\x81\x01\x84R\x01\x82a\x01\xB4V[\x91\x93\x90\x92`\0` \x94a.\xB4s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa/\xA7`@Qa\r\x90\x81a\x05\x80\x81\x8Ca\x04@V[\x16\x94`@Q\x98\x89\x97\x88\x96\x87\x95\x7F\xF9\xBBZQ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R`\x05\x83\x01\x92`\x04\x88\x01a-\x9EV[a/\xED\x81a\x03UV[`@Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91`\xA0\x82\x01\x91\x83\x83\x11\x81\x84\x10\x17a\x01wWa0\xAD\x93`\x06a0\x90\x93\x85a0\x9D\x96`@Ra0K\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x86a\x05c\x84\x86a\x04@V[\x84Ra0Y`\x01\x82\x01a&\xF9V[` \x85\x01Ra0r`\xFF`\x02\x83\x01T\x16`@\x86\x01a\"TV[a0~`\x03\x82\x01a\x05\x0FV[``\x85\x01R\x01T\x16`\x80\x82\x01Ra5\xC6V[` \x81Q\x91\x01 \x92a6\xA2V[`\0R`\0` R`@`\0 \x90V[UV[\x90\x80Ta0\xE7W\x81Q\x91`\0[\x83\x81\x10a0\xCAWPPPPV[\x80a0\xE1a0\xDA`\x01\x93\x85a)\x0BV[Q\x85a\x1E\xF4V[\x01a0\xBDV[`\x04`@Q\x7F\x82\xC2\x8D\xCA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[a1\x1B\x90\x82a3\xD9V[\x91\x90\x91\x15a1,Wa\x02\xCF\x91a6\xB5V[PP`\0\x90V[\x90a1=\x82a\x1BrV[a1J`@Q\x91\x82a\x01\xB4V[\x82\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a1x\x82\x94a\x1BrV[\x01\x90`\0[\x82\x81\x10a1\x89WPPPV[\x80``` \x80\x93\x85\x01\x01R\x01a1}V[`@Q\x90a1\xA7\x82a\x01[V[`\x0F\x82R\x7FORDER_UNORDERED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x83\x01RV[\x90a1\xDCa(\xB2V[\x91\x82Q\x15a\x1D\x06W` \x83\x01R\x81Q\x15a\x1D\x06WV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`1`\x04R`$`\0\xFD[\x80T\x80\x15a2\xA1W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01\x90a2V\x82\x82a\x1C\xEAV[a\x1F}Wa2c\x81a\x1E]V[`\x01\x80\x91\x01\x80T\x90`\0\x81U\x81a2{W[PPPUV[`\0R` `\0 \x90\x81\x01\x90[\x81\x81\x10\x15a2uW\x80a2\x9B\x84\x92a\x1E]V[\x01a2\x88V[a1\xF2V[\x90\x81Q\x91\x81T\x80\x84\x14`\0\x14a2\xEFWP`\0[\x83\x81\x10a2\xC7WPPPPV[\x80a2\xE9a2\xD7`\x01\x93\x85a)\x0BV[Qa2\xE2\x83\x87a\x1C\xEAV[P\x90a8vV[\x01a2\xBAV[\x80\x84\x11\x15a3GW`\0[\x81\x81\x10a3&WP[\x83\x81\x10a3\x10WPPPPV[\x80a3 a0\xDA`\x01\x93\x85a)\x0BV[\x01a3\x03V[\x80a3Aa36`\x01\x93\x86a)\x0BV[Qa2\xE2\x83\x88a\x1C\xEAV[\x01a2\xFAV[\x92\x90`\0[\x82\x81\x10a3tWPP[\x82\x81\x10a3bWPPPV[`\x01\x90a3n\x83a2!V[\x01a3VV[\x80a3\x84a36`\x01\x93\x85a)\x0BV[\x01a3LV[\x90a3\x94\x82a\x02>V[a3\xA1`@Q\x91\x82a\x01\xB4V[\x82\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a3\xCF\x82\x94a\x02>V[\x01\x90` 6\x91\x017V[\x90a3\xE2a(\x99V[\x91\x81Q\x90`\0\x92[\x82\x84\x10a3\xFBWPPPP\x90`\0\x90V[\x90\x91\x92\x93Pa4\n\x84\x82a)\x0BV[Q\x93\x84Q`@a4Va4\x82\x82Q\x93` \x94a4B\x86\x82\x81a45\x81\x83\x01\x96\x87\x81Q\x93\x84\x92\x01a\x03\x1BV[\x81\x01\x03\x80\x84R\x01\x82a\x01\xB4V[Q\x90 \x93\x87Q\x93Q\x92\x83\x91\x82\x01\x80\x95a\x03>V[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x83R\x82a\x01\xB4V[Q\x90 \x14a4\x95W`\x01\x01\x92\x91\x90a3\xEAV[PPPP\x90`\x01\x90V[\x90\x81Qa4\xAB\x81a13V[\x92`\0\x92\x83[\x83\x81\x10a5\0WPPPPa4\xC5\x81a13V[\x91`\0[\x82\x81\x10a4\xD6WPPP\x90V[\x80a4\xE3`\x01\x92\x84a)\x0BV[Qa4\xEE\x82\x87a)\x0BV[Ra4\xF9\x81\x86a)\x0BV[P\x01a4\xC9V[a5\x14\x82a5\x0E\x83\x86a)\x0BV[Qa9{V[a5!W[`\x01\x01a4\xB1V[\x93a5,\x85\x84a)\x0BV[Qa57\x82\x88a)\x0BV[Ra5B\x81\x87a)\x0BV[P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x14a*=W`\x01\x01\x93a5\x19V[a\x02\xCF`,`@Q\x80\x93\x7Fconnections/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x83\x01Ra5\xB6\x81Q\x80\x92` \x86\x86\x01\x91\x01a\x03\x1BV[\x81\x01\x03`\x0C\x81\x01\x84R\x01\x82a\x01\xB4V[\x90a5\xDAa5\xD5\x83QQa;\x95V[a*BV[`\0\x90[` \x84\x01Q\x80Q\x83\x10\x15a6\x1EW`\x01\x91a6\x10a5\xD5a6\x0Ba6\x05\x87a6\x16\x96a)\x0BV[Qa;\xAAV[a;\x95V[\x90a*lV[\x91\x01\x90a5\xDEV[Pa6\x9D\x91Pa6\x91a6qa6^a6\x96\x93\x96\x95\x96a6\x10a5\xD5a6Ya6S`@\x8B\x01Qa6N\x81a\x06LV[a<\"V[`\x03\x0B\x90V[a<\x80V[a6\x10a5\xD5a6\x0B``\x89\x01Qa<\xA7V[a6\x10a5\xD5a6\x8C`\x80\x88\x01Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[a<\x94V[a3\x8AV[\x80\x92a:+V[\x81R\x90V[a6\xAB\x90a5sV[` \x81Q\x91\x01 \x90V[\x81Q\x91`@Q` \x93\x81a6\xCD` \x82\x01\x80\x93a\x03>V[\x03\x91a6\xFF\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x84\x81\x01\x83R\x82a\x01\xB4V[Q\x90 \x90\x83Q\x90a7(`@Q\x91\x82a7\x1C` \x82\x01\x80\x96a\x03>V[\x03\x90\x81\x01\x83R\x82a\x01\xB4V[Q\x90 \x03a7\x90W` \x01\x91\x82QQ\x92\x83\x15a7\x87W`\0\x92`\0[\x85\x81\x10a7VWPPPPPP`\x01\x90V[a7ra\x0CNa7g\x83\x86Qa)\x0BV[Q\x86\x85\x01Q\x90a9{V[a7~W`\x01\x01a7DV[PPPP\x90P\x90V[PPPP`\0\x90V[PPP`\0\x90V[\x80T\x82\x10\x15a\x1D\x06W`\0R` `\0 \x01\x90`\0\x90V[\x91\x90a\x1F}Wa\x02\x02\x91a\x1D\x0BV[\x80T\x80\x15a2\xA1W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01\x90a7\xF4\x82\x82a7\x98V[a\x1F}Wa8\x02\x81Ta\x03\xEDV[\x90\x81a8\rWPPUV[\x81`\x1F`\0\x93\x11`\x01\x14a8 WPUUV[\x90\x80\x83\x91\x82Ra8?`\x1F` \x84 \x94\x01`\x05\x1C\x84\x01`\x01\x85\x01a\x19\xEEV[UUUV[\x80Th\x01\0\0\0\0\0\0\0\0\x81\x10\x15a\x01wWa8f\x91`\x01\x82\x01\x81Ua7\x98V[\x91\x90\x91a\x1F}Wa\x02\x02\x91a\x1D\x0BV[` \x90a8\x84\x81Q\x84a\x1D\x0BV[\x01\x80QQ\x90`\x01\x80\x93\x01\x90\x81T\x80\x84\x14`\0\x14a8\xD4WP`\0[\x83\x81\x10a8\xADWPPPPPV[\x80a8\xCEa8\xBD\x87\x93\x85Qa)\x0BV[Qa8\xC8\x83\x87a7\x98V[\x90a7\xB0V[\x01a8\x9FV[\x80\x84\x11\x15a96W\x84`\0[\x82\x81\x10a9\x15WPP[\x83\x81\x10a8\xF8WPPPPPV[\x80a9\x0Fa9\x08\x87\x93\x85Qa)\x0BV[Q\x85a8DV[\x01a8\xEAV[a9.a9#\x82\x86Qa)\x0BV[Qa8\xC8\x83\x88a7\x98V[\x01\x85\x90a8\xE0V[\x92\x90\x84`\0[\x83\x81\x10a9eWPPP[\x82\x81\x10a9TWPPPPV[\x83\x90a9_\x83a7\xBFV[\x01a9GV[a9sa9#\x82\x85Qa)\x0BV[\x01\x85\x90a9\x1CV[\x92\x01g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa:\xAA\x82Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x16a:\xB7W[PPa9\xC4V[\x81a6\x10\x91a:\xD0\x85a6\x10a:\xE1\x96a:\xE6\x98a?\x99V[\x93\x84\x91Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[a>\x07V[8\x80a:\xB0V[\x81a6\x10\x91a;\x06\x85a6\x10a:\xE1\x96a;\x13\x98a?\x7FV[\x93\x84\x91Qa6N\x81a\x06LV[\x848a:sV[\x94\x90\x92\x93\x94\x91[\x83QQ\x83\x10\x15a;\\Wa;Ta;>\x82a6\x10\x88`\x01\x95a?rV[a6\x10\x87\x82a;N\x88\x8AQa)\x0BV[Qa=\rV[\x92\x01\x91a;!V[\x90\x94\x93\x92P\x90P`\x80a:\x8Da:EV[\x90Pa;\x8Fa;\x83a;~\x84a?:V[a*PV[a6\x10\x84\x82\x87Qa?\xEFV[\x90a:8V[a;\x9E\x81a>\xFFV[\x81\x01\x80\x91\x11a*=W\x90V[a;\xB5\x81QQa;\x95V[`\x01\x90\x81\x01\x80\x82\x11a*=W\x81\x90\x92`\0\x92[a;\xD3W[PPP\x90V[` \x81\x94\x92\x93\x94\x01Q\x80Q\x85\x10\x15a<\x19Wa;\xF2\x85a;\xF9\x92a)\x0BV[QQa;\x95V[\x80\x84\x01\x84\x11a*=W\x83\x90\x83\x01\x01\x80\x92\x11a*=W\x82\x80\x92\x94\x01\x92a;\xC8V[P\x81\x93Pa;\xCDV[`\x04\x81\x10\x15a\x06VW\x80\x15a\xFFV[a<\xB2\x81QQa;\x95V[\x90`\x01\x82\x81\x01\x92\x83\x82\x11a*=Wa<\xCE` \x84\x01QQa;\x95V[\x90\x81\x83\x01\x83\x11a*=W\x01\x91`\x02\x83\x01\x80\x94\x11a*=Wa6\x0B`@a<\xF5\x92\x01Qa?!V[\x90\x81\x81\x01\x10a*=W`\x03\x91\x01\x01\x80\x91\x11a*=W\x90V[\x90\x91a=\x1Ba6\x91\x83a;\xAAV[\x91` \x90`\0\x90\x80QQa=\xE0W[` \x01\x90\x81QQa=\x88W[PPa=ra=~a\x02\xCF\x95\x94a=\x83\x94a=Sa=x\x95a9\xC4V[\x94\x85\x92a=ja=d\x84\x8B\x87a?\xB3V[\x8Aa*lV[\x95\x86\x91a*^V[\x92a*lV[\x90a@KV[a*lV[a:\x1EV[\x95\x91\x92\x94\x90\x93\x95\x92[\x84QQ\x84\x10\x15a=\xCCWa=\xC4a=\xAE\x82a6\x10\x8A`\x01\x95a?rV[a6\x10\x89\x82a=\xBE\x89\x8BQa)\x0BV[Qa?\xEFV[\x93\x01\x92a=\x91V[\x91\x95\x90\x94\x90\x93P\x91Pa=ra=~a=6V[\x91P` a=\xFFa=\xF3a;~\x87a?:V[a6\x10\x87\x82\x87Qa?\xEFV[\x92\x90Pa=*V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x02\xCF\x93\x92\x16a?\xB3V[\x91a>)a6\x91\x84a<\xA7V[\x92` \x81QQa>\xD7W[` \x82\x01\x80QQa>}W[Pa=~\x85a=\x83\x94a=Sa>x`@a6\x10\x85a=x\x99a>n\x8Aa\x02\xCF\x9Fa6\x10\x90a=r\x9Da?\xA6V[\x93\x84\x91\x01Qa@\xE0V[a9\xC4V[\x90\x91a>\x89\x86\x84a?rV[\x83\x01\x80\x93\x11a*=W\x85a=\x83\x94a=Sa>x`@a6\x10\x85a=~\x97a>na>\xC4a\x02\xCF\x9F\x9Ca6\x10a=x\x9E\x82a=r\x9FQa?\xEFV[\x9APP\x99PPPPPP\x94P\x95Pa>@V[Pa>\xE4a;~\x85a?:V[a>\xF0\x85\x82\x84Qa?\xEFV[\x81\x01\x80\x91\x11\x15a>4Wa\x1E.V[`\x01\x80\x91`\x07\x90`\x07\x1C\x80[a?\x15WPPP\x90V[\x92\x82\x01\x92\x81\x1C\x80a?\x0BV[a?,\x90QQa;\x95V[`\x01\x01\x80`\x01\x11a*=W\x90V[`\n\x90`\0\x90` \x01\x82[`\x07\x1C\x92\x83\x15a?hW`\x80\x17\x81S`\x01\x80\x91\x01\x91\x01`\x7F\x83\x16\x92\x91\x90\x91a?EV[\x90`\x01\x93PS\x01\x90V[`\0\x91\x82\x91\x01`\x12a?hV[`\0\x91\x82\x91\x01`\x18a?hV[`\0\x91\x82\x91\x01`\"a?hV[`\0\x91\x82\x91\x01`(a?hV[`\0\x91\x82\x91\x01`\x1Aa?hV[`\x7F\x93\x92`\0\x92\x85\x83\x16\x92\x91\x01\x90[`\x07\x1C\x91\x82\x15a?\xE3W`\x80\x17\x81S`\x01\x92\x83\x01\x92\x85\x83\x16\x92\x91\x01\x90a?\xC2V[\x91P`\x01\x93\x94PS\x01\x90V[\x90\x81Q\x91a?\xFE\x84\x83\x85a?\xB3V[\x93` `\0\x91\x86`\0\x95\x01\x01\x92\x01\x91[\x84\x84\x10a@&WPPP\x90P\x81\x01\x80\x91\x11a*=W\x90V[\x82Q\x82\x1A\x81S`\x01\x93\x84\x01\x93\x92\x83\x01\x92\x01a@\x0EV[`\x1F\x81\x11a*=Wa\x01\0\n\x90V[\x91\x92\x90\x83\x15a@\xDAW\x92\x91[` \x93\x84\x84\x11\x15a@\xABW\x81Q\x81R\x84\x81\x01\x80\x91\x11a*=W\x93\x81\x01\x80\x91\x11a*=W\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x90\x81\x11a*=W\x91a@WV[\x92\x90\x91\x93P` \x03` \x81\x11a*=Wa@\xC7a@\xCC\x91a@V[\x91a\x02\x92`@Q\x93\x84a\x01\xB4V[\x82\x94\x81\x84R\x81\x83\x01\x11a\x02\xAFW\x82\x81` \x93\x84`\0\x96\x017\x01\x01RV[`\0\x80\xFD[\x90\x80`\x1F\x83\x01\x12\x15a\x02\xAFW\x81` a\x02\xCF\x935\x91\x01a\x02xV[\x90V[` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x82\x01\x12a\x02\xAFW`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x02\xAFWa\x02\xCF\x91`\x04\x01a\x02\xB4V[`\0[\x83\x81\x10a\x03.WPP`\0\x91\x01RV[\x81\x81\x01Q\x83\x82\x01R` \x01a\x03\x1EV[\x90a\x03Q` \x92\x82\x81Q\x94\x85\x92\x01a\x03\x1BV[\x01\x90V[` a\x03n\x91\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x03\x1BV[\x81\x01`\x04\x81R\x03\x01\x90 \x90V[` a\x03\x94\x91\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x03\x1BV[\x81\x01`\x05\x81R\x03\x01\x90 \x90V[` a\x03\xBA\x91\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x03\x1BV[\x81\x01`\x03\x81R\x03\x01\x90 \x90V[` \x90a\x03\xE1\x92\x82`@Q\x94\x83\x86\x80\x95Q\x93\x84\x92\x01a\x03\x1BV[\x82\x01\x90\x81R\x03\x01\x90 \x90V[\x90`\x01\x82\x81\x1C\x92\x16\x80\x15a\x046W[` \x83\x10\x14a\x04\x07WV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[\x91`\x7F\x16\x91a\x03\xFCV[\x80T`\0\x93\x92a\x04O\x82a\x03\xEDV[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a\x04\xB7WP`\x01\x14a\x04vW[PPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a\x04\xA3WPPPP\x01\x01\x908\x80\x80\x80\x80a\x04oV[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a\x04\x8BV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x86\x85\x01RPPP\x90\x15\x15`\x05\x1B\x01\x01\x91P8\x80\x80\x80\x80a\x04oV[\x90a\x02\x02a\x05\x08\x92`@Q\x93\x84\x80\x92a\x04@V[\x03\x83a\x01\xB4V[\x90`@\x91\x82Q\x92``\x84\x01\x93g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x86\x10\x81\x87\x11\x17a\x01wW\x85\x83R\x81\x95a\x05k\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA0\x84a\x05c\x84\x89a\x04@V[\x03\x01\x82a\x01\xB4V[\x82R\x82Qa\x05\x87\x81a\x05\x80\x81`\x01\x89\x01a\x04@V[\x03\x82a\x01\xB4V[` \x83\x01R\x82Q\x93` \x85\x01\x91\x85\x83\x10\x90\x83\x11\x17a\x01wW\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x85a\x05c\x84`\x02a\x05\xD4\x95\x82\x8AR\x01a\x04@V[\x83R\x01RV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F` \x93a\x06\x16\x81Q\x80\x92\x81\x87R\x87\x80\x88\x01\x91\x01a\x03\x1BV[\x01\x16\x01\x01\x90V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`!`\x04R`$`\0\xFD[`\x04\x11\x15a\x06VWV[a\x06\x1DV[4a\x02\xAFWa\x06qa\x06l6a\x02\xD2V[a\x03UV[`@Q\x90a\x06\x83\x82a\x05\x08\x81\x84a\x04@V[`\xFF`\x02\x82\x01T\x16g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x06a\x06\xA2`\x03\x85\x01a\x05\x0FV[\x93\x01T\x16\x90a\x06\xBC`@Q\x94`\x80\x86R`\x80\x86\x01\x90a\x05\xDAV[`\x04\x82\x10\x15a\x06VW\x84\x93` a\x07\x1D\x92a\x070\x94\x82\x88\x01R\x86\x81\x03`@\x88\x01R`@a\x07\x05a\x06\xF5\x85Q``\x85R``\x85\x01\x90a\x05\xDAV[\x84\x86\x01Q\x84\x82\x03\x86\x86\x01Ra\x05\xDAV[\x93\x01Q\x90`@\x81\x85\x03\x91\x01RQ\x91\x81\x81R\x01\x90a\x05\xDAV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x92\x16``\x84\x01RV[\x03\x90\xF3[4a\x02\xAFW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFW` `@Q\x7F\x8E\xF0z\xFD\xA4\xDE\xC4\xDCf\xE7\xD1\x8F\xC0\xE3\xA7\x13\xF7J\x11\xB3:qB,\x06\xA4\xB5\xE6#\xC3\xB2\x1A\x81R\xF3[4a\x02\xAFW` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x07\xC9\x82a\x07\xB66a\x02\xD2V[\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a\x03\x1BV[\x81\x01`\x06\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[\x92\x93\x91\x90`\x05\x81\x10\x15a\x06VW\x83R`\x03\x81\x10\x15a\x06VWa\x02\xCF\x93a\x08S\x91` \x85\x01R`\x80`@\x85\x01R` a\x08!\x82Q`@`\x80\x88\x01R`\xC0\x87\x01\x90a\x05\xDAV[\x91\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x85\x83\x03\x01`\xA0\x86\x01Ra\x05\xDAV[\x91``\x81\x84\x03\x91\x01Ra\x05\xDAV[4a\x02\xAFW`@\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x02\xAFWa\x08\xB2\x906\x90`\x04\x01a\x02\xB4V[`$5\x91\x82\x11a\x02\xAFWa\x08\xD6a\x08\xD0a\x08\xDC\x936\x90`\x04\x01a\x02\xB4V[\x91a\x03{V[\x90a\x03\xC7V[\x90a\x070`\x04\x83T\x92a\t0\x81Q\x95a\x08\xF4\x87a\x01[V[\x82Qa\t\x07\x81a\x05\x80\x81`\x01\x86\x01a\x04@V[\x87R\x82Qa\t\x1C\x81a\x05\x80\x81`\x02\x86\x01a\x04@V[` \x88\x01Ra\x05\x08\x83Q\x80\x95\x81\x93\x01a\x04@V[Q\x93\x83`\xFF\x80\x87\x96`\x08\x1C\x16\x91\x16\x85a\x07\xDDV[\x90` a\x02\xCF\x92\x81\x81R\x01\x90a\x05\xDAV[4a\x02\xAFW\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC` \x816\x01\x12a\x02\xAFW`\x04\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x02\xAFWa\x01\xA0\x82\x82\x01\x93\x836\x03\x01\x12a\x02\xAFW`d\x82\x01a\t\xC1a\t\xBA\x82\x86a\x19IV[6\x91a\x02xV[P`\x84\x83\x01\x91a\t\xD1\x83\x86a\x19\x9AV[\x90P\x15a\rUWa\t\xE0a*yV[\x93a\t\xEA\x85a\x03UV[\x90`\x02\x82\x01\x93a\t\xFB\x85T`\xFF\x16\x90V[a\n\x04\x81a\x06LV[a\r,W`D\x82\x01\x94a\n\x17\x86\x8Aa\x19IV[a\n!\x91\x86a\x1AJV[a\n)a)\x1FV[a\n3\x88\x8Ba\x19\x9AV[6\x90a\n>\x92a\x1CKV[a\nG\x91a,\xDCV[a\nT\x90`\x01\x86\x01a\x1E\xF4V[\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x02\x17\x90U`$\x82\x01a\n\x8A\x81a\x1F\x94V[`\x06\x85\x01\x90a\n\xC7\x91\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\x82T\x16\x17\x90UV[a\n\xD1\x89\x80a\x1F\x9EV[`\x03\x85\x01\x90a\n\xE0\x90\x82a \xE9V[\x86\x8Aa\n\xEC\x81\x80a\x1F\x9EV[\x80a\n\xF6\x91a\x19IV[\x94\x90\x9Aa\x0B\x03\x90\x83a\x19\x9AV[\x92\x90\x91a\x0B\x0F\x90a\x1F\x94V[\x93a\x0B\x19\x91a\x19IV[\x92\x90\x9Ba\x0B$a\x13\x93V[\x9Ca\x0B-a\x01\xF5V[\x9D\x8ERa\x0B8a\x02\x04V[\x946\x90a\x0BD\x92a\x02xV[\x84Ra\x0BNa\x13\x80V[` \x85\x01R`@\x9C\x8D\x85\x01Ra\x0Bba\x02\x11V[\x966\x90a\x0Bn\x92a\x02xV[\x86R6\x90a\x0B{\x92a\x1CKV[` \x85\x01R`\x01\x8A\x85\x01R``\x84\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x83\x01Ra\x01\x04\x84\x01\x91a\x0B\xAD`\xA4\x86\x01\x8Ca\x19IV[\x91\x90a\x0B\xB9\x8D\x80a\x1F\x9EV[` \x81\x01a\x0B\xC6\x91a\x19IV[\x91a\x0B\xD16\x88a\"`V[\x946\x90a\x0B\xDD\x92a\x02xV[\x916\x90a\x0B\xE9\x92a\x02xV[\x90a\x0B\xF4\x93\x89a.1V[\x15a\r\x04W\x92a\x0CR\x94\x92a\x0CHa\x0C@\x93a\x0C@\x8Da\x0C6a\x0C.`\xC4a\x0C&a\x0C!a\x0CN\x9Da\x04\xF4V[a.\xF8V[\x98\x01\x83a\x19IV[\x96\x90\x92a\x19IV[\x97\x90\x936\x90a\"`V[\x946\x91a\x02xV[\x93a/rV[\x15\x90V[a\x0C\xDDWPa\x0C\xB7a\x070\x94a\x0C\xD0a\x0C\x95\x7F\xA6\x16\xA9\xAA,e\xE95\xAB\xBD\x15\xB0z\x9B_\xF6\xC9\xC4\x8B\x06\xB4`\xA3\x9B\x0B\x8C\xFD\xA2\xA9\x85\x86\x9F\x94a\x0C\x8F\x88a/\xE4V[\x83a\x19IV[\x93\x90\x92a\x0C\xC1a\x0C\xAEa\x0C\xA8\x83\x80a\x1F\x9EV[\x80a\x19IV[\x93\x90\x92\x80a\x1F\x9EV[` \x81\x01\x90a\x19IV[\x92\x90\x91\x88Q\x96\x87\x96\x8B\x88a\"\xD9V[\x03\x90\xA1Q\x91\x82\x91\x82a\tDV[\x82Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x85\x88Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x83`@Q\x7F\xF8c'_\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`@Q\x7F3\xCA(\x94\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x02\xAFW` a\r\x95a\r\x906a\x02\xD2V[a#%V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x16\x81R\xF3[4a\x02\xAFW` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFW`\x045`\0R`\0` R` `@`\0 T`@Q\x90\x81R\xF3[4a\x02\xAFW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFW` `@Q\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm\x81R\xF3[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x90` \x82\x82\x01\x12a\x02\xAFW`\x045\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x02\xAFW\x82`\xA0\x92\x03\x01\x12a\x02\xAFW`\x04\x01\x90V[4a\x02\xAFWa\x0E\xB46a\x0EVV[a\x0E\xBCa*yV[a\x0E\xC5\x81a\x03UV[`\x02\x81\x01\x90a\x0E\xD5\x82T`\xFF\x16\x90V[a\x0E\xDE\x81a\x06LV[a\x10\xBDWa\x0E\xF6a\x0E\xEF\x85\x80a\x19IV[\x90\x83a\x1AJV[` \x84\x01\x93a\x0F\x12a\x0F\x08\x86\x83a#xV[` \x81\x01\x90a\x19\x9AV[\x15\x90Pa\x10yWa\x0F?a\x0CNa\x0F'a)\x1FV[a\x0F9a\x0F4\x89\x86a#xV[a#\xABV[\x90a1\x11V[a\x10OWa\x0F\xAC\x7F\x9F\x1F\x1E\xA4\x1A\xE2\x0B\x9E\x07\x16\x03\xACA\xA1x?=\x7F\xCB\xAFA3e\xFE\x97\xCF\xD6\xB1\xC1U$|\x93a\x0F\x81a\x0Fxa\x070\x98\x85a#xV[`\x01\x86\x01a%&V[`\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[a\x0F\xF3a\x0F\xBB``\x83\x01a\x1F\x94V[`\x06\x84\x01\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\x82T\x16\x17\x90UV[a\x10\x0E`@\x82\x01\x92`\x03a\x10\x07\x85\x85a\x1F\x9EV[\x91\x01a \xE9V[a\x10\x17\x84a/\xE4V[a\x10@a\x102a\x0C\xA8a\x10*\x84\x80a\x19IV[\x95\x90\x94a\x1F\x9EV[\x90`@Q\x94\x85\x94\x88\x86a&\xA8V[\x03\x90\xA1`@Q\x91\x82\x91\x82a\tDV[`\x04`@Q\x7F\xBC\xDFl\xCA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[a\x070\x94Pa\x0F\xAC\x7F\x9F\x1F\x1E\xA4\x1A\xE2\x0B\x9E\x07\x16\x03\xACA\xA1x?=\x7F\xCB\xAFA3e\xFE\x97\xCF\xD6\xB1\xC1U$|\x93a\x10\xB8a\x10\xAEa)\x1FV[`\x01\x86\x01\x90a0\xB0V[a\x0F\x81V[`\x04`@Q\x7F\xF8c'_\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x02\xAFWa\x10\xF56a\x0EVV[a\x11\x08a\x11\x02\x82\x80a\x19IV[\x90a&\xE0V[\x90`\x02\x82\x01\x91`\x02a\x11\x1B\x84T`\xFF\x16\x90V[a\x11$\x81a\x06LV[\x03a\x12\xC0Wa\x113\x82\x80a\x19IV[\x92\x90a\x11ga\x11@a\x13\x93V[\x91a\x11Ia\x01\xF5V[\x92\x83Ra\x11Ta\x02\x04V[\x95a\x11^\x86a\x04\xF4V[\x87R6\x91a\x02xV[` \x85\x01R`@\x84\x01R`\x03\x82\x01\x92a\x11\xD0a\x11\x8E`\x06\x85\x01Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[a\x11\x96a\x02\x11V[\x92a\x11\xA0\x87a\x04\xF4V[\x84Ra\x11\xAE`\x01\x87\x01a&\xF9V[` \x85\x01R`\x03`@\x85\x01R``\x84\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x83\x01RV[a\x12\x12a\x0CNa\x11\xE3` \x85\x01\x85a\x19IV[`\x04\x87\x01\x94\x91a\x12\x02\x90a\x11\xFA6`@\x8A\x01a\"`V[\x926\x91a\x02xV[a\x12\x0B\x86a\x04\xF4V[\x91\x88a.1V[a\x12\x96Wa\x12\x82a\x12\x91\x92a\x12m\x7F\x06<\x0E\x96d4}\x80\x13\xD3W]P P\xFD\x93m;Q\x03_\x05f\x96\xA69R?\xEA\xEDm\x97`\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[a\x0C\xA8a\x12}a\t\xBA\x83\x80a\x19IV[a/\xE4V[\x94\x90\x93`@Q\x95\x86\x95\x86a(OV[\x03\x90\xA1\0[`\x04`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\x8C\xA9\x89\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4a\x02\xAFW` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x13\x13\x82a\x07\xB66a\x02\xD2V[\x81\x01`\x01\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[4a\x02\xAFW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFW` `@Q\x7F\x9B\x98 Hj\x05\xC0\x19>\xFB!Ll+\xA8\xFC\xE0,Z\\\x84\xAA\x05\x7F\x81\x99\xC9\x9F\x13\xFF\x93\x9B\x81R\xF3[`@Q\x90a\x13\x8D\x82a\x01|V[`\0\x82RV[`@Q\x90a\x13\xA0\x82a\x01[V[`\x03\x82R\x7Fibc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x83\x01RV[4a\x02\xAFW`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFWa\x070a\x14\x06a\x13\x93V[`@Q\x91\x82\x91` \x83R` \x83\x01\x90a\x05\xDAV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\0`\x04R`$`\0\xFD[4a\x02\xAFWa\x070a\x05\x80a\x14\x06a\x14e` a\x07\xB66a\x02\xD2V[\x81\x01`\x02\x81R\x03\x01\x90 `@Q\x92\x83\x80\x92a\x04@V[4a\x02\xAFW`\0\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x02\xAFWa\x14\xB3a)\x1FV[\x90`@\x91`@Q\x91` \x80\x84\x01\x91\x81\x85R\x83Q\x80\x93R`@\x85\x01`\x05\x96\x83`@\x86`\x05\x1B\x89\x01\x01\x96\x01\x97`\0\x93[\x86\x85\x10a\x14\xEEW\x88\x88\x03\x89\xF3[\x90\x91\x92\x93\x94\x87\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\x8A\x83\x99\x9A\x03\x01\x86R\x8AQ\x82a\x151\x82Q\x88\x85R\x88\x85\x01\x90a\x05\xDAV[\x91\x01Q\x91\x83\x81\x83\x03\x91\x01R\x81Q\x80\x82R\x83\x82\x01\x90\x84\x80\x82\x89\x1B\x85\x01\x01\x94\x01\x92\x86[\x82\x81\x10a\x15vWPPPPP\x90\x80`\x01\x92\x9B\x01\x95\x01\x95\x01\x93\x98\x96\x95\x94\x92\x91\x90a\x14\xE1V[\x91\x93\x95\x80a\x15\xB0\x87\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x85`\x01\x96\x98\x9A\x03\x01\x89R\x89Qa\x05\xDAV[\x97\x01\x95\x01\x91\x01\x91\x8B\x95\x94\x93\x91\x92a\x15RV[4a\x02\xAFW` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x15\xEFa\x15\xEA6a\x02\xD2V[a\x03\xA1V[T\x16`@Q\x90\x81R\xF3[4a\x02\xAFW\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC` \x816\x01\x12a\x02\xAFW`\x04\x90\x815\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x02\xAFWa\x01\x80\x82\x84\x01\x91\x836\x03\x01\x12a\x02\xAFWa\x16[a\x11\x02\x82\x80a\x19IV[\x90`\x02\x82\x01`\x01a\x16m\x82T`\xFF\x16\x90V[a\x16v\x81a\x06LV[\x03a\x19 W`\x01\x83\x01`D\x85\x01\x94a\x16\xA8a\x0CNa\x16\x94\x88\x87a#xV[a\x0F9a\x16\xA0\x86a&\xF9V[\x916\x90a\x1B\x8AV[a\x18\xF7W`$\x81\x01\x92a\x16\xBB\x84\x86a\x19IV[6\x90a\x16\xC6\x92a\x02xV[Pa\x16\xD1\x85\x80a\x19IV[\x94\x90a\x16\xDBa\x13\x93V[\x90a\x16\xE4a\x01\xF5V[\x91\x82Ra\x16\xEFa\x02\x04V[\x96a\x16\xF9\x8Aa\x04\xF4V[\x88R6\x90a\x17\x06\x92a\x02xV[` \x87\x01R`@\x86\x01R`\x03\x87\x01\x97a\x17\x1F\x90\x87a#xV[a\x17(\x90a#\xABV[a\x171\x90a1\xD3V[\x92`\x06\x88\x01Ta\x17H\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[a\x17Pa\x02\x11V[\x96a\x17Z\x8Ba\x04\xF4V[\x88R` \x88\x01\x95\x86R`\x02`@\x89\x01R``\x88\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x87\x01R`\xE4\x81\x01\x91a\x17\x90`\x84\x83\x01\x89a\x19IV[\x90\x97`d\x84\x01\x98a\x17\xA1\x8A\x8Ca\x19IV[\x91a\x17\xAC6\x89a\"`V[\x946\x90a\x17\xB8\x92a\x02xV[\x916\x90a\x17\xC4\x92a\x02xV[\x90a\x17\xCF\x93\x8Da.1V[\x15a\x18\xCEWa\x18\x15a\x0CN\x92a\x18%a\x18,\x95a\x18\x1D\x8C\x8Fa\x18\x03`\xA4a\x17\xFBa\x0C!a\x18\x0B\x94a\x04\xF4V[\x97\x01\x83a\x19IV[\x98\x90\x92a\x19IV[\x96\x90\x936\x90a\"`V[\x966\x91a\x02xV[\x936\x91a\x02xV[\x92\x8Ba/rV[a\x18\xA5Wa\x18\x9A\x7F\xE7a[N\xBF\xFC\xB90\x06\x1F\x90\x1C\xC0~\xE6{M2\xC8\xF9\x05!A\xEB\x8B\xCE-\xEC?W\x7F\xE1\x98\x94a\x0C\x8Fa\x12\x82\x95a\x12\x91\x98\x95a\x18\x94a\x12m\x96`\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x82T\x16\x17\x90UV[Qa2\xA6V[\x90\x94\x87\x01\x94\x85a\x1AJV[\x87`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x8A`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x86`@Q\x7F\xBC\xDFl\xCA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x84`@Q\x7F\x8C\xA9\x89\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x02\xAFW\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x02\xAFW` \x01\x91\x816\x03\x83\x13a\x02\xAFWV[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x02\xAFW\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x02\xAFW` \x01\x91\x81`\x05\x1B6\x03\x83\x13a\x02\xAFWV[\x81\x81\x10a\x19\xF9WPPV[`\0\x81U`\x01\x01a\x19\xEEV[\x91\x90`\x1F\x81\x11a\x1A\x14WPPPV[a\x02\x02\x92`\0R` `\0 \x90` `\x1F\x84\x01`\x05\x1C\x83\x01\x93\x10a\x1A@W[`\x1F\x01`\x05\x1C\x01\x90a\x19\xEEV[\x90\x91P\x81\x90a\x1A3V[\x90\x92\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x01wWa\x1Ap\x81a\x1Aj\x84Ta\x03\xEDV[\x84a\x1A\x05V[`\0`\x1F\x82\x11`\x01\x14a\x1A\xCEW\x81\x90a\x1A\xBF\x93\x94\x95`\0\x92a\x1A\xC3W[PP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x90UV[\x015\x90P8\x80a\x1A\x8DV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x16\x94a\x1B\x01\x84`\0R` `\0 \x90V[\x91\x80[\x87\x81\x10a\x1BZWP\x83`\x01\x95\x96\x97\x10a\x1B\"W[PPP\x81\x1B\x01\x90UV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U8\x80\x80a\x1B\x18V[\x90\x92` `\x01\x81\x92\x86\x86\x015\x81U\x01\x94\x01\x91\x01a\x1B\x04V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x01wW`\x05\x1B` \x01\x90V[\x91\x90`@\x83\x82\x03\x12a\x02\xAFW`@Q\x92a\x1B\xA3\x84a\x01[V[\x83\x815\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84\x81\x11a\x02\xAFW\x81a\x1B\xC4\x91\x85\x01a\x02\xB4V[\x82R` \x92\x83\x81\x015\x90\x85\x82\x11a\x02\xAFW\x01\x81`\x1F\x82\x01\x12\x15a\x02\xAFW\x805a\x1B\xEC\x81a\x1BrV[\x95a\x1B\xFA`@Q\x97\x88a\x01\xB4V[\x81\x87R\x85\x80\x88\x01\x92`\x05\x1B\x84\x01\x01\x93\x80\x85\x11a\x02\xAFW\x86\x84\x01\x92[\x85\x84\x10a\x1C&WPPPPPP\x01RV[\x835\x83\x81\x11a\x02\xAFW\x88\x91a\x1C@\x84\x84\x80\x94\x8A\x01\x01a\x02\xB4V[\x81R\x01\x93\x01\x92a\x1C\x15V[\x92\x91\x90\x92a\x1CX\x84a\x1BrV[\x91a\x1Cf`@Q\x93\x84a\x01\xB4V[\x82\x94\x80\x84R` \x80\x94\x01\x90`\x05\x1B\x83\x01\x92\x82\x84\x11a\x02\xAFW\x80\x91[\x84\x83\x10a\x1C\x90WPPPPPPV[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x02\xAFW\x86\x91a\x1C\xB0\x86\x84\x93\x86\x01a\x1B\x8AV[\x81R\x01\x92\x01\x91a\x1C\x81V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[\x80T\x82\x10\x15a\x1D\x06W`\0R` `\0 \x90`\x01\x1B\x01\x90`\0\x90V[a\x1C\xBBV[\x91\x90\x91\x82Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x01wWa\x1D-\x81a\x1Aj\x84Ta\x03\xEDV[` \x80`\x1F\x83\x11`\x01\x14a\x1D\x88WP\x81\x90a\x1A\xBF\x93\x94\x95`\0\x92a\x1D}WPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x01Q\x90P8\x80a\x1A\x8DV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x83\x16\x95a\x1D\xBC\x85`\0R` `\0 \x90V[\x92`\0\x90[\x88\x82\x10a\x1E\x16WPP\x83`\x01\x95\x96\x97\x10a\x1D\xDFWPPP\x81\x1B\x01\x90UV[\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x84`\x03\x1B\x16\x1C\x19\x16\x90U8\x80\x80a\x1B\x18V[\x80`\x01\x85\x96\x82\x94\x96\x86\x01Q\x81U\x01\x95\x01\x93\x01\x90a\x1D\xC1V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[a\x1Eg\x81Ta\x03\xEDV[\x90\x81a\x1EqWPPV[\x81`\x1F`\0\x93\x11`\x01\x14a\x1E\x83WPUV[\x90\x80\x83\x91\x82Ra\x1E\xA2`\x1F` \x84 \x94\x01`\x05\x1C\x84\x01`\x01\x85\x01a\x19\xEEV[UUV[\x90h\x01\0\0\0\0\0\0\0\0\x81\x11a\x01wW\x81T\x91\x81\x81U\x82\x82\x10a\x1E\xC9WPPPV[`\0R` `\0 \x91\x82\x01\x91\x01[\x81\x81\x10a\x1E\xE2WPPV[\x80a\x1E\xEE`\x01\x92a\x1E]V[\x01a\x1E\xD7V[\x91\x90\x82Th\x01\0\0\0\0\0\0\0\0\x81\x10\x15a\x01wWa\x1F\x1B\x90`\x01\x94`\x01\x82\x01\x81Ua\x1C\xEAV[a\x1F}W`\x01\x90a\x1F-\x83Q\x82a\x1D\x0BV[\x01` \x80\x92\x01Q\x91` \x83Q\x93a\x1FD\x85\x85a\x1E\xA6V[\x01\x91`\0R` `\0 `\0\x92[\x84\x84\x10a\x1FbWPPPPP\x90PV[\x86\x83\x82a\x1Fq\x83\x94Q\x86a\x1D\x0BV[\x01\x92\x01\x93\x01\x92\x90a\x1FRV[a\x14\x1AV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x03a\x02\xAFWV[5a\x02\xCF\x81a\x1F\x82V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA1\x816\x03\x01\x82\x12\x15a\x02\xAFW\x01\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x02\xAFW\x01\x90V[\x91\x90a \x10\x90\x80a\x19IV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x94\x92\x94\x11a\x01wWa 0\x81a\x1Aj\x84Ta\x03\xEDV[`\0`\x1F\x82\x11`\x01\x14a ~W\x81\x90a\x1A\xBF\x93\x94\x95`\0\x92a\x1A\xC3WPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x16\x94a \xB1\x84`\0R` `\0 \x90V[\x91\x80[\x87\x81\x10a \xD1WP\x83`\x01\x95\x96\x97\x10a\x1B\"WPPP\x81\x1B\x01\x90UV[\x90\x92` `\x01\x81\x92\x86\x86\x015\x81U\x01\x94\x01\x91\x01a \xB4V[\x91\x90\x91a \xF6\x83\x80a\x19IV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x95\x92\x95\x11a\x01wWa!\x1C\x81a!\x16\x85Ta\x03\xEDV[\x85a\x1A\x05V[`\0`\x1F\x82\x11`\x01\x14a!\xA1W\x91a!s\x82a!\x9A\x93`\x02\x95a\x02\x02\x98\x99`\0\x92a\x1A\xC3WPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17\x90V[\x84U[a!\x90a!\x86` \x83\x01\x83a\x19IV[\x90`\x01\x87\x01a\x1AJV[`@\x81\x01\x90a\x1F\xD1V[\x91\x01a \x04V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x16\x90a!\xD4\x85`\0R` `\0 \x90V[\x91\x81[\x81\x81\x10a\"WPPPPPPPV[\x84\x82Qa'J\x81a\x01[V[\x83Qa'Z\x81a\x05\x80\x81\x8Aa\x04@V[\x81R`\x01\x80\x87\x01\x90\x81Ta'm\x81a\x1BrV[\x92a'z\x88Q\x94\x85a\x01\xB4V[\x81\x84R\x88R\x84\x88 \x88\x86\x85\x01[\x83\x82\x10a'\xADWPPPPP\x92\x81`\x01\x94\x84`\x02\x95\x94\x01R\x81R\x01\x94\x01\x96\x01\x95\x92a'.V[\x93\x80\x95\x96\x97\x81\x92\x93\x94\x95\x8BQa'\xC7\x81a\x05\x80\x81\x8Aa\x04@V[\x81R\x01\x93\x01\x91\x01\x8B\x96\x95\x94\x93\x92a'\x87V[\x80T`\0\x93\x92a'\xE8\x82a\x03\xEDV[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a\x04\xB7WP`\x01\x14a(\x0EWPPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a(;WPPPP\x01\x01\x908\x80\x80\x80\x80a\x04oV[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a(#V[\x93\x90a\x02\xCF\x95\x93a(oa(}\x92a(\x8B\x95`\x80\x89R`\x80\x89\x01\x91a\"\x9AV[\x90\x86\x82\x03` \x88\x01Ra'\xD9V[\x90\x84\x82\x03`@\x86\x01Ra'\xD9V[\x91``\x81\x84\x03\x91\x01Ra'\xD9V[`@Q\x90a(\xA6\x82a\x01[V[``` \x83\x82\x81R\x01RV[`@Q\x90a(\xBF\x82a\x01[V[`\x01\x82R\x81`\0[` \x90\x81\x81\x10\x15a(\xE9W` \x91a(\xDDa(\x99V[\x90\x82\x85\x01\x01R\x01a(\xC7V[PPPV[\x80Q\x15a\x1D\x06W` \x01\x90V[\x80Q`\x01\x10\x15a\x1D\x06W`@\x01\x90V[\x80Q\x82\x10\x15a\x1D\x06W` \x91`\x05\x1B\x01\x01\x90V[a)'a(\xB2V[a)/a(\x99V[P`@\x80Q\x90a)>\x82a\x01[V[`\x01\x82R` \x7F1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x84\x01R`@Q\x91a)w\x83a\x01\x98V[`\x02\x83R`\0[\x81\x81\x10a* WPPPa*\x08\x90`@Q\x92a)\x99\x84a\x01[V[\x83R` \x83\x01\x90\x81Ra)\xED`@Qa)\xB1\x81a\x01[V[`\r\x81R\x7FORDER_ORDERED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R\x82Q\x90a)\xE7\x82a(\xEEV[Ra(\xEEV[Pa)\xF6a1\x9AV[\x90Q\x90a*\x02\x82a(\xFBV[Ra(\xFBV[Pa*\x12\x82a(\xEEV[Ra*\x1C\x81a(\xEEV[P\x90V[``\x84\x82\x01\x84\x01R\x82\x01a)~V[\x90`\x01\x82\x01\x80\x92\x11a*=WV[a\x1E.V[`\x01\x01\x90\x81`\x01\x11a*=WV[` \x01\x90\x81` \x11a*=WV[\x90` \x82\x01\x80\x92\x11a*=WV[\x91\x90\x82\x01\x80\x92\x11a*=WV[\x7F\x8E\xF0z\xFD\xA4\xDE\xC4\xDCf\xE7\xD1\x8F\xC0\xE3\xA7\x13\xF7J\x11\xB3:qB,\x06\xA4\xB5\xE6#\xC3\xB2\x1A`\0R`\0` R`@`\0 T\x80\x80`\0\x91z\x18O\x03\xE9?\xF9\xF4\xDA\xA7\x97\xEDn8\xEDd\xBFj\x1F\x01\0\0\0\0\0\0\0\0\x80\x82\x10\x15a,\xCEW[Pm\x04\xEE-mA[\x85\xAC\xEF\x81\0\0\0\0\x80\x83\x10\x15a,\xBFW[Pf#\x86\xF2o\xC1\0\0\x80\x83\x10\x15a,\xB0W[Pc\x05\xF5\xE1\0\x80\x83\x10\x15a,\xA1W[Pa'\x10\x80\x83\x10\x15a,\x92W[P`d\x82\x10\x15a,\x82W[`\n\x80\x92\x10\x15a,xW[`\x01\x90\x81`!a+A`\x01\x87\x01a3\x8AV[\x95\x86\x01\x01\x90[a,\x17W[PPPPa+\x98\x91a+\xC4a+\xC9\x92`@Q\x94\x85\x91a+\x92` \x84\x01`\x0B\x90\x7Fconnection-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\x01\x90V[\x90a\x03>V[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x85R\x84a\x01\xB4V[a*/V[\x7F\x8E\xF0z\xFD\xA4\xDE\xC4\xDCf\xE7\xD1\x8F\xC0\xE3\xA7\x13\xF7J\x11\xB3:qB,\x06\xA4\xB5\xE6#\xC3\xB2\x1A`\0\x90\x81R` R\x7F$\x07(t\xBB\x11f)4\xF0\xC6\x8C\xA2e\x9A\x14\xEF\xAEqU[\xB4\x8E\xBA$P\xFEd3\x18?\x95U\x90V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x91\x01\x91\x7F0123456789abcdef\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\x82\x06\x1A\x83S\x04\x91\x82\x15a,sW\x91\x90\x82a+GV[a+LV[\x91`\x01\x01\x91a+/V[\x91\x90`d`\x02\x91\x04\x91\x01\x91a+$V[`\x04\x91\x93\x92\x04\x91\x01\x918a+\x19V[`\x08\x91\x93\x92\x04\x91\x01\x918a+\x0CV[`\x10\x91\x93\x92\x04\x91\x01\x918a*\xFDV[` \x91\x93\x92\x04\x91\x01\x918a*\xEBV[`@\x93P\x81\x04\x91P8a*\xD2V[\x90a,\xE5a(\x99V[P\x81Q\x91`\0[\x83\x81\x10a-\x1DW`\x04`@Q\x7F\xBC\xDFl\xCA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[a-'\x81\x83a)\x0BV[Qa-2\x84\x82a3\xD9V[\x91\x90\x91\x15a-|Wa-N` \x92\x83\x80\x84\x01Q\x91\x01Q\x90a4\x9FV[\x90\x81Qa-bWPPP`\x01\x90[\x01a,\xECV[\x93P\x93P\x93PPQ\x91a-sa\x021V[\x92\x83R\x82\x01R\x90V[PP`\x01\x90a-\\V[\x90\x81` \x91\x03\x12a\x02\xAFWQ\x80\x15\x15\x81\x03a\x02\xAFW\x90V[\x94\x91\x93a-\xFAa\x02\xCF\x97\x95a.\x16\x95a-\xC2a.\x08\x95a\x01 \x80\x8CR\x8B\x01\x90a'\xD9V[\x91` g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x81Q\x16\x82\x8D\x01R\x01Q\x16`@\x8A\x01R`\0``\x8A\x01R`\0`\x80\x8A\x01R\x88\x82\x03`\xA0\x8A\x01Ra\x05\xDAV[\x90\x86\x82\x03`\xC0\x88\x01Ra'\xD9V[\x90\x84\x82\x03`\xE0\x86\x01Ra\x05\xDAV[\x91a\x01\0\x81\x84\x03\x91\x01Ra\x05\xDAV[`@Q=`\0\x82>=\x90\xFD[\x91`\0` \x94\x92a.\xB4a.ya.ss\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa.la\x05\x80a\r\x90\x8B`@Q\x92\x83\x80\x92a\x04@V[\x16\x96a5sV[\x98a5\xC6V[`@Q\x98\x89\x97\x88\x96\x87\x95\x7F\xF9\xBBZQ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R`\x05\x83\x01\x92`\x04\x88\x01a-\x9EV[\x03\x92Z\xF1\x90\x81\x15a.\xF3W`\0\x91a.\xCAWP\x90V[a\x02\xCF\x91P` =` \x11a.\xECW[a.\xE4\x81\x83a\x01\xB4V[\x81\x01\x90a-\x86V[P=a.\xDAV[a.%V[a\x02\xCF`4`@Q\x80\x93\x7Fclients/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x83\x01Ra/<\x81Q\x80\x92` `(\x86\x01\x91\x01a\x03\x1BV[\x81\x01\x7F/clientState\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`(\x82\x01R\x03`\x14\x81\x01\x84R\x01\x82a\x01\xB4V[\x91\x93\x90\x92`\0` \x94a.\xB4s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa/\xA7`@Qa\r\x90\x81a\x05\x80\x81\x8Ca\x04@V[\x16\x94`@Q\x98\x89\x97\x88\x96\x87\x95\x7F\xF9\xBBZQ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87R`\x05\x83\x01\x92`\x04\x88\x01a-\x9EV[a/\xED\x81a\x03UV[`@Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91`\xA0\x82\x01\x91\x83\x83\x11\x81\x84\x10\x17a\x01wWa0\xAD\x93`\x06a0\x90\x93\x85a0\x9D\x96`@Ra0K\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x86a\x05c\x84\x86a\x04@V[\x84Ra0Y`\x01\x82\x01a&\xF9V[` \x85\x01Ra0r`\xFF`\x02\x83\x01T\x16`@\x86\x01a\"TV[a0~`\x03\x82\x01a\x05\x0FV[``\x85\x01R\x01T\x16`\x80\x82\x01Ra5\xC6V[` \x81Q\x91\x01 \x92a6\xA2V[`\0R`\0` R`@`\0 \x90V[UV[\x90\x80Ta0\xE7W\x81Q\x91`\0[\x83\x81\x10a0\xCAWPPPPV[\x80a0\xE1a0\xDA`\x01\x93\x85a)\x0BV[Q\x85a\x1E\xF4V[\x01a0\xBDV[`\x04`@Q\x7F\x82\xC2\x8D\xCA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[a1\x1B\x90\x82a3\xD9V[\x91\x90\x91\x15a1,Wa\x02\xCF\x91a6\xB5V[PP`\0\x90V[\x90a1=\x82a\x1BrV[a1J`@Q\x91\x82a\x01\xB4V[\x82\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a1x\x82\x94a\x1BrV[\x01\x90`\0[\x82\x81\x10a1\x89WPPPV[\x80``` \x80\x93\x85\x01\x01R\x01a1}V[`@Q\x90a1\xA7\x82a\x01[V[`\x0F\x82R\x7FORDER_UNORDERED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x83\x01RV[\x90a1\xDCa(\xB2V[\x91\x82Q\x15a\x1D\x06W` \x83\x01R\x81Q\x15a\x1D\x06WV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`1`\x04R`$`\0\xFD[\x80T\x80\x15a2\xA1W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01\x90a2V\x82\x82a\x1C\xEAV[a\x1F}Wa2c\x81a\x1E]V[`\x01\x80\x91\x01\x80T\x90`\0\x81U\x81a2{W[PPPUV[`\0R` `\0 \x90\x81\x01\x90[\x81\x81\x10\x15a2uW\x80a2\x9B\x84\x92a\x1E]V[\x01a2\x88V[a1\xF2V[\x90\x81Q\x91\x81T\x80\x84\x14`\0\x14a2\xEFWP`\0[\x83\x81\x10a2\xC7WPPPPV[\x80a2\xE9a2\xD7`\x01\x93\x85a)\x0BV[Qa2\xE2\x83\x87a\x1C\xEAV[P\x90a8vV[\x01a2\xBAV[\x80\x84\x11\x15a3GW`\0[\x81\x81\x10a3&WP[\x83\x81\x10a3\x10WPPPPV[\x80a3 a0\xDA`\x01\x93\x85a)\x0BV[\x01a3\x03V[\x80a3Aa36`\x01\x93\x86a)\x0BV[Qa2\xE2\x83\x88a\x1C\xEAV[\x01a2\xFAV[\x92\x90`\0[\x82\x81\x10a3tWPP[\x82\x81\x10a3bWPPPV[`\x01\x90a3n\x83a2!V[\x01a3VV[\x80a3\x84a36`\x01\x93\x85a)\x0BV[\x01a3LV[\x90a3\x94\x82a\x02>V[a3\xA1`@Q\x91\x82a\x01\xB4V[\x82\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a3\xCF\x82\x94a\x02>V[\x01\x90` 6\x91\x017V[\x90a3\xE2a(\x99V[\x91\x81Q\x90`\0\x92[\x82\x84\x10a3\xFBWPPPP\x90`\0\x90V[\x90\x91\x92\x93Pa4\n\x84\x82a)\x0BV[Q\x93\x84Q`@a4Va4\x82\x82Q\x93` \x94a4B\x86\x82\x81a45\x81\x83\x01\x96\x87\x81Q\x93\x84\x92\x01a\x03\x1BV[\x81\x01\x03\x80\x84R\x01\x82a\x01\xB4V[Q\x90 \x93\x87Q\x93Q\x92\x83\x91\x82\x01\x80\x95a\x03>V[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x83R\x82a\x01\xB4V[Q\x90 \x14a4\x95W`\x01\x01\x92\x91\x90a3\xEAV[PPPP\x90`\x01\x90V[\x90\x81Qa4\xAB\x81a13V[\x92`\0\x92\x83[\x83\x81\x10a5\0WPPPPa4\xC5\x81a13V[\x91`\0[\x82\x81\x10a4\xD6WPPP\x90V[\x80a4\xE3`\x01\x92\x84a)\x0BV[Qa4\xEE\x82\x87a)\x0BV[Ra4\xF9\x81\x86a)\x0BV[P\x01a4\xC9V[a5\x14\x82a5\x0E\x83\x86a)\x0BV[Qa9{V[a5!W[`\x01\x01a4\xB1V[\x93a5,\x85\x84a)\x0BV[Qa57\x82\x88a)\x0BV[Ra5B\x81\x87a)\x0BV[P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x14a*=W`\x01\x01\x93a5\x19V[a\x02\xCF`,`@Q\x80\x93\x7Fconnections/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x83\x01Ra5\xB6\x81Q\x80\x92` \x86\x86\x01\x91\x01a\x03\x1BV[\x81\x01\x03`\x0C\x81\x01\x84R\x01\x82a\x01\xB4V[\x90a5\xDAa5\xD5\x83QQa;\x95V[a*BV[`\0\x90[` \x84\x01Q\x80Q\x83\x10\x15a6\x1EW`\x01\x91a6\x10a5\xD5a6\x0Ba6\x05\x87a6\x16\x96a)\x0BV[Qa;\xAAV[a;\x95V[\x90a*lV[\x91\x01\x90a5\xDEV[Pa6\x9D\x91Pa6\x91a6qa6^a6\x96\x93\x96\x95\x96a6\x10a5\xD5a6Ya6S`@\x8B\x01Qa6N\x81a\x06LV[a<\"V[`\x03\x0B\x90V[a<\x80V[a6\x10a5\xD5a6\x0B``\x89\x01Qa<\xA7V[a6\x10a5\xD5a6\x8C`\x80\x88\x01Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[a<\x94V[a3\x8AV[\x80\x92a:+V[\x81R\x90V[a6\xAB\x90a5sV[` \x81Q\x91\x01 \x90V[\x81Q\x91`@Q` \x93\x81a6\xCD` \x82\x01\x80\x93a\x03>V[\x03\x91a6\xFF\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x84\x81\x01\x83R\x82a\x01\xB4V[Q\x90 \x90\x83Q\x90a7(`@Q\x91\x82a7\x1C` \x82\x01\x80\x96a\x03>V[\x03\x90\x81\x01\x83R\x82a\x01\xB4V[Q\x90 \x03a7\x90W` \x01\x91\x82QQ\x92\x83\x15a7\x87W`\0\x92`\0[\x85\x81\x10a7VWPPPPPP`\x01\x90V[a7ra\x0CNa7g\x83\x86Qa)\x0BV[Q\x86\x85\x01Q\x90a9{V[a7~W`\x01\x01a7DV[PPPP\x90P\x90V[PPPP`\0\x90V[PPP`\0\x90V[\x80T\x82\x10\x15a\x1D\x06W`\0R` `\0 \x01\x90`\0\x90V[\x91\x90a\x1F}Wa\x02\x02\x91a\x1D\x0BV[\x80T\x80\x15a2\xA1W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01\x90a7\xF4\x82\x82a7\x98V[a\x1F}Wa8\x02\x81Ta\x03\xEDV[\x90\x81a8\rWPPUV[\x81`\x1F`\0\x93\x11`\x01\x14a8 WPUUV[\x90\x80\x83\x91\x82Ra8?`\x1F` \x84 \x94\x01`\x05\x1C\x84\x01`\x01\x85\x01a\x19\xEEV[UUUV[\x80Th\x01\0\0\0\0\0\0\0\0\x81\x10\x15a\x01wWa8f\x91`\x01\x82\x01\x81Ua7\x98V[\x91\x90\x91a\x1F}Wa\x02\x02\x91a\x1D\x0BV[` \x90a8\x84\x81Q\x84a\x1D\x0BV[\x01\x80QQ\x90`\x01\x80\x93\x01\x90\x81T\x80\x84\x14`\0\x14a8\xD4WP`\0[\x83\x81\x10a8\xADWPPPPPV[\x80a8\xCEa8\xBD\x87\x93\x85Qa)\x0BV[Qa8\xC8\x83\x87a7\x98V[\x90a7\xB0V[\x01a8\x9FV[\x80\x84\x11\x15a96W\x84`\0[\x82\x81\x10a9\x15WPP[\x83\x81\x10a8\xF8WPPPPPV[\x80a9\x0Fa9\x08\x87\x93\x85Qa)\x0BV[Q\x85a8DV[\x01a8\xEAV[a9.a9#\x82\x86Qa)\x0BV[Qa8\xC8\x83\x88a7\x98V[\x01\x85\x90a8\xE0V[\x92\x90\x84`\0[\x83\x81\x10a9eWPPP[\x82\x81\x10a9TWPPPPV[\x83\x90a9_\x83a7\xBFV[\x01a9GV[a9sa9#\x82\x85Qa)\x0BV[\x01\x85\x90a9\x1CV[\x92\x01g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa:\xAA\x82Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x16a:\xB7W[PPa9\xC4V[\x81a6\x10\x91a:\xD0\x85a6\x10a:\xE1\x96a:\xE6\x98a?\x99V[\x93\x84\x91Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[a>\x07V[8\x80a:\xB0V[\x81a6\x10\x91a;\x06\x85a6\x10a:\xE1\x96a;\x13\x98a?\x7FV[\x93\x84\x91Qa6N\x81a\x06LV[\x848a:sV[\x94\x90\x92\x93\x94\x91[\x83QQ\x83\x10\x15a;\\Wa;Ta;>\x82a6\x10\x88`\x01\x95a?rV[a6\x10\x87\x82a;N\x88\x8AQa)\x0BV[Qa=\rV[\x92\x01\x91a;!V[\x90\x94\x93\x92P\x90P`\x80a:\x8Da:EV[\x90Pa;\x8Fa;\x83a;~\x84a?:V[a*PV[a6\x10\x84\x82\x87Qa?\xEFV[\x90a:8V[a;\x9E\x81a>\xFFV[\x81\x01\x80\x91\x11a*=W\x90V[a;\xB5\x81QQa;\x95V[`\x01\x90\x81\x01\x80\x82\x11a*=W\x81\x90\x92`\0\x92[a;\xD3W[PPP\x90V[` \x81\x94\x92\x93\x94\x01Q\x80Q\x85\x10\x15a<\x19Wa;\xF2\x85a;\xF9\x92a)\x0BV[QQa;\x95V[\x80\x84\x01\x84\x11a*=W\x83\x90\x83\x01\x01\x80\x92\x11a*=W\x82\x80\x92\x94\x01\x92a;\xC8V[P\x81\x93Pa;\xCDV[`\x04\x81\x10\x15a\x06VW\x80\x15a\xFFV[a<\xB2\x81QQa;\x95V[\x90`\x01\x82\x81\x01\x92\x83\x82\x11a*=Wa<\xCE` \x84\x01QQa;\x95V[\x90\x81\x83\x01\x83\x11a*=W\x01\x91`\x02\x83\x01\x80\x94\x11a*=Wa6\x0B`@a<\xF5\x92\x01Qa?!V[\x90\x81\x81\x01\x10a*=W`\x03\x91\x01\x01\x80\x91\x11a*=W\x90V[\x90\x91a=\x1Ba6\x91\x83a;\xAAV[\x91` \x90`\0\x90\x80QQa=\xE0W[` \x01\x90\x81QQa=\x88W[PPa=ra=~a\x02\xCF\x95\x94a=\x83\x94a=Sa=x\x95a9\xC4V[\x94\x85\x92a=ja=d\x84\x8B\x87a?\xB3V[\x8Aa*lV[\x95\x86\x91a*^V[\x92a*lV[\x90a@KV[a*lV[a:\x1EV[\x95\x91\x92\x94\x90\x93\x95\x92[\x84QQ\x84\x10\x15a=\xCCWa=\xC4a=\xAE\x82a6\x10\x8A`\x01\x95a?rV[a6\x10\x89\x82a=\xBE\x89\x8BQa)\x0BV[Qa?\xEFV[\x93\x01\x92a=\x91V[\x91\x95\x90\x94\x90\x93P\x91Pa=ra=~a=6V[\x91P` a=\xFFa=\xF3a;~\x87a?:V[a6\x10\x87\x82\x87Qa?\xEFV[\x92\x90Pa=*V[\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x02\xCF\x93\x92\x16a?\xB3V[\x91a>)a6\x91\x84a<\xA7V[\x92` \x81QQa>\xD7W[` \x82\x01\x80QQa>}W[Pa=~\x85a=\x83\x94a=Sa>x`@a6\x10\x85a=x\x99a>n\x8Aa\x02\xCF\x9Fa6\x10\x90a=r\x9Da?\xA6V[\x93\x84\x91\x01Qa@\xE0V[a9\xC4V[\x90\x91a>\x89\x86\x84a?rV[\x83\x01\x80\x93\x11a*=W\x85a=\x83\x94a=Sa>x`@a6\x10\x85a=~\x97a>na>\xC4a\x02\xCF\x9F\x9Ca6\x10a=x\x9E\x82a=r\x9FQa?\xEFV[\x9APP\x99PPPPPP\x94P\x95Pa>@V[Pa>\xE4a;~\x85a?:V[a>\xF0\x85\x82\x84Qa?\xEFV[\x81\x01\x80\x91\x11\x15a>4Wa\x1E.V[`\x01\x80\x91`\x07\x90`\x07\x1C\x80[a?\x15WPPP\x90V[\x92\x82\x01\x92\x81\x1C\x80a?\x0BV[a?,\x90QQa;\x95V[`\x01\x01\x80`\x01\x11a*=W\x90V[`\n\x90`\0\x90` \x01\x82[`\x07\x1C\x92\x83\x15a?hW`\x80\x17\x81S`\x01\x80\x91\x01\x91\x01`\x7F\x83\x16\x92\x91\x90\x91a?EV[\x90`\x01\x93PS\x01\x90V[`\0\x91\x82\x91\x01`\x12a?hV[`\0\x91\x82\x91\x01`\x18a?hV[`\0\x91\x82\x91\x01`\"a?hV[`\0\x91\x82\x91\x01`(a?hV[`\0\x91\x82\x91\x01`\x1Aa?hV[`\x7F\x93\x92`\0\x92\x85\x83\x16\x92\x91\x01\x90[`\x07\x1C\x91\x82\x15a?\xE3W`\x80\x17\x81S`\x01\x92\x83\x01\x92\x85\x83\x16\x92\x91\x01\x90a?\xC2V[\x91P`\x01\x93\x94PS\x01\x90V[\x90\x81Q\x91a?\xFE\x84\x83\x85a?\xB3V[\x93` `\0\x91\x86`\0\x95\x01\x01\x92\x01\x91[\x84\x84\x10a@&WPPP\x90P\x81\x01\x80\x91\x11a*=W\x90V[\x82Q\x82\x1A\x81S`\x01\x93\x84\x01\x93\x92\x83\x01\x92\x01a@\x0EV[`\x1F\x81\x11a*=Wa\x01\0\n\x90V[\x91\x92\x90\x83\x15a@\xDAW\x92\x91[` \x93\x84\x84\x11\x15a@\xABW\x81Q\x81R\x84\x81\x01\x80\x91\x11a*=W\x93\x81\x01\x80\x91\x11a*=W\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x90\x81\x11a*=W\x91a@WV[\x92\x90\x91\x93P` \x03` \x81\x11a*=Wa@\xC7a@\xCC\x91a@(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for IBCConnection { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for IBCConnection { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for IBCConnection { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for IBCConnection { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IBCConnection)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl IBCConnection { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - IBCCONNECTION_ABI.clone(), - client, - )) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - IBCCONNECTION_ABI.clone(), - IBCCONNECTION_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - /// Calls the contract's `COMMITMENT_PREFIX` (0xa9550dac) function - pub fn commitment_prefix( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 85, 13, 172], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `capabilities` (0x5717bcf5) function - pub fn capabilities( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([87, 23, 188, 245], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channels` (0x5b3de260) function - pub fn channels( - &self, - p0: ::std::string::String, - p1: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - u8, - u8, - IbcCoreChannelV1CounterpartyData, - ::std::string::String, - ), - > { - self.0 - .method_hash([91, 61, 226, 96], (p0, p1)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientImpls` (0xd1297b8d) function - pub fn client_impls( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([209, 41, 123, 141], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientRegistry` (0x990491a5) function - pub fn client_registry( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([153, 4, 145, 165], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientTypes` (0xc2380105) function - pub fn client_types( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([194, 56, 1, 5], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `commitments` (0x839df945) function - pub fn commitments( - &self, - p0: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([131, 157, 249, 69], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connectionOpenAck` (0xe7f32c0f) function - pub fn connection_open_ack( - &self, - msg: MsgConnectionOpenAck, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([231, 243, 44, 15], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connectionOpenConfirm` (0x87c54dd4) function - pub fn connection_open_confirm( - &self, - msg: MsgConnectionOpenConfirm, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([135, 197, 77, 212], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connectionOpenInit` (0x8775f7f8) function - pub fn connection_open_init( - &self, - msg: MsgConnectionOpenInit, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([135, 117, 247, 248], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connectionOpenTry` (0x7b666dc1) function - pub fn connection_open_try( - &self, - msg: MsgConnectionOpenTry, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([123, 102, 109, 193], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connections` (0x31973f00) function - pub fn connections( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - ::std::string::String, - u8, - IbcCoreConnectionV1CounterpartyData, - u64, - ), - > { - self.0 - .method_hash([49, 151, 63, 0], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getClient` (0x7eb78932) function - pub fn get_client( - &self, - client_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([126, 183, 137, 50], client_id) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getCompatibleVersions` (0xc8e4bcb9) function - pub fn get_compatible_versions( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::std::vec::Vec, - > { - self.0 - .method_hash([200, 228, 188, 185], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextChannelSequencePath` (0x8669fd15) function - pub fn next_channel_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([134, 105, 253, 21], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextClientSequencePath` (0x990c3888) function - pub fn next_client_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([153, 12, 56, 136], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextConnectionSequencePath` (0x46807086) function - pub fn next_connection_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([70, 128, 112, 134], ()) - .expect("method not found (this should never happen)") - } - /// Gets the contract's `ConnectionOpenAck` event - pub fn connection_open_ack_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ConnectionOpenAckFilter> - { - self.0.event() - } - /// Gets the contract's `ConnectionOpenConfirm` event - pub fn connection_open_confirm_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ConnectionOpenConfirmFilter> - { - self.0.event() - } - /// Gets the contract's `ConnectionOpenInit` event - pub fn connection_open_init_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ConnectionOpenInitFilter> - { - self.0.event() - } - /// Gets the contract's `ConnectionOpenTry` event - pub fn connection_open_try_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ConnectionOpenTryFilter> - { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, IBCConnectionEvents> - { - self.0 - .event_with_filter(::core::default::Default::default()) - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> - for IBCConnection - { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - /// Custom Error type `ErrClientNotFound` with signature `ErrClientNotFound()` and selector `0xb6c71f7d` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrClientNotFound", abi = "ErrClientNotFound()")] - pub struct ErrClientNotFound; - /// Custom Error type `ErrConnectionAlreadyExists` with signature `ErrConnectionAlreadyExists()` and selector `0xf863275f` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrConnectionAlreadyExists", - abi = "ErrConnectionAlreadyExists()" - )] - pub struct ErrConnectionAlreadyExists; - /// Custom Error type `ErrInvalidConnectionState` with signature `ErrInvalidConnectionState()` and selector `0x8ca98990` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidConnectionState", - abi = "ErrInvalidConnectionState()" - )] - pub struct ErrInvalidConnectionState; - /// Custom Error type `ErrInvalidProof` with signature `ErrInvalidProof()` and selector `0x14209932` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidProof", abi = "ErrInvalidProof()")] - pub struct ErrInvalidProof; - /// Custom Error type `ErrNoCounterpartyVersion` with signature `ErrNoCounterpartyVersion()` and selector `0x33ca2894` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrNoCounterpartyVersion", abi = "ErrNoCounterpartyVersion()")] - pub struct ErrNoCounterpartyVersion; - /// Custom Error type `ErrUnsupportedVersion` with signature `ErrUnsupportedVersion()` and selector `0xbcdf6cca` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrUnsupportedVersion", abi = "ErrUnsupportedVersion()")] - pub struct ErrUnsupportedVersion; - /// Custom Error type `ErrValidateSelfClient` with signature `ErrValidateSelfClient()` and selector `0x58a3849b` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrValidateSelfClient", abi = "ErrValidateSelfClient()")] - pub struct ErrValidateSelfClient; - /// Custom Error type `ErrVersionMustBeUnset` with signature `ErrVersionMustBeUnset()` and selector `0x82c28dca` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrVersionMustBeUnset", abi = "ErrVersionMustBeUnset()")] - pub struct ErrVersionMustBeUnset; - /// Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCConnectionErrors { - ErrClientNotFound(ErrClientNotFound), - ErrConnectionAlreadyExists(ErrConnectionAlreadyExists), - ErrInvalidConnectionState(ErrInvalidConnectionState), - ErrInvalidProof(ErrInvalidProof), - ErrNoCounterpartyVersion(ErrNoCounterpartyVersion), - ErrUnsupportedVersion(ErrUnsupportedVersion), - ErrValidateSelfClient(ErrValidateSelfClient), - ErrVersionMustBeUnset(ErrVersionMustBeUnset), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for IBCConnectionErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) - { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ErrClientNotFound(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrConnectionAlreadyExists(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidConnectionState(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ErrInvalidProof(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrNoCounterpartyVersion(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrUnsupportedVersion(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrValidateSelfClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrVersionMustBeUnset(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IBCConnectionErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::ErrClientNotFound(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrConnectionAlreadyExists(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidConnectionState(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidProof(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrNoCounterpartyVersion(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrUnsupportedVersion(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrValidateSelfClient(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrVersionMustBeUnset(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for IBCConnectionErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector == ::selector() => { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for IBCConnectionErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ErrClientNotFound(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrConnectionAlreadyExists(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidConnectionState(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidProof(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrNoCounterpartyVersion(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrUnsupportedVersion(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrValidateSelfClient(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrVersionMustBeUnset(element) => ::core::fmt::Display::fmt(element, f), - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for IBCConnectionErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for IBCConnectionErrors { - fn from(value: ErrClientNotFound) -> Self { - Self::ErrClientNotFound(value) - } - } - impl ::core::convert::From for IBCConnectionErrors { - fn from(value: ErrConnectionAlreadyExists) -> Self { - Self::ErrConnectionAlreadyExists(value) - } - } - impl ::core::convert::From for IBCConnectionErrors { - fn from(value: ErrInvalidConnectionState) -> Self { - Self::ErrInvalidConnectionState(value) - } - } - impl ::core::convert::From for IBCConnectionErrors { - fn from(value: ErrInvalidProof) -> Self { - Self::ErrInvalidProof(value) - } - } - impl ::core::convert::From for IBCConnectionErrors { - fn from(value: ErrNoCounterpartyVersion) -> Self { - Self::ErrNoCounterpartyVersion(value) - } - } - impl ::core::convert::From for IBCConnectionErrors { - fn from(value: ErrUnsupportedVersion) -> Self { - Self::ErrUnsupportedVersion(value) - } - } - impl ::core::convert::From for IBCConnectionErrors { - fn from(value: ErrValidateSelfClient) -> Self { - Self::ErrValidateSelfClient(value) - } - } - impl ::core::convert::From for IBCConnectionErrors { - fn from(value: ErrVersionMustBeUnset) -> Self { - Self::ErrVersionMustBeUnset(value) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "ConnectionOpenAck", - abi = "ConnectionOpenAck(string,string,string,string)" - )] - pub struct ConnectionOpenAckFilter { - pub connection_id: ::std::string::String, - pub client_id: ::std::string::String, - pub counterparty_client_id: ::std::string::String, - pub counterparty_connection_id: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "ConnectionOpenConfirm", - abi = "ConnectionOpenConfirm(string,string,string,string)" - )] - pub struct ConnectionOpenConfirmFilter { - pub connection_id: ::std::string::String, - pub client_id: ::std::string::String, - pub counterparty_client_id: ::std::string::String, - pub counterparty_connection_id: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "ConnectionOpenInit", - abi = "ConnectionOpenInit(string,string,string)" - )] - pub struct ConnectionOpenInitFilter { - pub connection_id: ::std::string::String, - pub client_id: ::std::string::String, - pub counterparty_client_id: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "ConnectionOpenTry", - abi = "ConnectionOpenTry(string,string,string,string)" - )] - pub struct ConnectionOpenTryFilter { - pub connection_id: ::std::string::String, - pub client_id: ::std::string::String, - pub counterparty_client_id: ::std::string::String, - pub counterparty_connection_id: ::std::string::String, - } - /// Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - pub enum IBCConnectionEvents { - ConnectionOpenAckFilter(ConnectionOpenAckFilter), - ConnectionOpenConfirmFilter(ConnectionOpenConfirmFilter), - ConnectionOpenInitFilter(ConnectionOpenInitFilter), - ConnectionOpenTryFilter(ConnectionOpenTryFilter), - } - impl ::ethers::contract::EthLogDecode for IBCConnectionEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ConnectionOpenAckFilter::decode_log(log) { - return Ok(IBCConnectionEvents::ConnectionOpenAckFilter(decoded)); - } - if let Ok(decoded) = ConnectionOpenConfirmFilter::decode_log(log) { - return Ok(IBCConnectionEvents::ConnectionOpenConfirmFilter(decoded)); - } - if let Ok(decoded) = ConnectionOpenInitFilter::decode_log(log) { - return Ok(IBCConnectionEvents::ConnectionOpenInitFilter(decoded)); - } - if let Ok(decoded) = ConnectionOpenTryFilter::decode_log(log) { - return Ok(IBCConnectionEvents::ConnectionOpenTryFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IBCConnectionEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ConnectionOpenAckFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenConfirmFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenInitFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenTryFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IBCConnectionEvents { - fn from(value: ConnectionOpenAckFilter) -> Self { - Self::ConnectionOpenAckFilter(value) - } - } - impl ::core::convert::From for IBCConnectionEvents { - fn from(value: ConnectionOpenConfirmFilter) -> Self { - Self::ConnectionOpenConfirmFilter(value) - } - } - impl ::core::convert::From for IBCConnectionEvents { - fn from(value: ConnectionOpenInitFilter) -> Self { - Self::ConnectionOpenInitFilter(value) - } - } - impl ::core::convert::From for IBCConnectionEvents { - fn from(value: ConnectionOpenTryFilter) -> Self { - Self::ConnectionOpenTryFilter(value) - } - } - /// Container type for all input parameters for the `COMMITMENT_PREFIX` function with signature `COMMITMENT_PREFIX()` and selector `0xa9550dac` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "COMMITMENT_PREFIX", abi = "COMMITMENT_PREFIX()")] - pub struct CommitmentPrefixCall; - /// Container type for all input parameters for the `capabilities` function with signature `capabilities(string)` and selector `0x5717bcf5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "capabilities", abi = "capabilities(string)")] - pub struct CapabilitiesCall(pub ::std::string::String); - /// Container type for all input parameters for the `channels` function with signature `channels(string,string)` and selector `0x5b3de260` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "channels", abi = "channels(string,string)")] - pub struct ChannelsCall(pub ::std::string::String, pub ::std::string::String); - /// Container type for all input parameters for the `clientImpls` function with signature `clientImpls(string)` and selector `0xd1297b8d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientImpls", abi = "clientImpls(string)")] - pub struct ClientImplsCall(pub ::std::string::String); - /// Container type for all input parameters for the `clientRegistry` function with signature `clientRegistry(string)` and selector `0x990491a5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientRegistry", abi = "clientRegistry(string)")] - pub struct ClientRegistryCall(pub ::std::string::String); - /// Container type for all input parameters for the `clientTypes` function with signature `clientTypes(string)` and selector `0xc2380105` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientTypes", abi = "clientTypes(string)")] - pub struct ClientTypesCall(pub ::std::string::String); - /// Container type for all input parameters for the `commitments` function with signature `commitments(bytes32)` and selector `0x839df945` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "commitments", abi = "commitments(bytes32)")] - pub struct CommitmentsCall(pub [u8; 32]); - /// Container type for all input parameters for the `connectionOpenAck` function with signature `connectionOpenAck((string,bytes,(string,string[]),string,bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address))` and selector `0xe7f32c0f` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "connectionOpenAck", - abi = "connectionOpenAck((string,bytes,(string,string[]),string,bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address))" - )] - pub struct ConnectionOpenAckCall { - pub msg: MsgConnectionOpenAck, - } - /// Container type for all input parameters for the `connectionOpenConfirm` function with signature `connectionOpenConfirm((string,bytes,(uint64,uint64),address))` and selector `0x87c54dd4` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "connectionOpenConfirm", - abi = "connectionOpenConfirm((string,bytes,(uint64,uint64),address))" - )] - pub struct ConnectionOpenConfirmCall { - pub msg: MsgConnectionOpenConfirm, - } - /// Container type for all input parameters for the `connectionOpenInit` function with signature `connectionOpenInit((string,(string,string[]),(string,string,(bytes)),uint64,address))` and selector `0x8775f7f8` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "connectionOpenInit", - abi = "connectionOpenInit((string,(string,string[]),(string,string,(bytes)),uint64,address))" - )] - pub struct ConnectionOpenInitCall { - pub msg: MsgConnectionOpenInit, - } - /// Container type for all input parameters for the `connectionOpenTry` function with signature `connectionOpenTry(((string,string,(bytes)),uint64,string,bytes,(string,string[])[],bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address))` and selector `0x7b666dc1` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "connectionOpenTry", - abi = "connectionOpenTry(((string,string,(bytes)),uint64,string,bytes,(string,string[])[],bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address))" - )] - pub struct ConnectionOpenTryCall { - pub msg: MsgConnectionOpenTry, - } - /// Container type for all input parameters for the `connections` function with signature `connections(string)` and selector `0x31973f00` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "connections", abi = "connections(string)")] - pub struct ConnectionsCall(pub ::std::string::String); - /// Container type for all input parameters for the `getClient` function with signature `getClient(string)` and selector `0x7eb78932` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getClient", abi = "getClient(string)")] - pub struct GetClientCall { - pub client_id: ::std::string::String, - } - /// Container type for all input parameters for the `getCompatibleVersions` function with signature `getCompatibleVersions()` and selector `0xc8e4bcb9` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getCompatibleVersions", abi = "getCompatibleVersions()")] - pub struct GetCompatibleVersionsCall; - /// Container type for all input parameters for the `nextChannelSequencePath` function with signature `nextChannelSequencePath()` and selector `0x8669fd15` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "nextChannelSequencePath", abi = "nextChannelSequencePath()")] - pub struct NextChannelSequencePathCall; - /// Container type for all input parameters for the `nextClientSequencePath` function with signature `nextClientSequencePath()` and selector `0x990c3888` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "nextClientSequencePath", abi = "nextClientSequencePath()")] - pub struct NextClientSequencePathCall; - /// Container type for all input parameters for the `nextConnectionSequencePath` function with signature `nextConnectionSequencePath()` and selector `0x46807086` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "nextConnectionSequencePath", - abi = "nextConnectionSequencePath()" - )] - pub struct NextConnectionSequencePathCall; - /// Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCConnectionCalls { - CommitmentPrefix(CommitmentPrefixCall), - Capabilities(CapabilitiesCall), - Channels(ChannelsCall), - ClientImpls(ClientImplsCall), - ClientRegistry(ClientRegistryCall), - ClientTypes(ClientTypesCall), - Commitments(CommitmentsCall), - ConnectionOpenAck(ConnectionOpenAckCall), - ConnectionOpenConfirm(ConnectionOpenConfirmCall), - ConnectionOpenInit(ConnectionOpenInitCall), - ConnectionOpenTry(ConnectionOpenTryCall), - Connections(ConnectionsCall), - GetClient(GetClientCall), - GetCompatibleVersions(GetCompatibleVersionsCall), - NextChannelSequencePath(NextChannelSequencePathCall), - NextClientSequencePath(NextClientSequencePathCall), - NextConnectionSequencePath(NextConnectionSequencePathCall), - } - impl ::ethers::core::abi::AbiDecode for IBCConnectionCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::CommitmentPrefix(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::Capabilities(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Channels(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ClientImpls(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ClientRegistry(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ClientTypes(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Commitments(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ConnectionOpenAck(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ConnectionOpenConfirm(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ConnectionOpenInit(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ConnectionOpenTry(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Connections(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::GetClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetCompatibleVersions(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextChannelSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextClientSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextConnectionSequencePath(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IBCConnectionCalls { - fn encode(self) -> Vec { - match self { - Self::CommitmentPrefix(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Capabilities(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Channels(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientImpls(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientRegistry(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientTypes(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Commitments(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ConnectionOpenAck(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ConnectionOpenConfirm(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ConnectionOpenInit(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ConnectionOpenTry(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Connections(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetCompatibleVersions(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextChannelSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextClientSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextConnectionSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for IBCConnectionCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::CommitmentPrefix(element) => ::core::fmt::Display::fmt(element, f), - Self::Capabilities(element) => ::core::fmt::Display::fmt(element, f), - Self::Channels(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientImpls(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientRegistry(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientTypes(element) => ::core::fmt::Display::fmt(element, f), - Self::Commitments(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenAck(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenConfirm(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenInit(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenTry(element) => ::core::fmt::Display::fmt(element, f), - Self::Connections(element) => ::core::fmt::Display::fmt(element, f), - Self::GetClient(element) => ::core::fmt::Display::fmt(element, f), - Self::GetCompatibleVersions(element) => ::core::fmt::Display::fmt(element, f), - Self::NextChannelSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::NextClientSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::NextConnectionSequencePath(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: CommitmentPrefixCall) -> Self { - Self::CommitmentPrefix(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: CapabilitiesCall) -> Self { - Self::Capabilities(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: ChannelsCall) -> Self { - Self::Channels(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: ClientImplsCall) -> Self { - Self::ClientImpls(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: ClientRegistryCall) -> Self { - Self::ClientRegistry(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: ClientTypesCall) -> Self { - Self::ClientTypes(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: CommitmentsCall) -> Self { - Self::Commitments(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: ConnectionOpenAckCall) -> Self { - Self::ConnectionOpenAck(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: ConnectionOpenConfirmCall) -> Self { - Self::ConnectionOpenConfirm(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: ConnectionOpenInitCall) -> Self { - Self::ConnectionOpenInit(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: ConnectionOpenTryCall) -> Self { - Self::ConnectionOpenTry(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: ConnectionsCall) -> Self { - Self::Connections(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: GetClientCall) -> Self { - Self::GetClient(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: GetCompatibleVersionsCall) -> Self { - Self::GetCompatibleVersions(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: NextChannelSequencePathCall) -> Self { - Self::NextChannelSequencePath(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: NextClientSequencePathCall) -> Self { - Self::NextClientSequencePath(value) - } - } - impl ::core::convert::From for IBCConnectionCalls { - fn from(value: NextConnectionSequencePathCall) -> Self { - Self::NextConnectionSequencePath(value) - } - } - /// Container type for all return fields from the `COMMITMENT_PREFIX` function with signature `COMMITMENT_PREFIX()` and selector `0xa9550dac` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CommitmentPrefixReturn(pub ::std::string::String); - /// Container type for all return fields from the `capabilities` function with signature `capabilities(string)` and selector `0x5717bcf5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CapabilitiesReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `channels` function with signature `channels(string,string)` and selector `0x5b3de260` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelsReturn { - pub state: u8, - pub ordering: u8, - pub counterparty: IbcCoreChannelV1CounterpartyData, - pub version: ::std::string::String, - } - /// Container type for all return fields from the `clientImpls` function with signature `clientImpls(string)` and selector `0xd1297b8d` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientImplsReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `clientRegistry` function with signature `clientRegistry(string)` and selector `0x990491a5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientRegistryReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `clientTypes` function with signature `clientTypes(string)` and selector `0xc2380105` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientTypesReturn(pub ::std::string::String); - /// Container type for all return fields from the `commitments` function with signature `commitments(bytes32)` and selector `0x839df945` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CommitmentsReturn(pub [u8; 32]); - /// Container type for all return fields from the `connectionOpenInit` function with signature `connectionOpenInit((string,(string,string[]),(string,string,(bytes)),uint64,address))` and selector `0x8775f7f8` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ConnectionOpenInitReturn(pub ::std::string::String); - /// Container type for all return fields from the `connectionOpenTry` function with signature `connectionOpenTry(((string,string,(bytes)),uint64,string,bytes,(string,string[])[],bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address))` and selector `0x7b666dc1` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ConnectionOpenTryReturn(pub ::std::string::String); - /// Container type for all return fields from the `connections` function with signature `connections(string)` and selector `0x31973f00` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ConnectionsReturn { - pub client_id: ::std::string::String, - pub state: u8, - pub counterparty: IbcCoreConnectionV1CounterpartyData, - pub delay_period: u64, - } - /// Container type for all return fields from the `getClient` function with signature `getClient(string)` and selector `0x7eb78932` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetClientReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `getCompatibleVersions` function with signature `getCompatibleVersions()` and selector `0xc8e4bcb9` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetCompatibleVersionsReturn(pub ::std::vec::Vec); - /// Container type for all return fields from the `nextChannelSequencePath` function with signature `nextChannelSequencePath()` and selector `0x8669fd15` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextChannelSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `nextClientSequencePath` function with signature `nextClientSequencePath()` and selector `0x990c3888` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextClientSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `nextConnectionSequencePath` function with signature `nextConnectionSequencePath()` and selector `0x46807086` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextConnectionSequencePathReturn(pub [u8; 32]); -} diff --git a/generated/rust/contracts/src/ibc_handler.rs b/generated/rust/contracts/src/ibc_handler.rs deleted file mode 100644 index 02f09eb891..0000000000 --- a/generated/rust/contracts/src/ibc_handler.rs +++ /dev/null @@ -1,4118 +0,0 @@ -pub use ibc_handler::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod ibc_handler { - pub use super::super::shared_types::*; - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("COMMITMENT_PREFIX"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("COMMITMENT_PREFIX"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("UPGRADE_INTERFACE_VERSION"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("UPGRADE_INTERFACE_VERSION",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("acknowledgePacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("acknowledgePacket"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgPacketAcknowledgement", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("capabilities"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("capabilities"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelCapabilityPath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelCapabilityPath",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("portId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelCloseConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelCloseConfirm",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelCloseConfirm", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelCloseInit"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelCloseInit"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelCloseInit", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelOpenAck"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelOpenAck"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelOpenAck", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelOpenConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelOpenConfirm"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelOpenConfirm", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelOpenInit"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelOpenInit"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ::ethers::core::abi::ethabi::ParamType::String, - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelOpenInit", - ), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelOpenTry"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelOpenTry"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ::ethers::core::abi::ethabi::ParamType::String, - ],), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgChannelOpenTry", - ), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channels"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channels"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("state"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.State", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ordering"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.Order", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterparty"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientImpls"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientImpls"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientRegistry"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientRegistry"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientTypes"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientTypes"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("commitments"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("commitments"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connectionOpenAck"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connectionOpenAck"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ],), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgConnectionOpenAck", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connectionOpenConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connectionOpenConfirm",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgConnectionOpenConfirm", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connectionOpenInit"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connectionOpenInit"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ],), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes - ],), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgConnectionOpenInit", - ), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connectionOpenTry"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connectionOpenTry"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes - ],), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ],), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgConnectionOpenTry", - ), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connections"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connections"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("client_id"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("state"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreConnectionV1GlobalEnums.State", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterparty"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes - ],), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreConnectionV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delay_period"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("createClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("createClient"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct IBCMsgs.MsgCreateClient",), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getChannel"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getChannel"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("portId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ::ethers::core::abi::ethabi::ParamType::String, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Channel.Data", - ), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getClient"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("contract ILightClient"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getConnection"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getConnection"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("connectionId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - ],), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes - ],), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreConnectionV1ConnectionEnd.Data", - ), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("initialize"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("initialize"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_ibcClient"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_ibcConnection"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_ibcChannel"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_ibcPacket"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("admin"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextChannelSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextChannelSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextClientSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextClientSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextConnectionSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextConnectionSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("owner"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("owner"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("paused"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("paused"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("proxiableUUID"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("proxiableUUID"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("recvPacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("recvPacket"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct IBCMsgs.MsgPacketRecv",), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("registerClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("registerClient"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("contract ILightClient"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("renounceOwnership"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("renounceOwnership"), - inputs: ::std::vec![], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("sendPacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("sendPacket"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("timeoutPacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("timeoutPacket"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct IBCMsgs.MsgPacketTimeout",), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("transferOwnership"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferOwnership"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("newOwner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("updateClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("updateClient"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct IBCMsgs.MsgUpdateClient",), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("upgradeImpls"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("upgradeImpls"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_ibcClient"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_ibcConnection"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_ibcChannel"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_ibcPacket"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("upgradeToAndCall"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("upgradeToAndCall"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("newImplementation"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("writeAcknowledgement"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("writeAcknowledgement",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Packet.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Initialized"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Initialized"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("OwnershipTransferred"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("OwnershipTransferred",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("previousOwner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("newOwner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Paused"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Paused"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Unpaused"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Unpaused"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Upgraded"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Upgraded"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("implementation"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - },], - anonymous: false, - },], - ), - ]), - errors: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("AddressEmptyCode"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("AddressEmptyCode"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("target"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC1967InvalidImplementation"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC1967InvalidImplementation",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("implementation"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC1967NonPayable"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC1967NonPayable"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("EnforcedPause"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("EnforcedPause"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrClientNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrClientNotFound"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ExpectedPause"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ExpectedPause"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("FailedInnerCall"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("FailedInnerCall"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("InvalidInitialization"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("InvalidInitialization",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("NotInitializing"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("NotInitializing"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("OwnableInvalidOwner"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("OwnableInvalidOwner",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("OwnableUnauthorizedAccount"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("OwnableUnauthorizedAccount",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("UUPSUnauthorizedCallContext"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("UUPSUnauthorizedCallContext",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("UUPSUnsupportedProxiableUUID"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("UUPSUnsupportedProxiableUUID",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("slot"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - },], - ), - ]), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static IBCHANDLER_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[cfg(feature = "providers")] - pub struct IBCHandler(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for IBCHandler { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for IBCHandler { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for IBCHandler { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for IBCHandler { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IBCHandler)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl IBCHandler { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - IBCHANDLER_ABI.clone(), - client, - )) - } - /// Calls the contract's `COMMITMENT_PREFIX` (0xa9550dac) function - pub fn commitment_prefix( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 85, 13, 172], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `UPGRADE_INTERFACE_VERSION` (0xad3cb1cc) function - pub fn upgrade_interface_version( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([173, 60, 177, 204], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `acknowledgePacket` (0x07037704) function - pub fn acknowledge_packet( - &self, - p0: MsgPacketAcknowledgement, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([7, 3, 119, 4], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `capabilities` (0x5717bcf5) function - pub fn capabilities( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([87, 23, 188, 245], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelCapabilityPath` (0x3bc3339f) function - pub fn channel_capability_path( - &self, - port_id: ::std::string::String, - channel_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([59, 195, 51, 159], (port_id, channel_id)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelCloseConfirm` (0x6e92edaf) function - pub fn channel_close_confirm( - &self, - p0: MsgChannelCloseConfirm, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([110, 146, 237, 175], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelCloseInit` (0x96549d92) function - pub fn channel_close_init( - &self, - p0: MsgChannelCloseInit, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([150, 84, 157, 146], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelOpenAck` (0xdeff27b9) function - pub fn channel_open_ack( - &self, - p0: MsgChannelOpenAck, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([222, 255, 39, 185], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelOpenConfirm` (0xf52deded) function - pub fn channel_open_confirm( - &self, - p0: MsgChannelOpenConfirm, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([245, 45, 237, 237], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelOpenInit` (0x25035747) function - pub fn channel_open_init( - &self, - p0: MsgChannelOpenInit, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([37, 3, 87, 71], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelOpenTry` (0x8b627bca) function - pub fn channel_open_try( - &self, - p0: MsgChannelOpenTry, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([139, 98, 123, 202], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channels` (0x5b3de260) function - pub fn channels( - &self, - p0: ::std::string::String, - p1: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - u8, - u8, - IbcCoreChannelV1CounterpartyData, - ::std::string::String, - ), - > { - self.0 - .method_hash([91, 61, 226, 96], (p0, p1)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientImpls` (0xd1297b8d) function - pub fn client_impls( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([209, 41, 123, 141], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientRegistry` (0x990491a5) function - pub fn client_registry( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([153, 4, 145, 165], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientTypes` (0xc2380105) function - pub fn client_types( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([194, 56, 1, 5], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `commitments` (0x839df945) function - pub fn commitments( - &self, - p0: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([131, 157, 249, 69], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connectionOpenAck` (0xe7f32c0f) function - pub fn connection_open_ack( - &self, - p0: MsgConnectionOpenAck, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([231, 243, 44, 15], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connectionOpenConfirm` (0x87c54dd4) function - pub fn connection_open_confirm( - &self, - p0: MsgConnectionOpenConfirm, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([135, 197, 77, 212], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connectionOpenInit` (0x8775f7f8) function - pub fn connection_open_init( - &self, - p0: MsgConnectionOpenInit, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([135, 117, 247, 248], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connectionOpenTry` (0x7b666dc1) function - pub fn connection_open_try( - &self, - p0: MsgConnectionOpenTry, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([123, 102, 109, 193], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connections` (0x31973f00) function - pub fn connections( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - ::std::string::String, - u8, - IbcCoreConnectionV1CounterpartyData, - u64, - ), - > { - self.0 - .method_hash([49, 151, 63, 0], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `createClient` (0xfed12cbf) function - pub fn create_client( - &self, - p0: MsgCreateClient, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([254, 209, 44, 191], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getChannel` (0x3000217a) function - pub fn get_channel( - &self, - port_id: ::std::string::String, - channel_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([48, 0, 33, 122], (port_id, channel_id)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getClient` (0x7eb78932) function - pub fn get_client( - &self, - client_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([126, 183, 137, 50], client_id) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getConnection` (0x27711a69) function - pub fn get_connection( - &self, - connection_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall - { - self.0 - .method_hash([39, 113, 26, 105], connection_id) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `initialize` (0x1459457a) function - pub fn initialize( - &self, - ibc_client: ::ethers::core::types::Address, - ibc_connection: ::ethers::core::types::Address, - ibc_channel: ::ethers::core::types::Address, - ibc_packet: ::ethers::core::types::Address, - admin: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [20, 89, 69, 122], - (ibc_client, ibc_connection, ibc_channel, ibc_packet, admin), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextChannelSequencePath` (0x8669fd15) function - pub fn next_channel_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([134, 105, 253, 21], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextClientSequencePath` (0x990c3888) function - pub fn next_client_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([153, 12, 56, 136], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextConnectionSequencePath` (0x46807086) function - pub fn next_connection_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([70, 128, 112, 134], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `owner` (0x8da5cb5b) function - pub fn owner( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([141, 165, 203, 91], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `paused` (0x5c975abb) function - pub fn paused(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([92, 151, 90, 187], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `proxiableUUID` (0x52d1902d) function - pub fn proxiable_uuid(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 209, 144, 45], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `recvPacket` (0xe8f088c6) function - pub fn recv_packet( - &self, - p0: MsgPacketRecv, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([232, 240, 136, 198], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `registerClient` (0x18c19870) function - pub fn register_client( - &self, - p0: ::std::string::String, - p1: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 193, 152, 112], (p0, p1)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `renounceOwnership` (0x715018a6) function - pub fn renounce_ownership(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([113, 80, 24, 166], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `sendPacket` (0x6cf02d3f) function - pub fn send_packet( - &self, - p0: ::std::string::String, - p1: IbcCoreClientV1HeightData, - p2: u64, - p3: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([108, 240, 45, 63], (p0, p1, p2, p3)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `timeoutPacket` (0xa04f91b2) function - pub fn timeout_packet( - &self, - p0: MsgPacketTimeout, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([160, 79, 145, 178], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `transferOwnership` (0xf2fde38b) function - pub fn transfer_ownership( - &self, - new_owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([242, 253, 227, 139], new_owner) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `updateClient` (0xf5dd3745) function - pub fn update_client( - &self, - p0: MsgUpdateClient, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([245, 221, 55, 69], (p0,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `upgradeImpls` (0xa9365006) function - pub fn upgrade_impls( - &self, - ibc_client: ::ethers::core::types::Address, - ibc_connection: ::ethers::core::types::Address, - ibc_channel: ::ethers::core::types::Address, - ibc_packet: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [169, 54, 80, 6], - (ibc_client, ibc_connection, ibc_channel, ibc_packet), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `upgradeToAndCall` (0x4f1ef286) function - pub fn upgrade_to_and_call( - &self, - new_implementation: ::ethers::core::types::Address, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([79, 30, 242, 134], (new_implementation, data)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `writeAcknowledgement` (0xca956667) function - pub fn write_acknowledgement( - &self, - p0: IbcCoreChannelV1PacketData, - p1: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([202, 149, 102, 103], (p0, p1)) - .expect("method not found (this should never happen)") - } - /// Gets the contract's `Initialized` event - pub fn initialized_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, InitializedFilter> - { - self.0.event() - } - /// Gets the contract's `OwnershipTransferred` event - pub fn ownership_transferred_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, OwnershipTransferredFilter> - { - self.0.event() - } - /// Gets the contract's `Paused` event - pub fn paused_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PausedFilter> { - self.0.event() - } - /// Gets the contract's `Unpaused` event - pub fn unpaused_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, UnpausedFilter> { - self.0.event() - } - /// Gets the contract's `Upgraded` event - pub fn upgraded_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, UpgradedFilter> { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, IBCHandlerEvents> { - self.0 - .event_with_filter(::core::default::Default::default()) - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> for IBCHandler { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - /// Custom Error type `AddressEmptyCode` with signature `AddressEmptyCode(address)` and selector `0x9996b315` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "AddressEmptyCode", abi = "AddressEmptyCode(address)")] - pub struct AddressEmptyCode { - pub target: ::ethers::core::types::Address, - } - /// Custom Error type `ERC1967InvalidImplementation` with signature `ERC1967InvalidImplementation(address)` and selector `0x4c9c8ce3` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ERC1967InvalidImplementation", - abi = "ERC1967InvalidImplementation(address)" - )] - pub struct ERC1967InvalidImplementation { - pub implementation: ::ethers::core::types::Address, - } - /// Custom Error type `ERC1967NonPayable` with signature `ERC1967NonPayable()` and selector `0xb398979f` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ERC1967NonPayable", abi = "ERC1967NonPayable()")] - pub struct ERC1967NonPayable; - /// Custom Error type `EnforcedPause` with signature `EnforcedPause()` and selector `0xd93c0665` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "EnforcedPause", abi = "EnforcedPause()")] - pub struct EnforcedPause; - /// Custom Error type `ErrClientNotFound` with signature `ErrClientNotFound()` and selector `0xb6c71f7d` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrClientNotFound", abi = "ErrClientNotFound()")] - pub struct ErrClientNotFound; - /// Custom Error type `ExpectedPause` with signature `ExpectedPause()` and selector `0x8dfc202b` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ExpectedPause", abi = "ExpectedPause()")] - pub struct ExpectedPause; - /// Custom Error type `FailedInnerCall` with signature `FailedInnerCall()` and selector `0x1425ea42` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "FailedInnerCall", abi = "FailedInnerCall()")] - pub struct FailedInnerCall; - /// Custom Error type `InvalidInitialization` with signature `InvalidInitialization()` and selector `0xf92ee8a9` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "InvalidInitialization", abi = "InvalidInitialization()")] - pub struct InvalidInitialization; - /// Custom Error type `NotInitializing` with signature `NotInitializing()` and selector `0xd7e6bcf8` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "NotInitializing", abi = "NotInitializing()")] - pub struct NotInitializing; - /// Custom Error type `OwnableInvalidOwner` with signature `OwnableInvalidOwner(address)` and selector `0x1e4fbdf7` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "OwnableInvalidOwner", abi = "OwnableInvalidOwner(address)")] - pub struct OwnableInvalidOwner { - pub owner: ::ethers::core::types::Address, - } - /// Custom Error type `OwnableUnauthorizedAccount` with signature `OwnableUnauthorizedAccount(address)` and selector `0x118cdaa7` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "OwnableUnauthorizedAccount", - abi = "OwnableUnauthorizedAccount(address)" - )] - pub struct OwnableUnauthorizedAccount { - pub account: ::ethers::core::types::Address, - } - /// Custom Error type `UUPSUnauthorizedCallContext` with signature `UUPSUnauthorizedCallContext()` and selector `0xe07c8dba` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "UUPSUnauthorizedCallContext", - abi = "UUPSUnauthorizedCallContext()" - )] - pub struct UUPSUnauthorizedCallContext; - /// Custom Error type `UUPSUnsupportedProxiableUUID` with signature `UUPSUnsupportedProxiableUUID(bytes32)` and selector `0xaa1d49a4` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "UUPSUnsupportedProxiableUUID", - abi = "UUPSUnsupportedProxiableUUID(bytes32)" - )] - pub struct UUPSUnsupportedProxiableUUID { - pub slot: [u8; 32], - } - /// Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCHandlerErrors { - AddressEmptyCode(AddressEmptyCode), - ERC1967InvalidImplementation(ERC1967InvalidImplementation), - ERC1967NonPayable(ERC1967NonPayable), - EnforcedPause(EnforcedPause), - ErrClientNotFound(ErrClientNotFound), - ExpectedPause(ExpectedPause), - FailedInnerCall(FailedInnerCall), - InvalidInitialization(InvalidInitialization), - NotInitializing(NotInitializing), - OwnableInvalidOwner(OwnableInvalidOwner), - OwnableUnauthorizedAccount(OwnableUnauthorizedAccount), - UUPSUnauthorizedCallContext(UUPSUnauthorizedCallContext), - UUPSUnsupportedProxiableUUID(UUPSUnsupportedProxiableUUID), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for IBCHandlerErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) - { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::AddressEmptyCode(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ERC1967InvalidImplementation(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ERC1967NonPayable(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::EnforcedPause(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ErrClientNotFound(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ExpectedPause(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::FailedInnerCall(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::InvalidInitialization(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::NotInitializing(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OwnableInvalidOwner(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OwnableUnauthorizedAccount(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UUPSUnauthorizedCallContext(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UUPSUnsupportedProxiableUUID(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IBCHandlerErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::AddressEmptyCode(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ERC1967InvalidImplementation(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ERC1967NonPayable(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::EnforcedPause(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrClientNotFound(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ExpectedPause(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::FailedInnerCall(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::InvalidInitialization(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NotInitializing(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OwnableInvalidOwner(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OwnableUnauthorizedAccount(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UUPSUnauthorizedCallContext(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UUPSUnsupportedProxiableUUID(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for IBCHandlerErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector == ::selector() => { - true - } - _ if selector - == ::selector( - ) => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector == ::selector() => { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector == ::selector() => { - true - } - _ if selector == ::selector() => { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector == ::selector() => { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector() => - { - true - } - _ if selector - == ::selector( - ) => - { - true - } - _ if selector - == ::selector( - ) => - { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for IBCHandlerErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::AddressEmptyCode(element) => ::core::fmt::Display::fmt(element, f), - Self::ERC1967InvalidImplementation(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ERC1967NonPayable(element) => ::core::fmt::Display::fmt(element, f), - Self::EnforcedPause(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrClientNotFound(element) => ::core::fmt::Display::fmt(element, f), - Self::ExpectedPause(element) => ::core::fmt::Display::fmt(element, f), - Self::FailedInnerCall(element) => ::core::fmt::Display::fmt(element, f), - Self::InvalidInitialization(element) => ::core::fmt::Display::fmt(element, f), - Self::NotInitializing(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnableInvalidOwner(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnableUnauthorizedAccount(element) => ::core::fmt::Display::fmt(element, f), - Self::UUPSUnauthorizedCallContext(element) => ::core::fmt::Display::fmt(element, f), - Self::UUPSUnsupportedProxiableUUID(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for IBCHandlerErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: AddressEmptyCode) -> Self { - Self::AddressEmptyCode(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: ERC1967InvalidImplementation) -> Self { - Self::ERC1967InvalidImplementation(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: ERC1967NonPayable) -> Self { - Self::ERC1967NonPayable(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: EnforcedPause) -> Self { - Self::EnforcedPause(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: ErrClientNotFound) -> Self { - Self::ErrClientNotFound(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: ExpectedPause) -> Self { - Self::ExpectedPause(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: FailedInnerCall) -> Self { - Self::FailedInnerCall(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: InvalidInitialization) -> Self { - Self::InvalidInitialization(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: NotInitializing) -> Self { - Self::NotInitializing(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: OwnableInvalidOwner) -> Self { - Self::OwnableInvalidOwner(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: OwnableUnauthorizedAccount) -> Self { - Self::OwnableUnauthorizedAccount(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: UUPSUnauthorizedCallContext) -> Self { - Self::UUPSUnauthorizedCallContext(value) - } - } - impl ::core::convert::From for IBCHandlerErrors { - fn from(value: UUPSUnsupportedProxiableUUID) -> Self { - Self::UUPSUnsupportedProxiableUUID(value) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Initialized", abi = "Initialized(uint64)")] - pub struct InitializedFilter { - pub version: u64, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "OwnershipTransferred", - abi = "OwnershipTransferred(address,address)" - )] - pub struct OwnershipTransferredFilter { - #[ethevent(indexed)] - pub previous_owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub new_owner: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Paused", abi = "Paused(address)")] - pub struct PausedFilter { - pub account: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Unpaused", abi = "Unpaused(address)")] - pub struct UnpausedFilter { - pub account: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Upgraded", abi = "Upgraded(address)")] - pub struct UpgradedFilter { - #[ethevent(indexed)] - pub implementation: ::ethers::core::types::Address, - } - /// Container type for all of the contract's events - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCHandlerEvents { - InitializedFilter(InitializedFilter), - OwnershipTransferredFilter(OwnershipTransferredFilter), - PausedFilter(PausedFilter), - UnpausedFilter(UnpausedFilter), - UpgradedFilter(UpgradedFilter), - } - impl ::ethers::contract::EthLogDecode for IBCHandlerEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = InitializedFilter::decode_log(log) { - return Ok(IBCHandlerEvents::InitializedFilter(decoded)); - } - if let Ok(decoded) = OwnershipTransferredFilter::decode_log(log) { - return Ok(IBCHandlerEvents::OwnershipTransferredFilter(decoded)); - } - if let Ok(decoded) = PausedFilter::decode_log(log) { - return Ok(IBCHandlerEvents::PausedFilter(decoded)); - } - if let Ok(decoded) = UnpausedFilter::decode_log(log) { - return Ok(IBCHandlerEvents::UnpausedFilter(decoded)); - } - if let Ok(decoded) = UpgradedFilter::decode_log(log) { - return Ok(IBCHandlerEvents::UpgradedFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IBCHandlerEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::InitializedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnershipTransferredFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::PausedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::UnpausedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::UpgradedFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IBCHandlerEvents { - fn from(value: InitializedFilter) -> Self { - Self::InitializedFilter(value) - } - } - impl ::core::convert::From for IBCHandlerEvents { - fn from(value: OwnershipTransferredFilter) -> Self { - Self::OwnershipTransferredFilter(value) - } - } - impl ::core::convert::From for IBCHandlerEvents { - fn from(value: PausedFilter) -> Self { - Self::PausedFilter(value) - } - } - impl ::core::convert::From for IBCHandlerEvents { - fn from(value: UnpausedFilter) -> Self { - Self::UnpausedFilter(value) - } - } - impl ::core::convert::From for IBCHandlerEvents { - fn from(value: UpgradedFilter) -> Self { - Self::UpgradedFilter(value) - } - } - /// Container type for all input parameters for the `COMMITMENT_PREFIX` function with signature `COMMITMENT_PREFIX()` and selector `0xa9550dac` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "COMMITMENT_PREFIX", abi = "COMMITMENT_PREFIX()")] - pub struct CommitmentPrefixCall; - /// Container type for all input parameters for the `UPGRADE_INTERFACE_VERSION` function with signature `UPGRADE_INTERFACE_VERSION()` and selector `0xad3cb1cc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "UPGRADE_INTERFACE_VERSION", - abi = "UPGRADE_INTERFACE_VERSION()" - )] - pub struct UpgradeInterfaceVersionCall; - /// Container type for all input parameters for the `acknowledgePacket` function with signature `acknowledgePacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,bytes,(uint64,uint64),address))` and selector `0x07037704` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "acknowledgePacket", - abi = "acknowledgePacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,bytes,(uint64,uint64),address))" - )] - pub struct AcknowledgePacketCall(pub MsgPacketAcknowledgement); - /// Container type for all input parameters for the `capabilities` function with signature `capabilities(string)` and selector `0x5717bcf5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "capabilities", abi = "capabilities(string)")] - pub struct CapabilitiesCall(pub ::std::string::String); - /// Container type for all input parameters for the `channelCapabilityPath` function with signature `channelCapabilityPath(string,string)` and selector `0x3bc3339f` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelCapabilityPath", - abi = "channelCapabilityPath(string,string)" - )] - pub struct ChannelCapabilityPathCall { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - } - /// Container type for all input parameters for the `channelCloseConfirm` function with signature `channelCloseConfirm((string,string,bytes,(uint64,uint64),address))` and selector `0x6e92edaf` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelCloseConfirm", - abi = "channelCloseConfirm((string,string,bytes,(uint64,uint64),address))" - )] - pub struct ChannelCloseConfirmCall(pub MsgChannelCloseConfirm); - /// Container type for all input parameters for the `channelCloseInit` function with signature `channelCloseInit((string,string,address))` and selector `0x96549d92` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelCloseInit", - abi = "channelCloseInit((string,string,address))" - )] - pub struct ChannelCloseInitCall(pub MsgChannelCloseInit); - /// Container type for all input parameters for the `channelOpenAck` function with signature `channelOpenAck((string,string,string,string,bytes,(uint64,uint64),address))` and selector `0xdeff27b9` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelOpenAck", - abi = "channelOpenAck((string,string,string,string,bytes,(uint64,uint64),address))" - )] - pub struct ChannelOpenAckCall(pub MsgChannelOpenAck); - /// Container type for all input parameters for the `channelOpenConfirm` function with signature `channelOpenConfirm((string,string,bytes,(uint64,uint64),address))` and selector `0xf52deded` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelOpenConfirm", - abi = "channelOpenConfirm((string,string,bytes,(uint64,uint64),address))" - )] - pub struct ChannelOpenConfirmCall(pub MsgChannelOpenConfirm); - /// Container type for all input parameters for the `channelOpenInit` function with signature `channelOpenInit((string,(uint8,uint8,(string,string),string[],string),address))` and selector `0x25035747` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelOpenInit", - abi = "channelOpenInit((string,(uint8,uint8,(string,string),string[],string),address))" - )] - pub struct ChannelOpenInitCall(pub MsgChannelOpenInit); - /// Container type for all input parameters for the `channelOpenTry` function with signature `channelOpenTry((string,(uint8,uint8,(string,string),string[],string),string,bytes,(uint64,uint64),address))` and selector `0x8b627bca` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelOpenTry", - abi = "channelOpenTry((string,(uint8,uint8,(string,string),string[],string),string,bytes,(uint64,uint64),address))" - )] - pub struct ChannelOpenTryCall(pub MsgChannelOpenTry); - /// Container type for all input parameters for the `channels` function with signature `channels(string,string)` and selector `0x5b3de260` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "channels", abi = "channels(string,string)")] - pub struct ChannelsCall(pub ::std::string::String, pub ::std::string::String); - /// Container type for all input parameters for the `clientImpls` function with signature `clientImpls(string)` and selector `0xd1297b8d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientImpls", abi = "clientImpls(string)")] - pub struct ClientImplsCall(pub ::std::string::String); - /// Container type for all input parameters for the `clientRegistry` function with signature `clientRegistry(string)` and selector `0x990491a5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientRegistry", abi = "clientRegistry(string)")] - pub struct ClientRegistryCall(pub ::std::string::String); - /// Container type for all input parameters for the `clientTypes` function with signature `clientTypes(string)` and selector `0xc2380105` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientTypes", abi = "clientTypes(string)")] - pub struct ClientTypesCall(pub ::std::string::String); - /// Container type for all input parameters for the `commitments` function with signature `commitments(bytes32)` and selector `0x839df945` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "commitments", abi = "commitments(bytes32)")] - pub struct CommitmentsCall(pub [u8; 32]); - /// Container type for all input parameters for the `connectionOpenAck` function with signature `connectionOpenAck((string,bytes,(string,string[]),string,bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address))` and selector `0xe7f32c0f` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "connectionOpenAck", - abi = "connectionOpenAck((string,bytes,(string,string[]),string,bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address))" - )] - pub struct ConnectionOpenAckCall(pub MsgConnectionOpenAck); - /// Container type for all input parameters for the `connectionOpenConfirm` function with signature `connectionOpenConfirm((string,bytes,(uint64,uint64),address))` and selector `0x87c54dd4` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "connectionOpenConfirm", - abi = "connectionOpenConfirm((string,bytes,(uint64,uint64),address))" - )] - pub struct ConnectionOpenConfirmCall(pub MsgConnectionOpenConfirm); - /// Container type for all input parameters for the `connectionOpenInit` function with signature `connectionOpenInit((string,(string,string[]),(string,string,(bytes)),uint64,address))` and selector `0x8775f7f8` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "connectionOpenInit", - abi = "connectionOpenInit((string,(string,string[]),(string,string,(bytes)),uint64,address))" - )] - pub struct ConnectionOpenInitCall(pub MsgConnectionOpenInit); - /// Container type for all input parameters for the `connectionOpenTry` function with signature `connectionOpenTry(((string,string,(bytes)),uint64,string,bytes,(string,string[])[],bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address))` and selector `0x7b666dc1` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "connectionOpenTry", - abi = "connectionOpenTry(((string,string,(bytes)),uint64,string,bytes,(string,string[])[],bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address))" - )] - pub struct ConnectionOpenTryCall(pub MsgConnectionOpenTry); - /// Container type for all input parameters for the `connections` function with signature `connections(string)` and selector `0x31973f00` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "connections", abi = "connections(string)")] - pub struct ConnectionsCall(pub ::std::string::String); - /// Container type for all input parameters for the `createClient` function with signature `createClient((string,bytes,bytes,address))` and selector `0xfed12cbf` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "createClient", - abi = "createClient((string,bytes,bytes,address))" - )] - pub struct CreateClientCall(pub MsgCreateClient); - /// Container type for all input parameters for the `getChannel` function with signature `getChannel(string,string)` and selector `0x3000217a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getChannel", abi = "getChannel(string,string)")] - pub struct GetChannelCall { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - } - /// Container type for all input parameters for the `getClient` function with signature `getClient(string)` and selector `0x7eb78932` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getClient", abi = "getClient(string)")] - pub struct GetClientCall { - pub client_id: ::std::string::String, - } - /// Container type for all input parameters for the `getConnection` function with signature `getConnection(string)` and selector `0x27711a69` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getConnection", abi = "getConnection(string)")] - pub struct GetConnectionCall { - pub connection_id: ::std::string::String, - } - /// Container type for all input parameters for the `initialize` function with signature `initialize(address,address,address,address,address)` and selector `0x1459457a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "initialize", - abi = "initialize(address,address,address,address,address)" - )] - pub struct InitializeCall { - pub ibc_client: ::ethers::core::types::Address, - pub ibc_connection: ::ethers::core::types::Address, - pub ibc_channel: ::ethers::core::types::Address, - pub ibc_packet: ::ethers::core::types::Address, - pub admin: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `nextChannelSequencePath` function with signature `nextChannelSequencePath()` and selector `0x8669fd15` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "nextChannelSequencePath", abi = "nextChannelSequencePath()")] - pub struct NextChannelSequencePathCall; - /// Container type for all input parameters for the `nextClientSequencePath` function with signature `nextClientSequencePath()` and selector `0x990c3888` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "nextClientSequencePath", abi = "nextClientSequencePath()")] - pub struct NextClientSequencePathCall; - /// Container type for all input parameters for the `nextConnectionSequencePath` function with signature `nextConnectionSequencePath()` and selector `0x46807086` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "nextConnectionSequencePath", - abi = "nextConnectionSequencePath()" - )] - pub struct NextConnectionSequencePathCall; - /// Container type for all input parameters for the `owner` function with signature `owner()` and selector `0x8da5cb5b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "owner", abi = "owner()")] - pub struct OwnerCall; - /// Container type for all input parameters for the `paused` function with signature `paused()` and selector `0x5c975abb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "paused", abi = "paused()")] - pub struct PausedCall; - /// Container type for all input parameters for the `proxiableUUID` function with signature `proxiableUUID()` and selector `0x52d1902d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "proxiableUUID", abi = "proxiableUUID()")] - pub struct ProxiableUUIDCall; - /// Container type for all input parameters for the `recvPacket` function with signature `recvPacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,(uint64,uint64),address))` and selector `0xe8f088c6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "recvPacket", - abi = "recvPacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,(uint64,uint64),address))" - )] - pub struct RecvPacketCall(pub MsgPacketRecv); - /// Container type for all input parameters for the `registerClient` function with signature `registerClient(string,address)` and selector `0x18c19870` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "registerClient", abi = "registerClient(string,address)")] - pub struct RegisterClientCall( - pub ::std::string::String, - pub ::ethers::core::types::Address, - ); - /// Container type for all input parameters for the `renounceOwnership` function with signature `renounceOwnership()` and selector `0x715018a6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "renounceOwnership", abi = "renounceOwnership()")] - pub struct RenounceOwnershipCall; - /// Container type for all input parameters for the `sendPacket` function with signature `sendPacket(string,(uint64,uint64),uint64,bytes)` and selector `0x6cf02d3f` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "sendPacket", - abi = "sendPacket(string,(uint64,uint64),uint64,bytes)" - )] - pub struct SendPacketCall( - pub ::std::string::String, - pub IbcCoreClientV1HeightData, - pub u64, - pub ::ethers::core::types::Bytes, - ); - /// Container type for all input parameters for the `timeoutPacket` function with signature `timeoutPacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,(uint64,uint64),uint64,address))` and selector `0xa04f91b2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "timeoutPacket", - abi = "timeoutPacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,(uint64,uint64),uint64,address))" - )] - pub struct TimeoutPacketCall(pub MsgPacketTimeout); - /// Container type for all input parameters for the `transferOwnership` function with signature `transferOwnership(address)` and selector `0xf2fde38b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "transferOwnership", abi = "transferOwnership(address)")] - pub struct TransferOwnershipCall { - pub new_owner: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `updateClient` function with signature `updateClient((string,bytes,address))` and selector `0xf5dd3745` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "updateClient", abi = "updateClient((string,bytes,address))")] - pub struct UpdateClientCall(pub MsgUpdateClient); - /// Container type for all input parameters for the `upgradeImpls` function with signature `upgradeImpls(address,address,address,address)` and selector `0xa9365006` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "upgradeImpls", - abi = "upgradeImpls(address,address,address,address)" - )] - pub struct UpgradeImplsCall { - pub ibc_client: ::ethers::core::types::Address, - pub ibc_connection: ::ethers::core::types::Address, - pub ibc_channel: ::ethers::core::types::Address, - pub ibc_packet: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `upgradeToAndCall` function with signature `upgradeToAndCall(address,bytes)` and selector `0x4f1ef286` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "upgradeToAndCall", abi = "upgradeToAndCall(address,bytes)")] - pub struct UpgradeToAndCallCall { - pub new_implementation: ::ethers::core::types::Address, - pub data: ::ethers::core::types::Bytes, - } - /// Container type for all input parameters for the `writeAcknowledgement` function with signature `writeAcknowledgement((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes)` and selector `0xca956667` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "writeAcknowledgement", - abi = "writeAcknowledgement((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes)" - )] - pub struct WriteAcknowledgementCall( - pub IbcCoreChannelV1PacketData, - pub ::ethers::core::types::Bytes, - ); - /// Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCHandlerCalls { - CommitmentPrefix(CommitmentPrefixCall), - UpgradeInterfaceVersion(UpgradeInterfaceVersionCall), - AcknowledgePacket(AcknowledgePacketCall), - Capabilities(CapabilitiesCall), - ChannelCapabilityPath(ChannelCapabilityPathCall), - ChannelCloseConfirm(ChannelCloseConfirmCall), - ChannelCloseInit(ChannelCloseInitCall), - ChannelOpenAck(ChannelOpenAckCall), - ChannelOpenConfirm(ChannelOpenConfirmCall), - ChannelOpenInit(ChannelOpenInitCall), - ChannelOpenTry(ChannelOpenTryCall), - Channels(ChannelsCall), - ClientImpls(ClientImplsCall), - ClientRegistry(ClientRegistryCall), - ClientTypes(ClientTypesCall), - Commitments(CommitmentsCall), - ConnectionOpenAck(ConnectionOpenAckCall), - ConnectionOpenConfirm(ConnectionOpenConfirmCall), - ConnectionOpenInit(ConnectionOpenInitCall), - ConnectionOpenTry(ConnectionOpenTryCall), - Connections(ConnectionsCall), - CreateClient(CreateClientCall), - GetChannel(GetChannelCall), - GetClient(GetClientCall), - GetConnection(GetConnectionCall), - Initialize(InitializeCall), - NextChannelSequencePath(NextChannelSequencePathCall), - NextClientSequencePath(NextClientSequencePathCall), - NextConnectionSequencePath(NextConnectionSequencePathCall), - Owner(OwnerCall), - Paused(PausedCall), - ProxiableUUID(ProxiableUUIDCall), - RecvPacket(RecvPacketCall), - RegisterClient(RegisterClientCall), - RenounceOwnership(RenounceOwnershipCall), - SendPacket(SendPacketCall), - TimeoutPacket(TimeoutPacketCall), - TransferOwnership(TransferOwnershipCall), - UpdateClient(UpdateClientCall), - UpgradeImpls(UpgradeImplsCall), - UpgradeToAndCall(UpgradeToAndCallCall), - WriteAcknowledgement(WriteAcknowledgementCall), - } - impl ::ethers::core::abi::AbiDecode for IBCHandlerCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::CommitmentPrefix(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UpgradeInterfaceVersion(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::AcknowledgePacket(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::Capabilities(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelCapabilityPath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelCloseConfirm(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelCloseInit(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelOpenAck(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelOpenConfirm(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelOpenInit(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelOpenTry(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Channels(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ClientImpls(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ClientRegistry(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ClientTypes(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Commitments(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ConnectionOpenAck(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ConnectionOpenConfirm(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ConnectionOpenInit(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ConnectionOpenTry(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Connections(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::CreateClient(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::GetChannel(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::GetClient(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::GetConnection(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Initialize(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextChannelSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextClientSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextConnectionSequencePath(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Owner(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Paused(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ProxiableUUID(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::RecvPacket(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::RegisterClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::RenounceOwnership(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::SendPacket(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::TimeoutPacket(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::TransferOwnership(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::UpdateClient(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::UpgradeImpls(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UpgradeToAndCall(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::WriteAcknowledgement(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IBCHandlerCalls { - fn encode(self) -> Vec { - match self { - Self::CommitmentPrefix(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::UpgradeInterfaceVersion(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::AcknowledgePacket(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Capabilities(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChannelCapabilityPath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ChannelCloseConfirm(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ChannelCloseInit(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChannelOpenAck(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChannelOpenConfirm(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ChannelOpenInit(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChannelOpenTry(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Channels(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientImpls(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientRegistry(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientTypes(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Commitments(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ConnectionOpenAck(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ConnectionOpenConfirm(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ConnectionOpenInit(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ConnectionOpenTry(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Connections(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::CreateClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetChannel(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetConnection(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Initialize(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::NextChannelSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextClientSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextConnectionSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Owner(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Paused(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ProxiableUUID(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::RecvPacket(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::RegisterClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::RenounceOwnership(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SendPacket(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TimeoutPacket(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TransferOwnership(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::UpdateClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::UpgradeImpls(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::UpgradeToAndCall(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::WriteAcknowledgement(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for IBCHandlerCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::CommitmentPrefix(element) => ::core::fmt::Display::fmt(element, f), - Self::UpgradeInterfaceVersion(element) => ::core::fmt::Display::fmt(element, f), - Self::AcknowledgePacket(element) => ::core::fmt::Display::fmt(element, f), - Self::Capabilities(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelCapabilityPath(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelCloseConfirm(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelCloseInit(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenAck(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenConfirm(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenInit(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelOpenTry(element) => ::core::fmt::Display::fmt(element, f), - Self::Channels(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientImpls(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientRegistry(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientTypes(element) => ::core::fmt::Display::fmt(element, f), - Self::Commitments(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenAck(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenConfirm(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenInit(element) => ::core::fmt::Display::fmt(element, f), - Self::ConnectionOpenTry(element) => ::core::fmt::Display::fmt(element, f), - Self::Connections(element) => ::core::fmt::Display::fmt(element, f), - Self::CreateClient(element) => ::core::fmt::Display::fmt(element, f), - Self::GetChannel(element) => ::core::fmt::Display::fmt(element, f), - Self::GetClient(element) => ::core::fmt::Display::fmt(element, f), - Self::GetConnection(element) => ::core::fmt::Display::fmt(element, f), - Self::Initialize(element) => ::core::fmt::Display::fmt(element, f), - Self::NextChannelSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::NextClientSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::NextConnectionSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::Owner(element) => ::core::fmt::Display::fmt(element, f), - Self::Paused(element) => ::core::fmt::Display::fmt(element, f), - Self::ProxiableUUID(element) => ::core::fmt::Display::fmt(element, f), - Self::RecvPacket(element) => ::core::fmt::Display::fmt(element, f), - Self::RegisterClient(element) => ::core::fmt::Display::fmt(element, f), - Self::RenounceOwnership(element) => ::core::fmt::Display::fmt(element, f), - Self::SendPacket(element) => ::core::fmt::Display::fmt(element, f), - Self::TimeoutPacket(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferOwnership(element) => ::core::fmt::Display::fmt(element, f), - Self::UpdateClient(element) => ::core::fmt::Display::fmt(element, f), - Self::UpgradeImpls(element) => ::core::fmt::Display::fmt(element, f), - Self::UpgradeToAndCall(element) => ::core::fmt::Display::fmt(element, f), - Self::WriteAcknowledgement(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: CommitmentPrefixCall) -> Self { - Self::CommitmentPrefix(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: UpgradeInterfaceVersionCall) -> Self { - Self::UpgradeInterfaceVersion(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: AcknowledgePacketCall) -> Self { - Self::AcknowledgePacket(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: CapabilitiesCall) -> Self { - Self::Capabilities(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ChannelCapabilityPathCall) -> Self { - Self::ChannelCapabilityPath(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ChannelCloseConfirmCall) -> Self { - Self::ChannelCloseConfirm(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ChannelCloseInitCall) -> Self { - Self::ChannelCloseInit(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ChannelOpenAckCall) -> Self { - Self::ChannelOpenAck(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ChannelOpenConfirmCall) -> Self { - Self::ChannelOpenConfirm(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ChannelOpenInitCall) -> Self { - Self::ChannelOpenInit(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ChannelOpenTryCall) -> Self { - Self::ChannelOpenTry(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ChannelsCall) -> Self { - Self::Channels(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ClientImplsCall) -> Self { - Self::ClientImpls(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ClientRegistryCall) -> Self { - Self::ClientRegistry(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ClientTypesCall) -> Self { - Self::ClientTypes(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: CommitmentsCall) -> Self { - Self::Commitments(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ConnectionOpenAckCall) -> Self { - Self::ConnectionOpenAck(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ConnectionOpenConfirmCall) -> Self { - Self::ConnectionOpenConfirm(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ConnectionOpenInitCall) -> Self { - Self::ConnectionOpenInit(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ConnectionOpenTryCall) -> Self { - Self::ConnectionOpenTry(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ConnectionsCall) -> Self { - Self::Connections(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: CreateClientCall) -> Self { - Self::CreateClient(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: GetChannelCall) -> Self { - Self::GetChannel(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: GetClientCall) -> Self { - Self::GetClient(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: GetConnectionCall) -> Self { - Self::GetConnection(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: InitializeCall) -> Self { - Self::Initialize(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: NextChannelSequencePathCall) -> Self { - Self::NextChannelSequencePath(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: NextClientSequencePathCall) -> Self { - Self::NextClientSequencePath(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: NextConnectionSequencePathCall) -> Self { - Self::NextConnectionSequencePath(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: OwnerCall) -> Self { - Self::Owner(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: PausedCall) -> Self { - Self::Paused(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: ProxiableUUIDCall) -> Self { - Self::ProxiableUUID(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: RecvPacketCall) -> Self { - Self::RecvPacket(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: RegisterClientCall) -> Self { - Self::RegisterClient(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: RenounceOwnershipCall) -> Self { - Self::RenounceOwnership(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: SendPacketCall) -> Self { - Self::SendPacket(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: TimeoutPacketCall) -> Self { - Self::TimeoutPacket(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: TransferOwnershipCall) -> Self { - Self::TransferOwnership(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: UpdateClientCall) -> Self { - Self::UpdateClient(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: UpgradeImplsCall) -> Self { - Self::UpgradeImpls(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: UpgradeToAndCallCall) -> Self { - Self::UpgradeToAndCall(value) - } - } - impl ::core::convert::From for IBCHandlerCalls { - fn from(value: WriteAcknowledgementCall) -> Self { - Self::WriteAcknowledgement(value) - } - } - /// Container type for all return fields from the `COMMITMENT_PREFIX` function with signature `COMMITMENT_PREFIX()` and selector `0xa9550dac` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CommitmentPrefixReturn(pub ::std::string::String); - /// Container type for all return fields from the `UPGRADE_INTERFACE_VERSION` function with signature `UPGRADE_INTERFACE_VERSION()` and selector `0xad3cb1cc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct UpgradeInterfaceVersionReturn(pub ::std::string::String); - /// Container type for all return fields from the `capabilities` function with signature `capabilities(string)` and selector `0x5717bcf5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CapabilitiesReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `channelCapabilityPath` function with signature `channelCapabilityPath(string,string)` and selector `0x3bc3339f` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelCapabilityPathReturn(pub ::std::string::String); - /// Container type for all return fields from the `channelOpenInit` function with signature `channelOpenInit((string,(uint8,uint8,(string,string),string[],string),address))` and selector `0x25035747` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelOpenInitReturn(pub ::std::string::String); - /// Container type for all return fields from the `channelOpenTry` function with signature `channelOpenTry((string,(uint8,uint8,(string,string),string[],string),string,bytes,(uint64,uint64),address))` and selector `0x8b627bca` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelOpenTryReturn(pub ::std::string::String); - /// Container type for all return fields from the `channels` function with signature `channels(string,string)` and selector `0x5b3de260` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelsReturn { - pub state: u8, - pub ordering: u8, - pub counterparty: IbcCoreChannelV1CounterpartyData, - pub version: ::std::string::String, - } - /// Container type for all return fields from the `clientImpls` function with signature `clientImpls(string)` and selector `0xd1297b8d` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientImplsReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `clientRegistry` function with signature `clientRegistry(string)` and selector `0x990491a5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientRegistryReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `clientTypes` function with signature `clientTypes(string)` and selector `0xc2380105` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientTypesReturn(pub ::std::string::String); - /// Container type for all return fields from the `commitments` function with signature `commitments(bytes32)` and selector `0x839df945` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CommitmentsReturn(pub [u8; 32]); - /// Container type for all return fields from the `connectionOpenInit` function with signature `connectionOpenInit((string,(string,string[]),(string,string,(bytes)),uint64,address))` and selector `0x8775f7f8` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ConnectionOpenInitReturn(pub ::std::string::String); - /// Container type for all return fields from the `connectionOpenTry` function with signature `connectionOpenTry(((string,string,(bytes)),uint64,string,bytes,(string,string[])[],bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address))` and selector `0x7b666dc1` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ConnectionOpenTryReturn(pub ::std::string::String); - /// Container type for all return fields from the `connections` function with signature `connections(string)` and selector `0x31973f00` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ConnectionsReturn { - pub client_id: ::std::string::String, - pub state: u8, - pub counterparty: IbcCoreConnectionV1CounterpartyData, - pub delay_period: u64, - } - /// Container type for all return fields from the `createClient` function with signature `createClient((string,bytes,bytes,address))` and selector `0xfed12cbf` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CreateClientReturn(pub ::std::string::String); - /// Container type for all return fields from the `getChannel` function with signature `getChannel(string,string)` and selector `0x3000217a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetChannelReturn(pub IbcCoreChannelV1ChannelData); - /// Container type for all return fields from the `getClient` function with signature `getClient(string)` and selector `0x7eb78932` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetClientReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `getConnection` function with signature `getConnection(string)` and selector `0x27711a69` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetConnectionReturn(pub IbcCoreConnectionV1ConnectionEndData); - /// Container type for all return fields from the `nextChannelSequencePath` function with signature `nextChannelSequencePath()` and selector `0x8669fd15` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextChannelSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `nextClientSequencePath` function with signature `nextClientSequencePath()` and selector `0x990c3888` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextClientSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `nextConnectionSequencePath` function with signature `nextConnectionSequencePath()` and selector `0x46807086` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextConnectionSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `owner` function with signature `owner()` and selector `0x8da5cb5b` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct OwnerReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `paused` function with signature `paused()` and selector `0x5c975abb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct PausedReturn(pub bool); - /// Container type for all return fields from the `proxiableUUID` function with signature `proxiableUUID()` and selector `0x52d1902d` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ProxiableUUIDReturn(pub [u8; 32]); - /// Container type for all return fields from the `sendPacket` function with signature `sendPacket(string,(uint64,uint64),uint64,bytes)` and selector `0x6cf02d3f` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct SendPacketReturn(pub u64); -} diff --git a/generated/rust/contracts/src/ibc_packet.rs b/generated/rust/contracts/src/ibc_packet.rs deleted file mode 100644 index 15bc1b0479..0000000000 --- a/generated/rust/contracts/src/ibc_packet.rs +++ /dev/null @@ -1,3111 +0,0 @@ -pub use ibc_packet::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod ibc_packet { - pub use super::super::shared_types::*; - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("COMMITMENT_PREFIX"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("COMMITMENT_PREFIX"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("acknowledgePacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("acknowledgePacket"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IBCMsgs.MsgPacketAcknowledgement", - ), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("capabilities"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("capabilities"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channelCapabilityPath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channelCapabilityPath",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("portId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("channels"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("channels"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("state"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.State", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ordering"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.Order", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterparty"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientImpls"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientImpls"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientRegistry"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientRegistry"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("clientTypes"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("clientTypes"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("commitments"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("commitments"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("connections"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("connections"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("client_id"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("state"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreConnectionV1GlobalEnums.State", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterparty"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes - ],), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreConnectionV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("delay_period"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getClient"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getClient"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("clientId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("contract ILightClient"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextChannelSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextChannelSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextClientSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextClientSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("nextConnectionSequencePath"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nextConnectionSequencePath",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("recvPacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("recvPacket"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct IBCMsgs.MsgPacketRecv",), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("sendPacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("sendPacket"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("sourceChannel"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("timeoutHeight"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("timeoutTimestamp"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("timeoutPacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("timeoutPacket"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("msg_"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct IBCMsgs.MsgPacketTimeout",), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("writeAcknowledgement"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("writeAcknowledgement",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("packet"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Packet.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("acknowledgement"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("AcknowledgePacket"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("AcknowledgePacket"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("packet"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("acknowledgement"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("RecvPacket"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("RecvPacket"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("packet"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("SendPacket"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("SendPacket"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sourcePort"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sourceChannel"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("timeoutHeight"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("timeoutTimestamp"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("TimeoutPacket"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("TimeoutPacket"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("packet"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("WriteAcknowledgement"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("WriteAcknowledgement",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("packet"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("acknowledgement"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ]), - errors: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("ErrAcknowledgementAlreadyExists"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrAcknowledgementAlreadyExists",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrAcknowledgementIsEmpty"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrAcknowledgementIsEmpty",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrClientNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrClientNotFound"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned( - "ErrDestinationAndCounterpartyChannelMismatch", - ), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned( - "ErrDestinationAndCounterpartyChannelMismatch", - ), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrDestinationAndCounterpartyPortMismatch"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned( - "ErrDestinationAndCounterpartyPortMismatch", - ), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrHeightTimeout"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrHeightTimeout"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidChannelState"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidChannelState",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidConnectionState"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidConnectionState",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidPacketCommitment"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidPacketCommitment",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidProof"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidProof"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidTimeoutHeight"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidTimeoutHeight",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidTimeoutTimestamp"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidTimeoutTimestamp",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrLatestHeightNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrLatestHeightNotFound",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrLatestTimestampNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrLatestTimestampNotFound",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrModuleNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrModuleNotFound"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned( - "ErrNextSequenceMustBeGreaterThanTimeoutSequence", - ), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned( - "ErrNextSequenceMustBeGreaterThanTimeoutSequence", - ), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrPacketAlreadyReceived"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrPacketAlreadyReceived",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrPacketCommitmentNotFound"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrPacketCommitmentNotFound",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrPacketSequenceNextSequenceMismatch"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned( - "ErrPacketSequenceNextSequenceMismatch", - ), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrPacketWithoutTimeout"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrPacketWithoutTimeout",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrSourceAndCounterpartyChannelMismatch"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned( - "ErrSourceAndCounterpartyChannelMismatch", - ), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrSourceAndCounterpartyPortMismatch"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned( - "ErrSourceAndCounterpartyPortMismatch", - ), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrTimeoutHeightNotReached"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrTimeoutHeightNotReached",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrTimeoutTimestampNotReached"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrTimeoutTimestampNotReached",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrTimestampTimeout"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrTimestampTimeout",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrUnauthorized"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrUnauthorized"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrUnknownChannelOrdering"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrUnknownChannelOrdering",), - inputs: ::std::vec![], - },], - ), - ]), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static IBCPACKET_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __BYTECODE: &[u8] = b"`\x80\x80`@R4a\0\x16Wa7\xEA\x90\x81a\0\x1C\x829\xF3[`\0\x80\xFD\xFE`\x80`@R`\x046\x10\x15a\0\x12W`\0\x80\xFD[`\0\x805`\xE0\x1C\x80c\x07\x03w\x04\x14a \xA7W\x80c1\x97?\0\x14a\x1E\xADW\x80c;\xC33\x9F\x14a\x1E\x98W\x80cF\x80p\x86\x14a\x1E?W\x80cW\x17\xBC\xF5\x14a\x1D\xC0W\x80c[=\xE2`\x14a\x1C\x1CW\x80cl\xF0-?\x14a\x16\x84W\x80c~\xB7\x892\x14a\x16\x11W\x80c\x83\x9D\xF9E\x14a\x15\xCAW\x80c\x86i\xFD\x15\x14a\x15qW\x80c\x99\x04\x91\xA5\x14a\x14\xF2W\x80c\x99\x0C8\x88\x14a\x14\x99W\x80c\xA0O\x91\xB2\x14a\x0B\xC6W\x80c\xA9U\r\xAC\x14a\x0BJW\x80c\xC28\x01\x05\x14a\n\xBEW\x80c\xCA\x95fg\x14a\t\xD2W\x80c\xD1){\x8D\x14a\t@Wc\xE8\xF0\x88\xC6\x14a\0\xE3W`\0\x80\xFD[4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x90\x80\x826\x01\x12a\t9Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x06\x89\x80a(pV[\x01a)\xEBV[\x16\x15\x15\x80a\x08tW[a\x08JWc;\x9A\xCA\0\x80B\x02\x90B\x82\x04\x14B\x15\x17\x15a\x08\x1DWa\x01\0\x90\x85a\x02y\x83a\x02>\x8B\x80a(pV[\x16\x15\x15\x90\x81a\x08\0W[Pa\x07\xD6Wa\x02\xBD\x86\x88\x8Aa\x03\x02a\x02\xF7a\x02\xF1a\x02\xE9a\x02\xA7`$\x8B\x01\x87a(\xA3V[\x98\x90\x97a\x02\xB4\x88\x80a(pV[\x90\x81\x01\x90a(\xA3V[\x92\x90a\x02\xCCa\x01\xDA\x89\x80a(pV[\x93\x90\x91a\x02\xE1a\x02\xDC\x8B\x80a(pV[a)\xEBV[\x956\x91a&\tV[\x926\x91a&\tV[\x90a6hV[\x95a\x02>\x84\x80a(pV[a\x03\x11`\xC0a\x02>\x85\x80a(pV[\x90\x8B\x83a\x03:a\x030a\x03)`\xE0a\x02>\x8A\x80a(pV[\x97\x80a(pV[`\xA0\x81\x01\x90a(\xA3V[\x90\x81`@Q\x92\x83\x92\x837\x81\x01\x83\x81R\x03\x90`\x02Z\xFA\x15a\x07\xCBW\x8B\x93a\x03\xE5a\x03\xF6\x93a\x03\xB9\x86Q`@Q\x94\x85\x93\x8A\x85\x01\x97\x88\x92`8\x94\x92\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x92\x83\x80\x92`\xC0\x1B\x16\x86R`\xC0\x1B\x16`\x08\x85\x01R`\xC0\x1B\x16`\x10\x83\x01R`\x18\x82\x01R\x01\x90V[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x83R\x82a%\x8EV[`@Q\x92\x83\x92\x83\x92Q\x92\x83\x91a&^V[\x81\x01\x03\x90`\x02Z\xFA\x15a\x07\xC0Wa\x04'\x94`D\x8BQ\x95`@Q\x96\x8B\x88\x01R\x8A\x87Ra\x04 \x87a%rV[\x01\x90a/\xD9V[\x15a\x07\x96WT`\x08\x1C`\xFF\x16`\x03\x81\x10\x15a\x07iW`\x01\x81\x03a\x06uWPa\x04pa\x04ja\x02\xE9a\x04[a\x01H\x87\x80a(pV[\x92\x90a\x02\xCCa\x01b\x89\x80a(pV[\x90a3\xDEV[\x82\x81Q\x91\x01 \x80\x85R\x84\x83R`@\x85 Ta\x06KW\x84R\x83\x82R`\x01`@\x85 U[\x83\x80a\x05$s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x04\xE2a\x04\xDCa\x04\xBFa\x01H\x8A\x80a(pV[a\x02\xE9a\x04\xD2a\x01b\x8D\x80\x96\x95\x96a(pV[\x94\x90\x926\x91a&\tV[\x90a1\xB8V[\x16a\x04\xED\x87\x80a(pV[`@Q\x94\x85\x80\x94\x81\x93\x7F#\x01\xC6\xF5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R3\x90`\x04\x84\x01a-\xD7V[\x03\x92Z\xF1\x91\x82\x15a\x06@W\x85\x92a\x05\xA0W[PP\x7F4oCQ\xEE\x86]\x86\xA6y\xD0\x0F9\x95\xF0R\x0F\x80=:\"v\x04\xAF\x08C\x0E&\xE94Zz\x92\x81a\x05l\x92Qa\x05\x87W[P\x80a(pV[\x90a\x05\x81`@Q\x92\x82\x84\x93\x84R\x83\x01\x90a+\x01V[\x03\x90\xA1\x80\xF3[a\x05\x9A\x90a\x05\x95\x83\x80a(pV[a5\x03V[8a\x05eV[\x90\x91P=\x80\x86\x84>a\x05\xB2\x81\x84a%\x8EV[\x82\x01\x91\x83\x81\x84\x03\x12a\x068W\x80Q\x91\x82\x11a\x068W\x01\x92\x81`\x1F\x85\x01\x12\x15a\x06=\x90\xFD[`\x04`@Q\x7F\xA4k\xBA\xB4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x02\x03a\x07?Wa\x06\xA8a\x06\xA2a\x06\x8Fa\x01H\x86\x80a(pV[a\x02\xE9a\x04\xD2a\x01b\x89\x80\x96\x95\x96a(pV[\x90a4\xBDV[\x82\x81Q\x91\x01 \x84R\x83\x82R\x80`@\x85 T\x16\x81a\x06\xC8a\x02\xDC\x86\x80a(pV[\x16\x81\x03a\x07\x15Wa\x06\xD9\x82\x91a*\0V[\x16a\x07\0a\x06\xA2a\x06\xEDa\x01H\x87\x80a(pV[a\x02\xE9a\x04\xD2a\x01b\x8A\x80\x96\x95\x96a(pV[\x83\x81Q\x91\x01 \x85R\x84\x83R`@\x85 Ua\x04\x92V[`\x04`@Q\x7F@*\x84\xA3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7Fl\xC7\x9C\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`$\x85\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`!`\x04R\xFD[`\x04`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`@Q=\x8B\x82>=\x90\xFD[`@Q=\x84\x82>=\x90\xFD[`\x04`@Q\x7F\xA4\x82\x12p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x85\x80a\x08\x12\x84a\x02>\x8C\x80a(pV[\x16\x91\x16\x10\x158a\x02\x83V[`$\x88\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x11`\x04R\xFD[`\x04`@Q\x7F\xA9\xCF\xB7\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[P\x83a\x08\x85`\xE0a\x02>\x89\x80a(pV[\x16C\x10\x15a\x02MV[`\x04`@Q\x7F\x8C\xA9\x89\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`$\x88\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`!`\x04R\xFD[`\x04`@Q\x7Fwf\x8E\xD1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xDA\x88\\\x1D\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x82\x80\xFD[\x80\xFD[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\t=W` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\t\xBE\x82a\t\xAB6`\x04\x88\x01a&@V[\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a&^V[\x81\x01`\x03\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[P4a\t=W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`@\x816\x01\x12a\n\xBAW`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11a\n\xB6Wa\x01 \x82`\x04\x01\x93\x836\x03\x01\x12a\n\xB6W`$5\x90\x81\x11a\n\xB6W6`#\x82\x01\x12\x15a\n\xB6Wa\nva\nVa\n{\x926\x90`$\x81`\x04\x015\x91\x01a&\tV[\x92a\npa\x01\x98`\x84a\nh3a2\x1BV[\x93\x01\x87a(\xA3V[\x90a+\xDAV[a2\x92V[\x15a\n\x8CWa\n\x89\x91a5\x03V[\x80\xF3[`\x04`@Q\x7F\xCC\x12\xCE\xF6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x83\x80\xFD[P\x80\xFD[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\t=Wa\x0BFa\x01\xBBa\x0B2a\x0B\x1C` a\t\xAB6`\x04\x89\x01a&@V[\x81\x01`\x02\x81R\x03\x01\x90 `@Q\x92\x83\x80\x92a&\xD4V[`@Q\x91\x82\x91` \x83R` \x83\x01\x90a'\x88V[\x03\x90\xF3[P4a\t=W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=Wa\x0BF`@Qa\x0B\x88\x81a%rV[`\x03\x81R\x7Fibc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R`@Q\x91\x82\x91` \x83R` \x83\x01\x90a'\x88V[P4a\t=Wa\x0B\xD56a%\x0EV[a\x0B\xDF\x81\x80a(pV[a\x0C\x01a\x0B\xF1` \x92\x83\x81\x01\x90a(\xA3V[a\x01va\x01la\x01\xDA\x87\x80a(pV[a\x0C\x14a\x01\x9Fa\x01\x98a\x01H\x86\x80a(pV[a\x0C+`@Qa\x01\x9F\x81a\x01\xBB\x81`\x01\x88\x01a&\xD4V[\x03a\x14oWa\x0CCa\x01\x9Fa\x01\x98a\x01b\x86\x80a(pV[a\x0CZ`@Qa\x01\x9F\x81a\x01\xBB\x81`\x02\x88\x01a&\xD4V[\x03a\x14EWa\x0Cna\x02\x0F`\x03\x83\x01a(\xF4V[`\xFF`\x02\x82\x01T\x16`\x04\x81\x10\x15a\x14\x18W`\x03\x03a\x08\x8EWa\x0C\xBBa\x02\xF1a\x02\xE9a\x0C\x9Ca\x01\x8F\x88\x80a(pV[\x92\x90a\x0C\xABa\x01\xDA\x8A\x80a(pV[\x93\x90\x91a\x02\xE1a\x02\xDC\x8C\x80a(pV[\x83\x81Q\x91\x01 \x80\x86R\x85\x84R`@\x86 T\x80\x15a\x13\xEEWa\x01\0\x90\x86\x88a\x0C\xE6\x84a\x02>\x84\x80a(pV[a\x0C\xF5`\xC0a\x02>\x85\x80a(pV[\x90\x89\x83a\r\ra\x030a\x03)`\xE0a\x02>\x8A\x80a(pV[\x90\x81`@Q\x92\x83\x92\x837\x81\x01\x83\x81R\x03\x90`\x02Z\xFA\x15a\x07\xCBW\x89\x93a\x03\xE5a\r\x8C\x93a\x03\xB9\x86Q`@Q\x94\x85\x93\x8A\x85\x01\x97\x88\x92`8\x94\x92\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x92\x83\x80\x92`\xC0\x1B\x16\x86R`\xC0\x1B\x16`\x08\x85\x01R`\xC0\x1B\x16`\x10\x83\x01R`\x18\x82\x01R\x01\x90V[\x81\x01\x03\x90`\x02Z\xFA\x15a\x13\xE3W\x87Q`@Q\x87\x81\x01\x91\x82R\x87\x81Ra\r\xB0\x81a%rV[Q\x90 \x03a\x13\xB9Wa\r\xEA\x92`@Qa\r\xCD\x81a\x01\xBB\x81\x85a&\xD4V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x85\x91a,\xF4V[\x16`@\x88\x01\x92\x87`@Q\x80\x93\x7FK\x0B\xBD\xC4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82R```\x04\x83\x01R\x81\x80a\x0E/`d\x82\x01\x89a-aV[a\x0E<`$\x83\x01\x8Ba*\xD7V[\x03\x91Z\xFA\x91\x82\x15a\x13\xAEW\x8A\x92a\x13sW[Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x92\x16\x80\x15a\x13IW\x82a\x0Ep\x83a\x02>\x8D\x80a(pV[\x16\x15\x80a\x130W[a\x13\x06W\x82a\x0E\x8B\x83a\x02>\x8D\x80a(pV[\x16\x15\x15\x90\x81a\x12\xECW[Pa\x12\xC2Wa\x0E\xB8a\x0E\xB36`\xC0a\x0E\xAD\x8D\x80a(pV[\x01a,\xBEV[a2\xD1V[\x15\x80a\x12\x99W[a\x12oW`\xFF\x87T`\x08\x1C\x16`\x03\x81\x10\x15a\x12BW`\x02\x81\x03a\x10\xBBWPP`\x80\x88\x01\x90a\x0E\xEC\x82a)\xEBV[\x90\x80a\x0E\xFBa\x02\xDC\x8C\x80a(pV[\x16\x91\x16\x11\x15a\x10\x91Wa\x0F\x84\x92a\x0F\x14\x88\x8A\x01\x8Aa(\xA3V[\x91a\x0FDa\x0F>\x8Ca\x06\xA2a\x01ba\x02\xE9a\x04\xD2a\x0F5a\x01H\x86\x80a(pV[\x93\x90\x95\x80a(pV[\x94a)\xEBV[\x94\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`@Q\x96`\xC0\x1B\x16\x8B\x87\x01R`\x08\x86Ra\x0F\x7F\x86a%rV[a/\xD9V[\x15a\x07\x96W\x82`\x04\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x88\x95T\x16\x17\x90U[\x82R\x81\x83R\x81`@\x81 Ua\x0F\xEFa\x04\xDCa\x0F\xDCa\x0F\xD3\x87\x80a(pV[\x86\x81\x01\x90a(\xA3V[a\x02\xE9a\x04\xD2a\x01\xDA\x8A\x80\x96\x95\x96a(pV[\x16a\x0F\xFA\x84\x80a(pV[\x90\x80;\x15a\t9Wa\x10A\x83\x92\x91\x83\x92`@Q\x94\x85\x80\x94\x81\x93\x7FR\xC7\x15}\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R3\x90`\x04\x84\x01a-\xD7V[\x03\x92Z\xF1\x80\x15a\x07\xCBWa\x10}W[PPa\x05l\x82\x7F\xA6\xCC\xDF\xD0b\x94\xBB\xB4\x81\xB7\xB0\x8A\xB1p\xC17|\xCC\xDC\xAA\x9E5\xB2\xE3F\xA3n\xE3*\x1F\x8F\x06\x93a(pV[a\x10\x86\x90a%^V[a\t9W\x828a\x10PV[`\x04`@Q\x7F\xE7X\xEF\x82\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x01\x91\x93\x94\x95\x97P\x14`\0\x14a\x07?W\x86\x92\x89a\x04j\x93a\x11\xEB\x8Ba\x11\x16a\x02\xE9a\x02\xDCa\x10\xEB\x8B\x85\x01\x85a(\xA3V[\x9A\x90\x94a\x10\xFBa\x01H\x82\x80a(pV[\x94\x90a\x02\xE1a\x11\ra\x01b\x85\x80a(pV[\x96\x90\x94\x80a(pV[a\x11\xDC\x8Ba\x113`@Qa\x11.\x81a\x01\xBB\x81\x8Da&\xD4V[a,\xF4V[\x16\x97`\x06\x88\x01T\x16\x96`\x05a\x11\xCB`@Q\x9D\x8E\x9C\x8D\x9B\x8C\x9A\x7F\x99\x9F\xBB\xB3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x8CR`\x04\x8C\x01Ra\x11\x8Fa\x11\x84a\x01\x04\x8D\x01\x88a-aV[\x93`$\x8D\x01\x90a*\xD7V[`d\x8B\x01R\x8A`\x84\x8B\x01R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x97\x88\x8B\x84\x03\x01`\xA4\x8C\x01Ra*\x98V[\x91\x85\x88\x84\x03\x01`\xC4\x89\x01R\x01a-aV[\x91\x84\x83\x03\x01`\xE4\x85\x01Ra'\x88V[\x03\x92Z\xF1\x90\x81\x15a\x127W\x86\x91a\x12\nW[P\x15a\x07\x96W\x84\x91a\x0F\xB5V[a\x12*\x91P\x84=\x86\x11a\x120W[a\x12\"\x81\x83a%\x8EV[\x81\x01\x90a/\xC1V[8a\x11\xFDV[P=a\x12\x18V[`@Q=\x88\x82>=\x90\xFD[`$\x8B\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`!`\x04R\xFD[`\x04`@Q\x7F\x12\xC5\x1Cd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[Pa\x12\xBDa\x12\xAD6`\xC0a\x0E\xAD\x8D\x80a(pV[a\x12\xB76\x87a,\xBEV[\x90a2\xF5V[a\x0E\xBFV[`\x04`@Q\x7F\x85Q\xD25\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x82a\x12\xFD\x83a\x02>\x8D\x80a(pV[\x16\x10\x158a\x0E\x95V[`\x04`@Q\x7FW4@\x0C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[Pa\x13Da\x0E\xB36`\xC0a\x0E\xAD\x8E\x80a(pV[a\x0ExV[`\x04`@Q\x7F\x9Bl\x9A\xDC\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90\x91P\x87\x81\x81=\x83\x11a\x13\xA7W[a\x13\x8B\x81\x83a%\x8EV[\x81\x01\x03\x12a\x13\xA3Wa\x13\x9C\x90a,HV[\x908a\x0ENV[\x89\x80\xFD[P=a\x13\x81V[`@Q=\x8C\x82>=\x90\xFD[`\x04`@Q\x7FC\x8A\x8D\x16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`@Q=\x89\x82>=\x90\xFD[`\x04`@Q\x7FM|\xFCW\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`$\x86\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`!`\x04R\xFD[`\x04`@Q\x7F\x93\x87\xF5\xD0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xA6\x07`C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[P4a\t=W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W` `@Q\x7F\x9B\x98 Hj\x05\xC0\x19>\xFB!Ll+\xA8\xFC\xE0,Z\\\x84\xAA\x05\x7F\x81\x99\xC9\x9F\x13\xFF\x93\x9B\x81R\xF3[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\t=W` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x15]\x82a\t\xAB6`\x04\x88\x01a&@V[\x81\x01`\x01\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[P4a\t=W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W` `@Q\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm\x81R\xF3[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`@` \x91`\x045\x81R\x80\x83R T`@Q\x90\x81R\xF3[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\t=W` a\x16fa\x11.6`\x04\x86\x01a&@V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x16\x81R\xF3[P4a\t=W`\xA0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\n\xBAWa\x16\xD4\x906\x90`\x04\x01a(-V[`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC6\x01\x12a\t9Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`d5\x16`d5\x03a\x1A\xC6W`\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\n\xB6Wa\x173\x906\x90`\x04\x01a(-V[a\x17?\x92\x91\x923a2\x1BV[\x92a\x17Wa\nva\x17Q6\x86\x89a&\tV[\x86a+\xDAV[\x15a\n\x8CWa\x01\xBBa\x17\x87a\x17{a\x02\x0F`\x03a\x17u\x88\x8B\x8Ba.\x0BV[\x01a(\xF4V[`@Q\x92\x83\x80\x92a&\xD4V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x17\xA5\x82a,\xF4V[\x16\x90`@Q\x90\x7F2\x96\x81\xD0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82R` `\x04\x83\x01R`@\x82\x80a\x17\xE6`$\x82\x01\x85a'\x88V[\x03\x81\x86Z\xFA\x91\x82\x15a\x07\xC0W\x89\x92a\x1B\xBDW[Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF` \x83\x01Q\x16\x15a\x1B\x93Wa\x18\x1Aa\x0E\xB36a,]V[\x15\x80a\x1B{W[a\x1BQWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92a\x18v` \x93\x92\x84\x93`@Q\x96\x87\x95\x86\x94\x85\x94\x7FK\x0B\xBD\xC4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x86R```\x04\x87\x01R`d\x86\x01\x90a'\x88V[\x92\x82\x81Q\x16`$\x86\x01R\x01Q\x16`D\x83\x01R\x03\x91Z\xFA\x80\x15a\x13\xE3W\x87\x90a\x1B\x0CW[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91P\x16\x80\x15a\x13IWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`d5\x16\x15\x15\x90\x81a\x1A\xF5W[Pa\x1A\xCBWa\x18\xDAa\x18\xD46\x85\x88a&\tV[\x85a3MV[\x86R\x85` Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@\x87 T\x16\x94g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x19\x02\x87a*\0V[\x16a\x19\x17a\x19\x116\x87\x85a&\tV[\x87a3MV[\x88R\x87` R`@\x88 U`$5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x94\x85\x83\x03a\x1A\xC6W`D5\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16\x93\x84\x81\x03a\x1A\xC6W\x8A\x90` \x82`@Q\x8A\x8A\x827\x80\x8B\x81\x01\x83\x81R\x03\x90`\x02Z\xFA\x15a\x1A\xB9W\x81Q`@Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`d5`\xC0\x90\x81\x1B\x82\x16` \x80\x85\x01\x91\x82R\x97\x82\x1B\x83\x16`(\x85\x01R\x94\x90\x1B\x16`0\x82\x01R`8\x81\x01\x91\x90\x91Ra\x19\xD3\x91\x90a\x03\xE5\x81`X\x81\x01a\x03\xB9V[\x81\x01\x03\x90`\x02Z\xFA\x15a\x1A\xAEW\x92a\x1Ak\x95\x92a\x1Ay\x7F*\x89\xCA\x0E\x96*a\xB8\x11Uu\xDAc\xF5K\xB2I\xCF\x017\x94\x7F\xC9\xAB\x01j\xC9\xDF\x88\xAA4~\x98\x96\x93a\x1A\xA3\x96\x8B`@\x8E` \x9Fa\x1AC\x90Q\x83Q` \x81\x01\x91\x82R` \x81Ra\x1A3\x81a%rV[Q\x90 \x93\x8Da\x02\xF16\x88\x8Aa&\tV[` \x81Q\x91\x01 \x81R\x8F\x81\x90R U`@Q\x99\x8A\x99\x8D\x8BR`\xE0\x8F\x8C\x01R`\xE0\x8B\x01\x90a'\x88V[\x91\x89\x83\x03`@\x8B\x01Ra*\x98V[\x93``\x87\x01R`\x80\x86\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`d5\x16`\xA0\x86\x01R\x84\x83\x03`\xC0\x86\x01Ra*\x98V[\x03\x90\xA1`@Q\x90\x81R\xF3[`@Q=\x8A\x82>=\x90\xFD[P`@Q\x90=\x90\x82>=\x90\xFD[`\0\x80\xFD[`\x04`@Q\x7F\xE6'|\xE0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`d5\x16\x11\x158a\x18\xC1V[P` \x81=` \x11a\x1BIW[\x81a\x1B&` \x93\x83a%\x8EV[\x81\x01\x03\x12a\x1BEWa\x1B@g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91a,HV[a\x18\x99V[\x86\x80\xFD[=\x91Pa\x1B\x19V[`\x04`@Q\x7F\xC8\xE1\xD2d\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[Pa\x1B\x8Ea\x1B\x886a,]V[\x83a2\xF5V[a\x18!V[`\x04`@Q\x7F\xE5=N7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90\x91P`@\x81=`@\x11a\x1C\x14W[\x81a\x1B\xD9`@\x93\x83a%\x8EV[\x81\x01\x03\x12a\x1C\x10Wa\x1C\x04` `@Q\x92a\x1B\xF3\x84a%rV[a\x1B\xFC\x81a,HV[\x84R\x01a,HV[` \x82\x01R\x908a\x17\xF9V[\x88\x80\xFD[=\x91Pa\x1B\xCCV[P4a\t=W`\x04a\x1Cl\x91a\x1C16a'\xCBV[`@\x94\x91\x94Q\x90\x81\x86Q\x96\x81\x88a\x1CO` \x9A\x8B\x97\x88\x80\x96\x01a&^V[\x81\x01`\x05\x81R\x03\x01\x90 \x82`@Q\x94\x83\x86\x80\x95Q\x93\x84\x92\x01a&^V[\x82\x01\x90\x81R\x03\x01\x90 \x90\x81T\x93`\xFF\x80\x86\x16\x95`\x08\x1C\x16\x90`@Q\x92a\x1C\x91\x84a%rV[`@Qa\x1C\xA5\x81a\x01\xBB\x81`\x01\x8A\x01a&\xD4V[\x84Ra\x1C\xE3`@Q\x95a\x1C\xC6\x87a\x1C\xBF\x81`\x02\x85\x01a&\xD4V[\x03\x88a%\x8EV[\x83\x86\x01\x96\x87Ra\x1C\xDC`@Q\x80\x99\x81\x93\x01a&\xD4V[\x03\x87a%\x8EV[`@Q\x96`\x05\x81\x10\x15a\x1D\x93W\x87R`\x03\x83\x10\x15a\x1DfWP\x92a\x1D'\x86\x95\x93a\x1DX\x93a\x0BF\x96\x88\x01R`\x80`@\x88\x01RQ`@`\x80\x88\x01R`\xC0\x87\x01\x90a'\x88V[\x90Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x86\x83\x03\x01`\xA0\x87\x01Ra'\x88V[\x90\x83\x82\x03``\x85\x01Ra'\x88V[\x80\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`$\x92R`!`\x04R\xFD[`$\x82\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`!`\x04R\xFD[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\t=W` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x1E+\x82a\t\xAB6`\x04\x88\x01a&@V[\x81\x01`\x06\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[P4a\t=W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W` `@Q\x7F\x8E\xF0z\xFD\xA4\xDE\xC4\xDCf\xE7\xD1\x8F\xC0\xE3\xA7\x13\xF7J\x11\xB3:qB,\x06\xA4\xB5\xE6#\xC3\xB2\x1A\x81R\xF3[P4a\t=Wa\x0BFa\x0B2a\np6a'\xCBV[P4a\t=W` \x90\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\t9W\x83a\t\xABa\x1F\x04\x926\x90`\x04\x01a&@V[\x81\x01`\x04\x81R\x03\x01\x90 \x92`@Q\x92a\x1F(\x84a\x1F!\x81\x88a&\xD4V[\x03\x85a%\x8EV[`\xFF`\x02\x86\x01T\x16\x92`@Q``\x81\x01\x81\x81\x10\x83\x82\x11\x17a xW\x80`@Ra\x1F\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA0\x83a\x1Fy\x84`\x03\x8D\x01a&\xD4V[\x03\x01\x82a%\x8EV[\x81R`@Q\x91a\x1F\x9F\x83a\x1F\x98\x81`\x04\x8C\x01a&\xD4V[\x03\x84a%\x8EV[\x84\x82\x01\x92\x83R`@Q\x97\x85\x89\x01\x90\x89\x82\x10\x83\x83\x11\x17a xW\x81`\x06\x92`@Ra\x1F\xF1\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x8Ca\x1Fy\x84`\x05\x87\x01a&\xD4V[\x8AR`@\x84\x01\x99\x8AR\x01T\x16\x94a \x13`@Q\x97`\x80\x89R`\x80\x89\x01\x90a'\x88V[\x93`\x04\x82\x10\x15a\x1DfWP\x84\x92a I\x88\x99\x95\x93a W\x93a n\x98\x8B\x01R\x89\x85\x03`@\x8B\x01RQ``\x85R``\x85\x01\x90a'\x88V[\x90Q\x83\x82\x03\x85\x85\x01Ra'\x88V[\x92Q\x90`@\x81\x85\x03\x91\x01RQ\x91\x81\x81R\x01\x90a'\x88V[\x90``\x83\x01R\x03\x90\xF3[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[P4a\t=Wa \xB66a%\x0EV[a \xC0\x81\x80a(pV[a \xD2a\x0B\xF1` \x92\x83\x81\x01\x90a(\xA3V[a \xE5a\x01\x9Fa\x01\x98a\x01H\x86\x80a(pV[a \xFC`@Qa\x01\x9F\x81a\x01\xBB\x81`\x01\x88\x01a&\xD4V[\x03a\x14oWa!\x14a\x01\x9Fa\x01\x98a\x01b\x86\x80a(pV[a!+`@Qa\x01\x9F\x81a\x01\xBB\x81`\x02\x88\x01a&\xD4V[\x03a\x14EWa!?a\x02\x0F`\x03\x83\x01a(\xF4V[\x90`\xFF`\x02\x83\x01T\x16`\x04\x81\x10\x15a\x14\x18W`\x03\x03a\x08\x8EWa!na\x02\xF1a\x02\xE9a\x0C\x9Ca\x01\x8F\x88\x80a(pV[\x83\x81Q\x91\x01 \x90\x81\x86R\x85\x84R`@\x86 T\x80\x15a\x13\xEEWa!\x96a\x01\0a\x02>\x88\x80a(pV[\x87a!\xA6`\xC0a\x02>\x8A\x80a(pV[a!\xB5`\xE0a\x02>\x8B\x80a(pV[\x92\x88\x83a!\xC5a\x030\x8D\x80a(pV[\x90\x81`@Q\x92\x83\x92\x837\x81\x01\x83\x81R\x03\x90`\x02Z\xFA\x15a\x07\xCBW\x88\x93a\x03\xE5a\"D\x93a\x03\xB9\x86Q`@Q\x94\x85\x93\x8A\x85\x01\x97\x88\x92`8\x94\x92\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x92\x83\x80\x92`\xC0\x1B\x16\x86R`\xC0\x1B\x16`\x08\x85\x01R`\xC0\x1B\x16`\x10\x83\x01R`\x18\x82\x01R\x01\x90V[\x81\x01\x03\x90`\x02Z\xFA\x15a\x127W\x86Q`@Q\x86\x81\x01\x91\x82R\x86\x81Ra\"h\x81a%rV[Q\x90 \x03a\x13\xB9Wa\"}`@\x86\x01\x86a(\xA3V[\x93a\"\x9Ea\x02\xE9a\x02\xDCa\"\x98\x8Aa\x10\xFBa\x01H\x82\x80a(pV[\x90a.\xE3V[\x86\x88\x01\x95\x87\x8Aa\"\xAE\x89\x8Ca(\xA3V[\x90\x81`@Q\x92\x83\x92\x837\x81\x01\x83\x81R\x03\x90`\x02Z\xFA\x15a\x07\xC0Wa\"\xED\x93\x8AQ\x93`@Q\x94\x8A\x86\x01R\x89\x85Ra\"\xE3\x85a%rV[``\x8B\x01\x90a/\xD9V[\x15a\x07\x96WT`\x08\x1C`\xFF\x16`\x03\x81\x10\x15a\x14\x18W`\x02\x14a$\x8CW[\x84R\x83\x82R\x83`@\x81 Us\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa#=a\x04\xDCa\x0F\xDCa\x0F\xD3\x87\x80a(pV[\x16\x84a#I\x85\x80a(pV[\x91a#T\x84\x87a(\xA3V[\x91\x90\x93\x81;\x15a\n\xB6W\x83a#\xA4\x91a#\xD4`@Q\x97\x88\x96\x87\x95\x86\x94\x7F\xFB\x8BS.\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x86R```\x04\x87\x01R`d\x86\x01\x90a+\x01V[\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x85\x84\x03\x01`$\x86\x01Ra*\x98V[3`D\x83\x01R\x03\x92Z\xF1\x80\x15a\x06@Wa$IW[P\x91a\x05\x81a$<\x92a$'\x7FGG\x14Pv^n\x1B\x0B\x05[\xA2\xA1\xDE\x04\xD4\xCEq\xF7x\xC9+0nrP\x83\xEB\x12\r\xFD\x89\x95a$!\x85\x80a(pV[\x94a(\xA3V[\x90`@Q\x95\x86\x95`@\x87R`@\x87\x01\x90a+\x01V[\x92\x85\x84\x03\x90\x86\x01Ra*\x98V[a$<\x92a$'\x7FGG\x14Pv^n\x1B\x0B\x05[\xA2\xA1\xDE\x04\xD4\xCEq\xF7x\xC9+0nrP\x83\xEB\x12\r\xFD\x89\x95\x93\x96a$\x80a\x05\x81\x94a%^V[\x96\x93\x95PP\x92Pa#\xE9V[a$\xA5a$\x9Fa\x0F\xDCa\x0F\xD3\x87\x80a(pV[\x90a17V[\x85R\x84\x83Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80`@\x87 T\x16\x81a$\xC8a\x02\xDC\x88\x80a(pV[\x16\x81\x03a\x07\x15Wa$\xD8\x90a*\0V[\x16a$\xFFa$\x9Fa$\xECa\x01\x8F\x88\x80a(pV[a\x02\xE9a\x04\xD2a\x01\xDA\x8B\x80\x96\x95\x96a(pV[\x86R\x85\x84R`@\x86 Ua#\nV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x90` \x82\x82\x01\x12a\x1A\xC6W`\x045\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x1A\xC6W\x82`\xC0\x92\x03\x01\x12a\x1A\xC6W`\x04\x01\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a xW`@RV[`@\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a xW`@RV[\x90`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a xW`@RV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a xW`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16` \x01\x90V[\x92\x91\x92a&\x15\x82a%\xCFV[\x91a&#`@Q\x93\x84a%\x8EV[\x82\x94\x81\x84R\x81\x83\x01\x11a\x1A\xC6W\x82\x81` \x93\x84`\0\x96\x017\x01\x01RV[\x90\x80`\x1F\x83\x01\x12\x15a\x1A\xC6W\x81` a&[\x935\x91\x01a&\tV[\x90V[`\0[\x83\x81\x10a&qWPP`\0\x91\x01RV[\x81\x81\x01Q\x83\x82\x01R` \x01a&aV[\x90`\x01\x82\x81\x1C\x92\x16\x80\x15a&\xCAW[` \x83\x10\x14a&\x9BWV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[\x91`\x7F\x16\x91a&\x90V[\x80T`\0\x93\x92a&\xE3\x82a&\x81V[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a'KWP`\x01\x14a'\nW[PPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a'7WPPPP\x01\x01\x908\x80\x80\x80\x80a'\x03V[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a'\x1FV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x86\x85\x01RPPP\x90\x15\x15`\x05\x1B\x01\x01\x91P8\x80\x80\x80\x80a'\x03V[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F` \x93a'\xC4\x81Q\x80\x92\x81\x87R\x87\x80\x88\x01\x91\x01a&^V[\x01\x16\x01\x01\x90V[\x90`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x83\x01\x12a\x1A\xC6Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x1A\xC6W\x83a(\x16\x91`\x04\x01a&@V[\x92`$5\x91\x82\x11a\x1A\xC6Wa&[\x91`\x04\x01a&@V[\x91\x81`\x1F\x84\x01\x12\x15a\x1A\xC6W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x1A\xC6W` \x83\x81\x86\x01\x95\x01\x01\x11a\x1A\xC6WV[5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x1A\xC6WV[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFE\xE1\x816\x03\x01\x82\x12\x15a\x1A\xC6W\x01\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x1A\xC6W\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x1A\xC6W` \x01\x91\x816\x03\x83\x13a\x1A\xC6WV[\x80T\x15a)\tW`\0R` `\0 \x90`\0\x90V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[`@Q\x90\x81`\0\x82Ta)J\x81a&\x81V[\x93`\x01\x91\x80\x83\x16\x90\x81\x15a)\xB0WP`\x01\x14a)rW[PP` \x92P`\x04\x81R\x03\x01\x90 \x90V[\x90\x91P`\0R` \x90` `\0 \x90`\0\x91[\x85\x83\x10a)\x9CWPPPP` \x91\x81\x018\x80a)aV[\x80T\x87\x84\x01R\x86\x94P\x91\x83\x01\x91\x81\x01a)\x85V[\x91PP` \x94\x92P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x91P\x16\x82R\x80\x15\x15\x02\x81\x018\x80a)aV[5g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x1A\xC6W\x90V[\x90`\x01g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x93\x16\x01\x91\x82\x11a*\x19WV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[\x905\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x826\x03\x01\x81\x12\x15a\x1A\xC6W\x01` \x815\x91\x01\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x1A\xC6W\x816\x03\x83\x13a\x1A\xC6WV[`\x1F\x82` \x94\x93\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x81\x86R\x86\x86\x017`\0\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x90V[` \x90a*\xFB\x82g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x83a*\xF2\x82a([V[\x16\x86R\x01a([V[\x16\x91\x01RV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x90a+\xB4a+\x99a+~a+ca+Ha\x01 \x88a+(\x88a([V[\x16\x88Ra+8` \x88\x01\x88a*HV[\x90\x91\x80` \x8B\x01R\x89\x01\x91a*\x98V[a+U`@\x87\x01\x87a*HV[\x90\x88\x83\x03`@\x8A\x01Ra*\x98V[a+p``\x86\x01\x86a*HV[\x90\x87\x83\x03``\x89\x01Ra*\x98V[a+\x8B`\x80\x85\x01\x85a*HV[\x90\x86\x83\x03`\x80\x88\x01Ra*\x98V[a+\xA6`\xA0\x84\x01\x84a*HV[\x90\x85\x83\x03`\xA0\x87\x01Ra*\x98V[\x92a+\xC5`\xC0\x84\x01`\xC0\x84\x01a*\xD7V[a+\xD3a\x01\0\x80\x93\x01a([V[\x16\x91\x01R\x90V[`!a,F\x91\x93\x92\x93`@Q\x94\x81a+\xFC\x87\x93Q\x80\x92` \x80\x87\x01\x91\x01a&^V[\x82\x01\x7F/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01Ra,7\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[\x01\x03`\x01\x81\x01\x85R\x01\x83a%\x8EV[V[Q\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x1A\xC6WV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC`@\x91\x01\x12a\x1A\xC6W`@Q\x90a,\x94\x82a%rV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`$5\x82\x81\x16\x81\x03a\x1A\xC6W\x81R`D5\x91\x82\x16\x82\x03a\x1A\xC6W` \x01RV[\x91\x90\x82`@\x91\x03\x12a\x1A\xC6W`@Qa,\xD6\x81a%rV[` a,\xEF\x81\x83\x95a,\xE7\x81a([V[\x85R\x01a([V[\x91\x01RV[a-\"` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a&^V[\x81\x01`\x03\x81R\x03\x01\x90 T\x16\x80\x15a-7W\x90V[`\x04`@Q\x7F\xB6\xC7\x1F}\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x80T`\0\x93\x92a-p\x82a&\x81V[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a'KWP`\x01\x14a-\x96WPPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a-\xC3WPPPP\x01\x01\x908\x80\x80\x80\x80a'\x03V[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a-\xABV[\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa.\x04` \x92\x95\x94\x95`@\x85R`@\x85\x01\x90a+\x01V[\x94\x16\x91\x01RV[\x90a.&` \x80\x93\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a&^V[\x81\x01`\x05\x81R\x03\x01\x90 \x83`@Q\x94\x85\x93\x847\x82\x01\x90\x81R\x03\x01\x90 `\xFF\x81T\x16`\x05\x81\x10\x15a.\x84W`\x03\x03a.ZW\x90V[`\x04`@Q\x7F\x96\xD0\x91F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`!`\x04R`$`\0\xFD[`@Qa.\xDD` \x82\x81a.\xD0\x81\x83\x01\x96\x87\x81Q\x93\x84\x92\x01a&^V[\x81\x01\x03\x80\x84R\x01\x82a%\x8EV[Q\x90 \x90V[`@\x90a.\xFDg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa&[\x94\x95\x16a7GV[\x82Q\x94\x85\x92\x7Facks/ports/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x85\x01Ra/<\x81Q\x80\x92` `+\x88\x01\x91\x01a&^V[\x83\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`+\x82\x01Ra/x\x82Q\x80\x93` `5\x85\x01\x91\x01a&^V[\x01\x7F/sequences/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`5\x82\x01Ra/\xB2\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[\x01\x03` \x81\x01\x84R\x01\x82a%\x8EV[\x90\x81` \x91\x03\x12a\x1A\xC6WQ\x80\x15\x15\x81\x03a\x1A\xC6W\x90V[\x91\x94\x90\x92`@Q\x80a/\xEB\x81\x86a&\xD4V[\x03a/\xF6\x90\x82a%\x8EV[a/\xFF\x90a,\xF4V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x94`\x06\x84\x01Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x93`@Q\x97\x88\x96\x87\x96\x7F\xF9\xBBZQ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x88R`\x04\x88\x01a\x01 \x90Ra\x01$\x88\x01a0i\x90\x85a-aV[\x91`$\x89\x01a0w\x91a*\xD7V[`d\x88\x01R`\x84\x87\x01`\0\x90R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x94\x85\x88\x83\x03\x01`\xA4\x89\x01Ra0\xB9\x92a*\x98V[\x85\x81\x03\x84\x01`\xC4\x87\x01Ra0\xCF\x91`\x05\x01a-aV[\x82\x85\x82\x03\x01`\xE4\x86\x01Ra0\xE2\x91a'\x88V[\x90\x83\x82\x03\x01a\x01\x04\x84\x01Ra0\xF6\x91a'\x88V[\x03\x81Z` \x94`\0\x91\xF1\x90\x81\x15a1+W`\0\x91a1\x12WP\x90V[a&[\x91P` =` \x11a\x120Wa\x12\"\x81\x83a%\x8EV[`@Q=`\0\x82>=\x90\xFD[\x90a.\xDD`@\x80Q\x80\x93` \x82\x01\x95\x7FnextSequenceAck/ports/\0\0\0\0\0\0\0\0\0\0\x87Ra1}\x81Q\x80\x92` `6\x87\x01\x91\x01a&^V[\x82\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`6\x82\x01Ra/\xB2\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[` a\t\xABs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93a1\xDC\x93a+\xDAV[\x81\x01`\x06\x81R\x03\x01\x90 T\x16\x80\x15a1\xF1W\x90V[`\x04`@Q\x7F\xC6\x83\x0C\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90`@Q\x91`\x80\x83\x01`@R`\x0Fo0123456789abcdef`\x0FR`\x02\x84\x01\x91`(\x83R`\0`J\x86\x01R``\x1B\x90`\x01`\0[\x80\x80\x01\x87\x01`\"\x85\x83\x1A\x85\x81\x16Q`#\x84\x01S`\x04\x1CQ\x91\x01S\x01`\x14\x81\x14a2\x81W`\x01\x90a2VV[PPPa0x`\x02\x82Q\x01\x91R\x82RV[a2\xC0` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a&^V[\x81\x01`\x06\x81R\x03\x01\x90 T\x163\x14\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82Q\x16\x15\x91\x82a2\xEAWPP\x90V[` \x01Q\x16\x15\x91\x90PV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x82Q\x16\x92\x80\x82Q\x16\x80\x85\x11\x94\x85\x15a3\x1BW[PPPPP\x90V[\x14\x93P\x90\x91\x83a33W[PPP8\x80\x80\x80\x80a3\x13V[\x81\x92\x93P\x90` \x80\x92\x01Q\x16\x92\x01Q\x16\x11\x158\x80\x80a3&V[\x90a.\xDD`A`@Q\x80\x93` \x82\x01\x95\x7FnextSequenceSend/ports/\0\0\0\0\0\0\0\0\0\x87Ra3\x94\x81Q\x80\x92` `7\x87\x01\x91\x01a&^V[\x82\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`7\x82\x01Ra3\xCF\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[\x01\x03`!\x81\x01\x84R\x01\x82a%\x8EV[`D\x90a3\xF8g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa&[\x94\x95\x16a7GV[`@Q\x94\x85\x92\x7Freceipts/ports/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x85\x01Ra48\x81Q\x80\x92` `/\x88\x01\x91\x01a&^V[\x83\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`/\x82\x01Ra4t\x82Q\x80\x93` `9\x85\x01\x91\x01a&^V[\x01\x7F/sequences/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`9\x82\x01Ra4\xAE\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[\x01\x03`$\x81\x01\x84R\x01\x82a%\x8EV[`Aa&[\x91`@Q\x93\x84\x91\x7FnextSequenceRecv/ports/\0\0\0\0\0\0\0\0\0` \x84\x01Ra3\x94\x81Q\x80\x92` `7\x87\x01\x91\x01a&^V[\x91\x90\x91\x82Q\x15a6>Wa5]a5Qa\x02\xE9a\"\x98a5Aa5H``\x87\x01a5-\x81\x89a(\xA3V[\x93\x90`\x80\x8A\x01\x94a\x01va\x01l\x87\x8Da(\xA3V[P\x87a(\xA3V[\x94\x90\x91\x87a(\xA3V[\x93\x90\x91a\x02\xE1\x88a)\xEBV[\x80Q` \x80\x92\x01 \x90`\0\x94\x82\x86R\x85\x82R`@\x92\x83\x87 Ta6\x15W\x82\x87\x85Q\x80\x85Qa5\x8E\x81\x83\x87\x8A\x01a&^V[\x81\x01\x03\x90`\x02Z\xFA\x15a6\x0BW\x90a6\x06\x92\x91\x84\x88\x7Fw\x87\x88\x13\x12s\xC1v\x94\x06\xF3\xB4*$\x1A&m\x9C\\\x1C\xA3\x9B+3\xA3\xB1\xA8\xEF\xB1\x08\x0B\xC5\x98\x99Q\x82Q\x86\x81\x01\x91\x82R\x86\x81Ra5\xDB\x81a%rV[Q\x90 \x92\x81R\x80\x85R Ua5\xF9\x84Q\x95\x85\x87\x96\x87R\x86\x01\x90a+\x01V[\x91\x84\x83\x03\x90\x85\x01Ra'\x88V[\x03\x90\xA1V[\x83Q=\x88\x82>=\x90\xFD[`\x04\x84Q\x7F\\mw\x11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F$0\xF4\x03\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`G\x90a6\x82g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa&[\x94\x95\x16a7GV[`@Q\x94\x85\x92\x7Fcommitments/ports/\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x85\x01Ra6\xC2\x81Q\x80\x92` `2\x88\x01\x91\x01a&^V[\x83\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`2\x82\x01Ra6\xFE\x82Q\x80\x93` `<\x85\x01\x91\x01a&^V[\x01\x7F/sequences/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`<\x82\x01Ra78\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[\x01\x03`'\x81\x01\x84R\x01\x82a%\x8EV[\x90`@Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x80\x82\x01\x93`\xA0\x83\x01`@R`\0\x85R\x93[\x01\x92`\n\x90\x81\x81\x06`0\x01\x85S\x04\x92\x83\x15a7\xBAW\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90a7~V[\x92P`\x80\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x92\x03\x01\x92\x01\x91\x82RV"; - /// The bytecode of the contract. - #[cfg(feature = "providers")] - pub static IBCPACKET_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__BYTECODE); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R`\x046\x10\x15a\0\x12W`\0\x80\xFD[`\0\x805`\xE0\x1C\x80c\x07\x03w\x04\x14a \xA7W\x80c1\x97?\0\x14a\x1E\xADW\x80c;\xC33\x9F\x14a\x1E\x98W\x80cF\x80p\x86\x14a\x1E?W\x80cW\x17\xBC\xF5\x14a\x1D\xC0W\x80c[=\xE2`\x14a\x1C\x1CW\x80cl\xF0-?\x14a\x16\x84W\x80c~\xB7\x892\x14a\x16\x11W\x80c\x83\x9D\xF9E\x14a\x15\xCAW\x80c\x86i\xFD\x15\x14a\x15qW\x80c\x99\x04\x91\xA5\x14a\x14\xF2W\x80c\x99\x0C8\x88\x14a\x14\x99W\x80c\xA0O\x91\xB2\x14a\x0B\xC6W\x80c\xA9U\r\xAC\x14a\x0BJW\x80c\xC28\x01\x05\x14a\n\xBEW\x80c\xCA\x95fg\x14a\t\xD2W\x80c\xD1){\x8D\x14a\t@Wc\xE8\xF0\x88\xC6\x14a\0\xE3W`\0\x80\xFD[4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x90\x80\x826\x01\x12a\t9Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x06\x89\x80a(pV[\x01a)\xEBV[\x16\x15\x15\x80a\x08tW[a\x08JWc;\x9A\xCA\0\x80B\x02\x90B\x82\x04\x14B\x15\x17\x15a\x08\x1DWa\x01\0\x90\x85a\x02y\x83a\x02>\x8B\x80a(pV[\x16\x15\x15\x90\x81a\x08\0W[Pa\x07\xD6Wa\x02\xBD\x86\x88\x8Aa\x03\x02a\x02\xF7a\x02\xF1a\x02\xE9a\x02\xA7`$\x8B\x01\x87a(\xA3V[\x98\x90\x97a\x02\xB4\x88\x80a(pV[\x90\x81\x01\x90a(\xA3V[\x92\x90a\x02\xCCa\x01\xDA\x89\x80a(pV[\x93\x90\x91a\x02\xE1a\x02\xDC\x8B\x80a(pV[a)\xEBV[\x956\x91a&\tV[\x926\x91a&\tV[\x90a6hV[\x95a\x02>\x84\x80a(pV[a\x03\x11`\xC0a\x02>\x85\x80a(pV[\x90\x8B\x83a\x03:a\x030a\x03)`\xE0a\x02>\x8A\x80a(pV[\x97\x80a(pV[`\xA0\x81\x01\x90a(\xA3V[\x90\x81`@Q\x92\x83\x92\x837\x81\x01\x83\x81R\x03\x90`\x02Z\xFA\x15a\x07\xCBW\x8B\x93a\x03\xE5a\x03\xF6\x93a\x03\xB9\x86Q`@Q\x94\x85\x93\x8A\x85\x01\x97\x88\x92`8\x94\x92\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x92\x83\x80\x92`\xC0\x1B\x16\x86R`\xC0\x1B\x16`\x08\x85\x01R`\xC0\x1B\x16`\x10\x83\x01R`\x18\x82\x01R\x01\x90V[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x83R\x82a%\x8EV[`@Q\x92\x83\x92\x83\x92Q\x92\x83\x91a&^V[\x81\x01\x03\x90`\x02Z\xFA\x15a\x07\xC0Wa\x04'\x94`D\x8BQ\x95`@Q\x96\x8B\x88\x01R\x8A\x87Ra\x04 \x87a%rV[\x01\x90a/\xD9V[\x15a\x07\x96WT`\x08\x1C`\xFF\x16`\x03\x81\x10\x15a\x07iW`\x01\x81\x03a\x06uWPa\x04pa\x04ja\x02\xE9a\x04[a\x01H\x87\x80a(pV[\x92\x90a\x02\xCCa\x01b\x89\x80a(pV[\x90a3\xDEV[\x82\x81Q\x91\x01 \x80\x85R\x84\x83R`@\x85 Ta\x06KW\x84R\x83\x82R`\x01`@\x85 U[\x83\x80a\x05$s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x04\xE2a\x04\xDCa\x04\xBFa\x01H\x8A\x80a(pV[a\x02\xE9a\x04\xD2a\x01b\x8D\x80\x96\x95\x96a(pV[\x94\x90\x926\x91a&\tV[\x90a1\xB8V[\x16a\x04\xED\x87\x80a(pV[`@Q\x94\x85\x80\x94\x81\x93\x7F#\x01\xC6\xF5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R3\x90`\x04\x84\x01a-\xD7V[\x03\x92Z\xF1\x91\x82\x15a\x06@W\x85\x92a\x05\xA0W[PP\x7F4oCQ\xEE\x86]\x86\xA6y\xD0\x0F9\x95\xF0R\x0F\x80=:\"v\x04\xAF\x08C\x0E&\xE94Zz\x92\x81a\x05l\x92Qa\x05\x87W[P\x80a(pV[\x90a\x05\x81`@Q\x92\x82\x84\x93\x84R\x83\x01\x90a+\x01V[\x03\x90\xA1\x80\xF3[a\x05\x9A\x90a\x05\x95\x83\x80a(pV[a5\x03V[8a\x05eV[\x90\x91P=\x80\x86\x84>a\x05\xB2\x81\x84a%\x8EV[\x82\x01\x91\x83\x81\x84\x03\x12a\x068W\x80Q\x91\x82\x11a\x068W\x01\x92\x81`\x1F\x85\x01\x12\x15a\x06=\x90\xFD[`\x04`@Q\x7F\xA4k\xBA\xB4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x02\x03a\x07?Wa\x06\xA8a\x06\xA2a\x06\x8Fa\x01H\x86\x80a(pV[a\x02\xE9a\x04\xD2a\x01b\x89\x80\x96\x95\x96a(pV[\x90a4\xBDV[\x82\x81Q\x91\x01 \x84R\x83\x82R\x80`@\x85 T\x16\x81a\x06\xC8a\x02\xDC\x86\x80a(pV[\x16\x81\x03a\x07\x15Wa\x06\xD9\x82\x91a*\0V[\x16a\x07\0a\x06\xA2a\x06\xEDa\x01H\x87\x80a(pV[a\x02\xE9a\x04\xD2a\x01b\x8A\x80\x96\x95\x96a(pV[\x83\x81Q\x91\x01 \x85R\x84\x83R`@\x85 Ua\x04\x92V[`\x04`@Q\x7F@*\x84\xA3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7Fl\xC7\x9C\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`$\x85\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`!`\x04R\xFD[`\x04`@Q\x7F\x14 \x992\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`@Q=\x8B\x82>=\x90\xFD[`@Q=\x84\x82>=\x90\xFD[`\x04`@Q\x7F\xA4\x82\x12p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x85\x80a\x08\x12\x84a\x02>\x8C\x80a(pV[\x16\x91\x16\x10\x158a\x02\x83V[`$\x88\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x11`\x04R\xFD[`\x04`@Q\x7F\xA9\xCF\xB7\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[P\x83a\x08\x85`\xE0a\x02>\x89\x80a(pV[\x16C\x10\x15a\x02MV[`\x04`@Q\x7F\x8C\xA9\x89\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`$\x88\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`!`\x04R\xFD[`\x04`@Q\x7Fwf\x8E\xD1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xDA\x88\\\x1D\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x82\x80\xFD[\x80\xFD[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\t=W` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\t\xBE\x82a\t\xAB6`\x04\x88\x01a&@V[\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a&^V[\x81\x01`\x03\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[P4a\t=W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`@\x816\x01\x12a\n\xBAW`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11a\n\xB6Wa\x01 \x82`\x04\x01\x93\x836\x03\x01\x12a\n\xB6W`$5\x90\x81\x11a\n\xB6W6`#\x82\x01\x12\x15a\n\xB6Wa\nva\nVa\n{\x926\x90`$\x81`\x04\x015\x91\x01a&\tV[\x92a\npa\x01\x98`\x84a\nh3a2\x1BV[\x93\x01\x87a(\xA3V[\x90a+\xDAV[a2\x92V[\x15a\n\x8CWa\n\x89\x91a5\x03V[\x80\xF3[`\x04`@Q\x7F\xCC\x12\xCE\xF6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x83\x80\xFD[P\x80\xFD[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\t=Wa\x0BFa\x01\xBBa\x0B2a\x0B\x1C` a\t\xAB6`\x04\x89\x01a&@V[\x81\x01`\x02\x81R\x03\x01\x90 `@Q\x92\x83\x80\x92a&\xD4V[`@Q\x91\x82\x91` \x83R` \x83\x01\x90a'\x88V[\x03\x90\xF3[P4a\t=W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=Wa\x0BF`@Qa\x0B\x88\x81a%rV[`\x03\x81R\x7Fibc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R`@Q\x91\x82\x91` \x83R` \x83\x01\x90a'\x88V[P4a\t=Wa\x0B\xD56a%\x0EV[a\x0B\xDF\x81\x80a(pV[a\x0C\x01a\x0B\xF1` \x92\x83\x81\x01\x90a(\xA3V[a\x01va\x01la\x01\xDA\x87\x80a(pV[a\x0C\x14a\x01\x9Fa\x01\x98a\x01H\x86\x80a(pV[a\x0C+`@Qa\x01\x9F\x81a\x01\xBB\x81`\x01\x88\x01a&\xD4V[\x03a\x14oWa\x0CCa\x01\x9Fa\x01\x98a\x01b\x86\x80a(pV[a\x0CZ`@Qa\x01\x9F\x81a\x01\xBB\x81`\x02\x88\x01a&\xD4V[\x03a\x14EWa\x0Cna\x02\x0F`\x03\x83\x01a(\xF4V[`\xFF`\x02\x82\x01T\x16`\x04\x81\x10\x15a\x14\x18W`\x03\x03a\x08\x8EWa\x0C\xBBa\x02\xF1a\x02\xE9a\x0C\x9Ca\x01\x8F\x88\x80a(pV[\x92\x90a\x0C\xABa\x01\xDA\x8A\x80a(pV[\x93\x90\x91a\x02\xE1a\x02\xDC\x8C\x80a(pV[\x83\x81Q\x91\x01 \x80\x86R\x85\x84R`@\x86 T\x80\x15a\x13\xEEWa\x01\0\x90\x86\x88a\x0C\xE6\x84a\x02>\x84\x80a(pV[a\x0C\xF5`\xC0a\x02>\x85\x80a(pV[\x90\x89\x83a\r\ra\x030a\x03)`\xE0a\x02>\x8A\x80a(pV[\x90\x81`@Q\x92\x83\x92\x837\x81\x01\x83\x81R\x03\x90`\x02Z\xFA\x15a\x07\xCBW\x89\x93a\x03\xE5a\r\x8C\x93a\x03\xB9\x86Q`@Q\x94\x85\x93\x8A\x85\x01\x97\x88\x92`8\x94\x92\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x92\x83\x80\x92`\xC0\x1B\x16\x86R`\xC0\x1B\x16`\x08\x85\x01R`\xC0\x1B\x16`\x10\x83\x01R`\x18\x82\x01R\x01\x90V[\x81\x01\x03\x90`\x02Z\xFA\x15a\x13\xE3W\x87Q`@Q\x87\x81\x01\x91\x82R\x87\x81Ra\r\xB0\x81a%rV[Q\x90 \x03a\x13\xB9Wa\r\xEA\x92`@Qa\r\xCD\x81a\x01\xBB\x81\x85a&\xD4V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x85\x91a,\xF4V[\x16`@\x88\x01\x92\x87`@Q\x80\x93\x7FK\x0B\xBD\xC4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82R```\x04\x83\x01R\x81\x80a\x0E/`d\x82\x01\x89a-aV[a\x0E<`$\x83\x01\x8Ba*\xD7V[\x03\x91Z\xFA\x91\x82\x15a\x13\xAEW\x8A\x92a\x13sW[Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x92\x16\x80\x15a\x13IW\x82a\x0Ep\x83a\x02>\x8D\x80a(pV[\x16\x15\x80a\x130W[a\x13\x06W\x82a\x0E\x8B\x83a\x02>\x8D\x80a(pV[\x16\x15\x15\x90\x81a\x12\xECW[Pa\x12\xC2Wa\x0E\xB8a\x0E\xB36`\xC0a\x0E\xAD\x8D\x80a(pV[\x01a,\xBEV[a2\xD1V[\x15\x80a\x12\x99W[a\x12oW`\xFF\x87T`\x08\x1C\x16`\x03\x81\x10\x15a\x12BW`\x02\x81\x03a\x10\xBBWPP`\x80\x88\x01\x90a\x0E\xEC\x82a)\xEBV[\x90\x80a\x0E\xFBa\x02\xDC\x8C\x80a(pV[\x16\x91\x16\x11\x15a\x10\x91Wa\x0F\x84\x92a\x0F\x14\x88\x8A\x01\x8Aa(\xA3V[\x91a\x0FDa\x0F>\x8Ca\x06\xA2a\x01ba\x02\xE9a\x04\xD2a\x0F5a\x01H\x86\x80a(pV[\x93\x90\x95\x80a(pV[\x94a)\xEBV[\x94\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`@Q\x96`\xC0\x1B\x16\x8B\x87\x01R`\x08\x86Ra\x0F\x7F\x86a%rV[a/\xD9V[\x15a\x07\x96W\x82`\x04\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x88\x95T\x16\x17\x90U[\x82R\x81\x83R\x81`@\x81 Ua\x0F\xEFa\x04\xDCa\x0F\xDCa\x0F\xD3\x87\x80a(pV[\x86\x81\x01\x90a(\xA3V[a\x02\xE9a\x04\xD2a\x01\xDA\x8A\x80\x96\x95\x96a(pV[\x16a\x0F\xFA\x84\x80a(pV[\x90\x80;\x15a\t9Wa\x10A\x83\x92\x91\x83\x92`@Q\x94\x85\x80\x94\x81\x93\x7FR\xC7\x15}\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R3\x90`\x04\x84\x01a-\xD7V[\x03\x92Z\xF1\x80\x15a\x07\xCBWa\x10}W[PPa\x05l\x82\x7F\xA6\xCC\xDF\xD0b\x94\xBB\xB4\x81\xB7\xB0\x8A\xB1p\xC17|\xCC\xDC\xAA\x9E5\xB2\xE3F\xA3n\xE3*\x1F\x8F\x06\x93a(pV[a\x10\x86\x90a%^V[a\t9W\x828a\x10PV[`\x04`@Q\x7F\xE7X\xEF\x82\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x01\x91\x93\x94\x95\x97P\x14`\0\x14a\x07?W\x86\x92\x89a\x04j\x93a\x11\xEB\x8Ba\x11\x16a\x02\xE9a\x02\xDCa\x10\xEB\x8B\x85\x01\x85a(\xA3V[\x9A\x90\x94a\x10\xFBa\x01H\x82\x80a(pV[\x94\x90a\x02\xE1a\x11\ra\x01b\x85\x80a(pV[\x96\x90\x94\x80a(pV[a\x11\xDC\x8Ba\x113`@Qa\x11.\x81a\x01\xBB\x81\x8Da&\xD4V[a,\xF4V[\x16\x97`\x06\x88\x01T\x16\x96`\x05a\x11\xCB`@Q\x9D\x8E\x9C\x8D\x9B\x8C\x9A\x7F\x99\x9F\xBB\xB3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x8CR`\x04\x8C\x01Ra\x11\x8Fa\x11\x84a\x01\x04\x8D\x01\x88a-aV[\x93`$\x8D\x01\x90a*\xD7V[`d\x8B\x01R\x8A`\x84\x8B\x01R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x97\x88\x8B\x84\x03\x01`\xA4\x8C\x01Ra*\x98V[\x91\x85\x88\x84\x03\x01`\xC4\x89\x01R\x01a-aV[\x91\x84\x83\x03\x01`\xE4\x85\x01Ra'\x88V[\x03\x92Z\xF1\x90\x81\x15a\x127W\x86\x91a\x12\nW[P\x15a\x07\x96W\x84\x91a\x0F\xB5V[a\x12*\x91P\x84=\x86\x11a\x120W[a\x12\"\x81\x83a%\x8EV[\x81\x01\x90a/\xC1V[8a\x11\xFDV[P=a\x12\x18V[`@Q=\x88\x82>=\x90\xFD[`$\x8B\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`!`\x04R\xFD[`\x04`@Q\x7F\x12\xC5\x1Cd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[Pa\x12\xBDa\x12\xAD6`\xC0a\x0E\xAD\x8D\x80a(pV[a\x12\xB76\x87a,\xBEV[\x90a2\xF5V[a\x0E\xBFV[`\x04`@Q\x7F\x85Q\xD25\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x82a\x12\xFD\x83a\x02>\x8D\x80a(pV[\x16\x10\x158a\x0E\x95V[`\x04`@Q\x7FW4@\x0C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[Pa\x13Da\x0E\xB36`\xC0a\x0E\xAD\x8E\x80a(pV[a\x0ExV[`\x04`@Q\x7F\x9Bl\x9A\xDC\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90\x91P\x87\x81\x81=\x83\x11a\x13\xA7W[a\x13\x8B\x81\x83a%\x8EV[\x81\x01\x03\x12a\x13\xA3Wa\x13\x9C\x90a,HV[\x908a\x0ENV[\x89\x80\xFD[P=a\x13\x81V[`@Q=\x8C\x82>=\x90\xFD[`\x04`@Q\x7FC\x8A\x8D\x16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`@Q=\x89\x82>=\x90\xFD[`\x04`@Q\x7FM|\xFCW\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`$\x86\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`!`\x04R\xFD[`\x04`@Q\x7F\x93\x87\xF5\xD0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xA6\x07`C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[P4a\t=W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W` `@Q\x7F\x9B\x98 Hj\x05\xC0\x19>\xFB!Ll+\xA8\xFC\xE0,Z\\\x84\xAA\x05\x7F\x81\x99\xC9\x9F\x13\xFF\x93\x9B\x81R\xF3[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\t=W` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x15]\x82a\t\xAB6`\x04\x88\x01a&@V[\x81\x01`\x01\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[P4a\t=W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W` `@Q\x7F\xC01\xB2\x0C+:\x8A\x1F\xBF\xA9\xCC\x02*\xA3Gt\x89\xD4\xB8\xC9\x1F\x0Ef~\x90\x0FZ\xD4M\xAF\x8Bm\x81R\xF3[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`@` \x91`\x045\x81R\x80\x83R T`@Q\x90\x81R\xF3[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\t=W` a\x16fa\x11.6`\x04\x86\x01a&@V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x16\x81R\xF3[P4a\t=W`\xA0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\n\xBAWa\x16\xD4\x906\x90`\x04\x01a(-V[`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC6\x01\x12a\t9Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`d5\x16`d5\x03a\x1A\xC6W`\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\n\xB6Wa\x173\x906\x90`\x04\x01a(-V[a\x17?\x92\x91\x923a2\x1BV[\x92a\x17Wa\nva\x17Q6\x86\x89a&\tV[\x86a+\xDAV[\x15a\n\x8CWa\x01\xBBa\x17\x87a\x17{a\x02\x0F`\x03a\x17u\x88\x8B\x8Ba.\x0BV[\x01a(\xF4V[`@Q\x92\x83\x80\x92a&\xD4V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x17\xA5\x82a,\xF4V[\x16\x90`@Q\x90\x7F2\x96\x81\xD0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82R` `\x04\x83\x01R`@\x82\x80a\x17\xE6`$\x82\x01\x85a'\x88V[\x03\x81\x86Z\xFA\x91\x82\x15a\x07\xC0W\x89\x92a\x1B\xBDW[Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF` \x83\x01Q\x16\x15a\x1B\x93Wa\x18\x1Aa\x0E\xB36a,]V[\x15\x80a\x1B{W[a\x1BQWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92a\x18v` \x93\x92\x84\x93`@Q\x96\x87\x95\x86\x94\x85\x94\x7FK\x0B\xBD\xC4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x86R```\x04\x87\x01R`d\x86\x01\x90a'\x88V[\x92\x82\x81Q\x16`$\x86\x01R\x01Q\x16`D\x83\x01R\x03\x91Z\xFA\x80\x15a\x13\xE3W\x87\x90a\x1B\x0CW[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91P\x16\x80\x15a\x13IWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`d5\x16\x15\x15\x90\x81a\x1A\xF5W[Pa\x1A\xCBWa\x18\xDAa\x18\xD46\x85\x88a&\tV[\x85a3MV[\x86R\x85` Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@\x87 T\x16\x94g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x19\x02\x87a*\0V[\x16a\x19\x17a\x19\x116\x87\x85a&\tV[\x87a3MV[\x88R\x87` R`@\x88 U`$5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x94\x85\x83\x03a\x1A\xC6W`D5\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16\x93\x84\x81\x03a\x1A\xC6W\x8A\x90` \x82`@Q\x8A\x8A\x827\x80\x8B\x81\x01\x83\x81R\x03\x90`\x02Z\xFA\x15a\x1A\xB9W\x81Q`@Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`d5`\xC0\x90\x81\x1B\x82\x16` \x80\x85\x01\x91\x82R\x97\x82\x1B\x83\x16`(\x85\x01R\x94\x90\x1B\x16`0\x82\x01R`8\x81\x01\x91\x90\x91Ra\x19\xD3\x91\x90a\x03\xE5\x81`X\x81\x01a\x03\xB9V[\x81\x01\x03\x90`\x02Z\xFA\x15a\x1A\xAEW\x92a\x1Ak\x95\x92a\x1Ay\x7F*\x89\xCA\x0E\x96*a\xB8\x11Uu\xDAc\xF5K\xB2I\xCF\x017\x94\x7F\xC9\xAB\x01j\xC9\xDF\x88\xAA4~\x98\x96\x93a\x1A\xA3\x96\x8B`@\x8E` \x9Fa\x1AC\x90Q\x83Q` \x81\x01\x91\x82R` \x81Ra\x1A3\x81a%rV[Q\x90 \x93\x8Da\x02\xF16\x88\x8Aa&\tV[` \x81Q\x91\x01 \x81R\x8F\x81\x90R U`@Q\x99\x8A\x99\x8D\x8BR`\xE0\x8F\x8C\x01R`\xE0\x8B\x01\x90a'\x88V[\x91\x89\x83\x03`@\x8B\x01Ra*\x98V[\x93``\x87\x01R`\x80\x86\x01Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`d5\x16`\xA0\x86\x01R\x84\x83\x03`\xC0\x86\x01Ra*\x98V[\x03\x90\xA1`@Q\x90\x81R\xF3[`@Q=\x8A\x82>=\x90\xFD[P`@Q\x90=\x90\x82>=\x90\xFD[`\0\x80\xFD[`\x04`@Q\x7F\xE6'|\xE0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`d5\x16\x11\x158a\x18\xC1V[P` \x81=` \x11a\x1BIW[\x81a\x1B&` \x93\x83a%\x8EV[\x81\x01\x03\x12a\x1BEWa\x1B@g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91a,HV[a\x18\x99V[\x86\x80\xFD[=\x91Pa\x1B\x19V[`\x04`@Q\x7F\xC8\xE1\xD2d\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[Pa\x1B\x8Ea\x1B\x886a,]V[\x83a2\xF5V[a\x18!V[`\x04`@Q\x7F\xE5=N7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90\x91P`@\x81=`@\x11a\x1C\x14W[\x81a\x1B\xD9`@\x93\x83a%\x8EV[\x81\x01\x03\x12a\x1C\x10Wa\x1C\x04` `@Q\x92a\x1B\xF3\x84a%rV[a\x1B\xFC\x81a,HV[\x84R\x01a,HV[` \x82\x01R\x908a\x17\xF9V[\x88\x80\xFD[=\x91Pa\x1B\xCCV[P4a\t=W`\x04a\x1Cl\x91a\x1C16a'\xCBV[`@\x94\x91\x94Q\x90\x81\x86Q\x96\x81\x88a\x1CO` \x9A\x8B\x97\x88\x80\x96\x01a&^V[\x81\x01`\x05\x81R\x03\x01\x90 \x82`@Q\x94\x83\x86\x80\x95Q\x93\x84\x92\x01a&^V[\x82\x01\x90\x81R\x03\x01\x90 \x90\x81T\x93`\xFF\x80\x86\x16\x95`\x08\x1C\x16\x90`@Q\x92a\x1C\x91\x84a%rV[`@Qa\x1C\xA5\x81a\x01\xBB\x81`\x01\x8A\x01a&\xD4V[\x84Ra\x1C\xE3`@Q\x95a\x1C\xC6\x87a\x1C\xBF\x81`\x02\x85\x01a&\xD4V[\x03\x88a%\x8EV[\x83\x86\x01\x96\x87Ra\x1C\xDC`@Q\x80\x99\x81\x93\x01a&\xD4V[\x03\x87a%\x8EV[`@Q\x96`\x05\x81\x10\x15a\x1D\x93W\x87R`\x03\x83\x10\x15a\x1DfWP\x92a\x1D'\x86\x95\x93a\x1DX\x93a\x0BF\x96\x88\x01R`\x80`@\x88\x01RQ`@`\x80\x88\x01R`\xC0\x87\x01\x90a'\x88V[\x90Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x86\x83\x03\x01`\xA0\x87\x01Ra'\x88V[\x90\x83\x82\x03``\x85\x01Ra'\x88V[\x80\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`$\x92R`!`\x04R\xFD[`$\x82\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`!`\x04R\xFD[P4a\t=W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\t=W` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\x1E+\x82a\t\xAB6`\x04\x88\x01a&@V[\x81\x01`\x06\x81R\x03\x01\x90 T\x16`@Q\x90\x81R\xF3[P4a\t=W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=W` `@Q\x7F\x8E\xF0z\xFD\xA4\xDE\xC4\xDCf\xE7\xD1\x8F\xC0\xE3\xA7\x13\xF7J\x11\xB3:qB,\x06\xA4\xB5\xE6#\xC3\xB2\x1A\x81R\xF3[P4a\t=Wa\x0BFa\x0B2a\np6a'\xCBV[P4a\t=W` \x90\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t=Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\t9W\x83a\t\xABa\x1F\x04\x926\x90`\x04\x01a&@V[\x81\x01`\x04\x81R\x03\x01\x90 \x92`@Q\x92a\x1F(\x84a\x1F!\x81\x88a&\xD4V[\x03\x85a%\x8EV[`\xFF`\x02\x86\x01T\x16\x92`@Q``\x81\x01\x81\x81\x10\x83\x82\x11\x17a xW\x80`@Ra\x1F\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA0\x83a\x1Fy\x84`\x03\x8D\x01a&\xD4V[\x03\x01\x82a%\x8EV[\x81R`@Q\x91a\x1F\x9F\x83a\x1F\x98\x81`\x04\x8C\x01a&\xD4V[\x03\x84a%\x8EV[\x84\x82\x01\x92\x83R`@Q\x97\x85\x89\x01\x90\x89\x82\x10\x83\x83\x11\x17a xW\x81`\x06\x92`@Ra\x1F\xF1\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x8Ca\x1Fy\x84`\x05\x87\x01a&\xD4V[\x8AR`@\x84\x01\x99\x8AR\x01T\x16\x94a \x13`@Q\x97`\x80\x89R`\x80\x89\x01\x90a'\x88V[\x93`\x04\x82\x10\x15a\x1DfWP\x84\x92a I\x88\x99\x95\x93a W\x93a n\x98\x8B\x01R\x89\x85\x03`@\x8B\x01RQ``\x85R``\x85\x01\x90a'\x88V[\x90Q\x83\x82\x03\x85\x85\x01Ra'\x88V[\x92Q\x90`@\x81\x85\x03\x91\x01RQ\x91\x81\x81R\x01\x90a'\x88V[\x90``\x83\x01R\x03\x90\xF3[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[P4a\t=Wa \xB66a%\x0EV[a \xC0\x81\x80a(pV[a \xD2a\x0B\xF1` \x92\x83\x81\x01\x90a(\xA3V[a \xE5a\x01\x9Fa\x01\x98a\x01H\x86\x80a(pV[a \xFC`@Qa\x01\x9F\x81a\x01\xBB\x81`\x01\x88\x01a&\xD4V[\x03a\x14oWa!\x14a\x01\x9Fa\x01\x98a\x01b\x86\x80a(pV[a!+`@Qa\x01\x9F\x81a\x01\xBB\x81`\x02\x88\x01a&\xD4V[\x03a\x14EWa!?a\x02\x0F`\x03\x83\x01a(\xF4V[\x90`\xFF`\x02\x83\x01T\x16`\x04\x81\x10\x15a\x14\x18W`\x03\x03a\x08\x8EWa!na\x02\xF1a\x02\xE9a\x0C\x9Ca\x01\x8F\x88\x80a(pV[\x83\x81Q\x91\x01 \x90\x81\x86R\x85\x84R`@\x86 T\x80\x15a\x13\xEEWa!\x96a\x01\0a\x02>\x88\x80a(pV[\x87a!\xA6`\xC0a\x02>\x8A\x80a(pV[a!\xB5`\xE0a\x02>\x8B\x80a(pV[\x92\x88\x83a!\xC5a\x030\x8D\x80a(pV[\x90\x81`@Q\x92\x83\x92\x837\x81\x01\x83\x81R\x03\x90`\x02Z\xFA\x15a\x07\xCBW\x88\x93a\x03\xE5a\"D\x93a\x03\xB9\x86Q`@Q\x94\x85\x93\x8A\x85\x01\x97\x88\x92`8\x94\x92\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x92\x83\x80\x92`\xC0\x1B\x16\x86R`\xC0\x1B\x16`\x08\x85\x01R`\xC0\x1B\x16`\x10\x83\x01R`\x18\x82\x01R\x01\x90V[\x81\x01\x03\x90`\x02Z\xFA\x15a\x127W\x86Q`@Q\x86\x81\x01\x91\x82R\x86\x81Ra\"h\x81a%rV[Q\x90 \x03a\x13\xB9Wa\"}`@\x86\x01\x86a(\xA3V[\x93a\"\x9Ea\x02\xE9a\x02\xDCa\"\x98\x8Aa\x10\xFBa\x01H\x82\x80a(pV[\x90a.\xE3V[\x86\x88\x01\x95\x87\x8Aa\"\xAE\x89\x8Ca(\xA3V[\x90\x81`@Q\x92\x83\x92\x837\x81\x01\x83\x81R\x03\x90`\x02Z\xFA\x15a\x07\xC0Wa\"\xED\x93\x8AQ\x93`@Q\x94\x8A\x86\x01R\x89\x85Ra\"\xE3\x85a%rV[``\x8B\x01\x90a/\xD9V[\x15a\x07\x96WT`\x08\x1C`\xFF\x16`\x03\x81\x10\x15a\x14\x18W`\x02\x14a$\x8CW[\x84R\x83\x82R\x83`@\x81 Us\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa#=a\x04\xDCa\x0F\xDCa\x0F\xD3\x87\x80a(pV[\x16\x84a#I\x85\x80a(pV[\x91a#T\x84\x87a(\xA3V[\x91\x90\x93\x81;\x15a\n\xB6W\x83a#\xA4\x91a#\xD4`@Q\x97\x88\x96\x87\x95\x86\x94\x7F\xFB\x8BS.\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x86R```\x04\x87\x01R`d\x86\x01\x90a+\x01V[\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x85\x84\x03\x01`$\x86\x01Ra*\x98V[3`D\x83\x01R\x03\x92Z\xF1\x80\x15a\x06@Wa$IW[P\x91a\x05\x81a$<\x92a$'\x7FGG\x14Pv^n\x1B\x0B\x05[\xA2\xA1\xDE\x04\xD4\xCEq\xF7x\xC9+0nrP\x83\xEB\x12\r\xFD\x89\x95a$!\x85\x80a(pV[\x94a(\xA3V[\x90`@Q\x95\x86\x95`@\x87R`@\x87\x01\x90a+\x01V[\x92\x85\x84\x03\x90\x86\x01Ra*\x98V[a$<\x92a$'\x7FGG\x14Pv^n\x1B\x0B\x05[\xA2\xA1\xDE\x04\xD4\xCEq\xF7x\xC9+0nrP\x83\xEB\x12\r\xFD\x89\x95\x93\x96a$\x80a\x05\x81\x94a%^V[\x96\x93\x95PP\x92Pa#\xE9V[a$\xA5a$\x9Fa\x0F\xDCa\x0F\xD3\x87\x80a(pV[\x90a17V[\x85R\x84\x83Rg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80`@\x87 T\x16\x81a$\xC8a\x02\xDC\x88\x80a(pV[\x16\x81\x03a\x07\x15Wa$\xD8\x90a*\0V[\x16a$\xFFa$\x9Fa$\xECa\x01\x8F\x88\x80a(pV[a\x02\xE9a\x04\xD2a\x01\xDA\x8B\x80\x96\x95\x96a(pV[\x86R\x85\x84R`@\x86 Ua#\nV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x90` \x82\x82\x01\x12a\x1A\xC6W`\x045\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x1A\xC6W\x82`\xC0\x92\x03\x01\x12a\x1A\xC6W`\x04\x01\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a xW`@RV[`@\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a xW`@RV[\x90`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a xW`@RV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a xW`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16` \x01\x90V[\x92\x91\x92a&\x15\x82a%\xCFV[\x91a&#`@Q\x93\x84a%\x8EV[\x82\x94\x81\x84R\x81\x83\x01\x11a\x1A\xC6W\x82\x81` \x93\x84`\0\x96\x017\x01\x01RV[\x90\x80`\x1F\x83\x01\x12\x15a\x1A\xC6W\x81` a&[\x935\x91\x01a&\tV[\x90V[`\0[\x83\x81\x10a&qWPP`\0\x91\x01RV[\x81\x81\x01Q\x83\x82\x01R` \x01a&aV[\x90`\x01\x82\x81\x1C\x92\x16\x80\x15a&\xCAW[` \x83\x10\x14a&\x9BWV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[\x91`\x7F\x16\x91a&\x90V[\x80T`\0\x93\x92a&\xE3\x82a&\x81V[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a'KWP`\x01\x14a'\nW[PPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a'7WPPPP\x01\x01\x908\x80\x80\x80\x80a'\x03V[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a'\x1FV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x86\x85\x01RPPP\x90\x15\x15`\x05\x1B\x01\x01\x91P8\x80\x80\x80\x80a'\x03V[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F` \x93a'\xC4\x81Q\x80\x92\x81\x87R\x87\x80\x88\x01\x91\x01a&^V[\x01\x16\x01\x01\x90V[\x90`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x83\x01\x12a\x1A\xC6Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11a\x1A\xC6W\x83a(\x16\x91`\x04\x01a&@V[\x92`$5\x91\x82\x11a\x1A\xC6Wa&[\x91`\x04\x01a&@V[\x91\x81`\x1F\x84\x01\x12\x15a\x1A\xC6W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x1A\xC6W` \x83\x81\x86\x01\x95\x01\x01\x11a\x1A\xC6WV[5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x1A\xC6WV[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFE\xE1\x816\x03\x01\x82\x12\x15a\x1A\xC6W\x01\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x1A\xC6W\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x1A\xC6W` \x01\x91\x816\x03\x83\x13a\x1A\xC6WV[\x80T\x15a)\tW`\0R` `\0 \x90`\0\x90V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[`@Q\x90\x81`\0\x82Ta)J\x81a&\x81V[\x93`\x01\x91\x80\x83\x16\x90\x81\x15a)\xB0WP`\x01\x14a)rW[PP` \x92P`\x04\x81R\x03\x01\x90 \x90V[\x90\x91P`\0R` \x90` `\0 \x90`\0\x91[\x85\x83\x10a)\x9CWPPPP` \x91\x81\x018\x80a)aV[\x80T\x87\x84\x01R\x86\x94P\x91\x83\x01\x91\x81\x01a)\x85V[\x91PP` \x94\x92P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x91P\x16\x82R\x80\x15\x15\x02\x81\x018\x80a)aV[5g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x1A\xC6W\x90V[\x90`\x01g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x93\x16\x01\x91\x82\x11a*\x19WV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[\x905\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x826\x03\x01\x81\x12\x15a\x1A\xC6W\x01` \x815\x91\x01\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x1A\xC6W\x816\x03\x83\x13a\x1A\xC6WV[`\x1F\x82` \x94\x93\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x81\x86R\x86\x86\x017`\0\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x90V[` \x90a*\xFB\x82g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x83a*\xF2\x82a([V[\x16\x86R\x01a([V[\x16\x91\x01RV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x90a+\xB4a+\x99a+~a+ca+Ha\x01 \x88a+(\x88a([V[\x16\x88Ra+8` \x88\x01\x88a*HV[\x90\x91\x80` \x8B\x01R\x89\x01\x91a*\x98V[a+U`@\x87\x01\x87a*HV[\x90\x88\x83\x03`@\x8A\x01Ra*\x98V[a+p``\x86\x01\x86a*HV[\x90\x87\x83\x03``\x89\x01Ra*\x98V[a+\x8B`\x80\x85\x01\x85a*HV[\x90\x86\x83\x03`\x80\x88\x01Ra*\x98V[a+\xA6`\xA0\x84\x01\x84a*HV[\x90\x85\x83\x03`\xA0\x87\x01Ra*\x98V[\x92a+\xC5`\xC0\x84\x01`\xC0\x84\x01a*\xD7V[a+\xD3a\x01\0\x80\x93\x01a([V[\x16\x91\x01R\x90V[`!a,F\x91\x93\x92\x93`@Q\x94\x81a+\xFC\x87\x93Q\x80\x92` \x80\x87\x01\x91\x01a&^V[\x82\x01\x7F/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01Ra,7\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[\x01\x03`\x01\x81\x01\x85R\x01\x83a%\x8EV[V[Q\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x1A\xC6WV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDC`@\x91\x01\x12a\x1A\xC6W`@Q\x90a,\x94\x82a%rV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`$5\x82\x81\x16\x81\x03a\x1A\xC6W\x81R`D5\x91\x82\x16\x82\x03a\x1A\xC6W` \x01RV[\x91\x90\x82`@\x91\x03\x12a\x1A\xC6W`@Qa,\xD6\x81a%rV[` a,\xEF\x81\x83\x95a,\xE7\x81a([V[\x85R\x01a([V[\x91\x01RV[a-\"` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a&^V[\x81\x01`\x03\x81R\x03\x01\x90 T\x16\x80\x15a-7W\x90V[`\x04`@Q\x7F\xB6\xC7\x1F}\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x80T`\0\x93\x92a-p\x82a&\x81V[\x91\x82\x82R` \x93`\x01\x91`\x01\x81\x16\x90\x81`\0\x14a'KWP`\x01\x14a-\x96WPPPPPV[\x90\x93\x94\x95P`\0\x92\x91\x92R\x83`\0 \x92\x84`\0\x94[\x83\x86\x10a-\xC3WPPPP\x01\x01\x908\x80\x80\x80\x80a'\x03V[\x80T\x85\x87\x01\x83\x01R\x94\x01\x93\x85\x90\x82\x01a-\xABV[\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa.\x04` \x92\x95\x94\x95`@\x85R`@\x85\x01\x90a+\x01V[\x94\x16\x91\x01RV[\x90a.&` \x80\x93\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a&^V[\x81\x01`\x05\x81R\x03\x01\x90 \x83`@Q\x94\x85\x93\x847\x82\x01\x90\x81R\x03\x01\x90 `\xFF\x81T\x16`\x05\x81\x10\x15a.\x84W`\x03\x03a.ZW\x90V[`\x04`@Q\x7F\x96\xD0\x91F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`!`\x04R`$`\0\xFD[`@Qa.\xDD` \x82\x81a.\xD0\x81\x83\x01\x96\x87\x81Q\x93\x84\x92\x01a&^V[\x81\x01\x03\x80\x84R\x01\x82a%\x8EV[Q\x90 \x90V[`@\x90a.\xFDg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa&[\x94\x95\x16a7GV[\x82Q\x94\x85\x92\x7Facks/ports/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x85\x01Ra/<\x81Q\x80\x92` `+\x88\x01\x91\x01a&^V[\x83\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`+\x82\x01Ra/x\x82Q\x80\x93` `5\x85\x01\x91\x01a&^V[\x01\x7F/sequences/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`5\x82\x01Ra/\xB2\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[\x01\x03` \x81\x01\x84R\x01\x82a%\x8EV[\x90\x81` \x91\x03\x12a\x1A\xC6WQ\x80\x15\x15\x81\x03a\x1A\xC6W\x90V[\x91\x94\x90\x92`@Q\x80a/\xEB\x81\x86a&\xD4V[\x03a/\xF6\x90\x82a%\x8EV[a/\xFF\x90a,\xF4V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x94`\x06\x84\x01Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x93`@Q\x97\x88\x96\x87\x96\x7F\xF9\xBBZQ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x88R`\x04\x88\x01a\x01 \x90Ra\x01$\x88\x01a0i\x90\x85a-aV[\x91`$\x89\x01a0w\x91a*\xD7V[`d\x88\x01R`\x84\x87\x01`\0\x90R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x94\x85\x88\x83\x03\x01`\xA4\x89\x01Ra0\xB9\x92a*\x98V[\x85\x81\x03\x84\x01`\xC4\x87\x01Ra0\xCF\x91`\x05\x01a-aV[\x82\x85\x82\x03\x01`\xE4\x86\x01Ra0\xE2\x91a'\x88V[\x90\x83\x82\x03\x01a\x01\x04\x84\x01Ra0\xF6\x91a'\x88V[\x03\x81Z` \x94`\0\x91\xF1\x90\x81\x15a1+W`\0\x91a1\x12WP\x90V[a&[\x91P` =` \x11a\x120Wa\x12\"\x81\x83a%\x8EV[`@Q=`\0\x82>=\x90\xFD[\x90a.\xDD`@\x80Q\x80\x93` \x82\x01\x95\x7FnextSequenceAck/ports/\0\0\0\0\0\0\0\0\0\0\x87Ra1}\x81Q\x80\x92` `6\x87\x01\x91\x01a&^V[\x82\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`6\x82\x01Ra/\xB2\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[` a\t\xABs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93a1\xDC\x93a+\xDAV[\x81\x01`\x06\x81R\x03\x01\x90 T\x16\x80\x15a1\xF1W\x90V[`\x04`@Q\x7F\xC6\x83\x0C\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90`@Q\x91`\x80\x83\x01`@R`\x0Fo0123456789abcdef`\x0FR`\x02\x84\x01\x91`(\x83R`\0`J\x86\x01R``\x1B\x90`\x01`\0[\x80\x80\x01\x87\x01`\"\x85\x83\x1A\x85\x81\x16Q`#\x84\x01S`\x04\x1CQ\x91\x01S\x01`\x14\x81\x14a2\x81W`\x01\x90a2VV[PPPa0x`\x02\x82Q\x01\x91R\x82RV[a2\xC0` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01a&^V[\x81\x01`\x06\x81R\x03\x01\x90 T\x163\x14\x90V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82Q\x16\x15\x91\x82a2\xEAWPP\x90V[` \x01Q\x16\x15\x91\x90PV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x82Q\x16\x92\x80\x82Q\x16\x80\x85\x11\x94\x85\x15a3\x1BW[PPPPP\x90V[\x14\x93P\x90\x91\x83a33W[PPP8\x80\x80\x80\x80a3\x13V[\x81\x92\x93P\x90` \x80\x92\x01Q\x16\x92\x01Q\x16\x11\x158\x80\x80a3&V[\x90a.\xDD`A`@Q\x80\x93` \x82\x01\x95\x7FnextSequenceSend/ports/\0\0\0\0\0\0\0\0\0\x87Ra3\x94\x81Q\x80\x92` `7\x87\x01\x91\x01a&^V[\x82\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`7\x82\x01Ra3\xCF\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[\x01\x03`!\x81\x01\x84R\x01\x82a%\x8EV[`D\x90a3\xF8g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa&[\x94\x95\x16a7GV[`@Q\x94\x85\x92\x7Freceipts/ports/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x85\x01Ra48\x81Q\x80\x92` `/\x88\x01\x91\x01a&^V[\x83\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`/\x82\x01Ra4t\x82Q\x80\x93` `9\x85\x01\x91\x01a&^V[\x01\x7F/sequences/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`9\x82\x01Ra4\xAE\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[\x01\x03`$\x81\x01\x84R\x01\x82a%\x8EV[`Aa&[\x91`@Q\x93\x84\x91\x7FnextSequenceRecv/ports/\0\0\0\0\0\0\0\0\0` \x84\x01Ra3\x94\x81Q\x80\x92` `7\x87\x01\x91\x01a&^V[\x91\x90\x91\x82Q\x15a6>Wa5]a5Qa\x02\xE9a\"\x98a5Aa5H``\x87\x01a5-\x81\x89a(\xA3V[\x93\x90`\x80\x8A\x01\x94a\x01va\x01l\x87\x8Da(\xA3V[P\x87a(\xA3V[\x94\x90\x91\x87a(\xA3V[\x93\x90\x91a\x02\xE1\x88a)\xEBV[\x80Q` \x80\x92\x01 \x90`\0\x94\x82\x86R\x85\x82R`@\x92\x83\x87 Ta6\x15W\x82\x87\x85Q\x80\x85Qa5\x8E\x81\x83\x87\x8A\x01a&^V[\x81\x01\x03\x90`\x02Z\xFA\x15a6\x0BW\x90a6\x06\x92\x91\x84\x88\x7Fw\x87\x88\x13\x12s\xC1v\x94\x06\xF3\xB4*$\x1A&m\x9C\\\x1C\xA3\x9B+3\xA3\xB1\xA8\xEF\xB1\x08\x0B\xC5\x98\x99Q\x82Q\x86\x81\x01\x91\x82R\x86\x81Ra5\xDB\x81a%rV[Q\x90 \x92\x81R\x80\x85R Ua5\xF9\x84Q\x95\x85\x87\x96\x87R\x86\x01\x90a+\x01V[\x91\x84\x83\x03\x90\x85\x01Ra'\x88V[\x03\x90\xA1V[\x83Q=\x88\x82>=\x90\xFD[`\x04\x84Q\x7F\\mw\x11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F$0\xF4\x03\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`G\x90a6\x82g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa&[\x94\x95\x16a7GV[`@Q\x94\x85\x92\x7Fcommitments/ports/\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x85\x01Ra6\xC2\x81Q\x80\x92` `2\x88\x01\x91\x01a&^V[\x83\x01\x7F/channels/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`2\x82\x01Ra6\xFE\x82Q\x80\x93` `<\x85\x01\x91\x01a&^V[\x01\x7F/sequences/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`<\x82\x01Ra78\x82Q\x80\x93` \x87\x85\x01\x91\x01a&^V[\x01\x03`'\x81\x01\x84R\x01\x82a%\x8EV[\x90`@Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x80\x82\x01\x93`\xA0\x83\x01`@R`\0\x85R\x93[\x01\x92`\n\x90\x81\x81\x06`0\x01\x85S\x04\x92\x83\x15a7\xBAW\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90a7~V[\x92P`\x80\x83\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x92\x03\x01\x92\x01\x91\x82RV"; - /// The deployed bytecode of the contract. - #[cfg(feature = "providers")] - pub static IBCPACKET_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE); - #[cfg(feature = "providers")] - pub struct IBCPacket(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for IBCPacket { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for IBCPacket { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for IBCPacket { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for IBCPacket { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IBCPacket)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl IBCPacket { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - IBCPACKET_ABI.clone(), - client, - )) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - IBCPACKET_ABI.clone(), - IBCPACKET_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - /// Calls the contract's `COMMITMENT_PREFIX` (0xa9550dac) function - pub fn commitment_prefix( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 85, 13, 172], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `acknowledgePacket` (0x07037704) function - pub fn acknowledge_packet( - &self, - msg: MsgPacketAcknowledgement, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([7, 3, 119, 4], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `capabilities` (0x5717bcf5) function - pub fn capabilities( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([87, 23, 188, 245], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channelCapabilityPath` (0x3bc3339f) function - pub fn channel_capability_path( - &self, - port_id: ::std::string::String, - channel_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([59, 195, 51, 159], (port_id, channel_id)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `channels` (0x5b3de260) function - pub fn channels( - &self, - p0: ::std::string::String, - p1: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - u8, - u8, - IbcCoreChannelV1CounterpartyData, - ::std::string::String, - ), - > { - self.0 - .method_hash([91, 61, 226, 96], (p0, p1)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientImpls` (0xd1297b8d) function - pub fn client_impls( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([209, 41, 123, 141], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientRegistry` (0x990491a5) function - pub fn client_registry( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([153, 4, 145, 165], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `clientTypes` (0xc2380105) function - pub fn client_types( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([194, 56, 1, 5], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `commitments` (0x839df945) function - pub fn commitments( - &self, - p0: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([131, 157, 249, 69], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `connections` (0x31973f00) function - pub fn connections( - &self, - p0: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - ::std::string::String, - u8, - IbcCoreConnectionV1CounterpartyData, - u64, - ), - > { - self.0 - .method_hash([49, 151, 63, 0], p0) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getClient` (0x7eb78932) function - pub fn get_client( - &self, - client_id: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([126, 183, 137, 50], client_id) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextChannelSequencePath` (0x8669fd15) function - pub fn next_channel_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([134, 105, 253, 21], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextClientSequencePath` (0x990c3888) function - pub fn next_client_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([153, 12, 56, 136], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `nextConnectionSequencePath` (0x46807086) function - pub fn next_connection_sequence_path( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([70, 128, 112, 134], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `recvPacket` (0xe8f088c6) function - pub fn recv_packet( - &self, - msg: MsgPacketRecv, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([232, 240, 136, 198], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `sendPacket` (0x6cf02d3f) function - pub fn send_packet( - &self, - source_channel: ::std::string::String, - timeout_height: IbcCoreClientV1HeightData, - timeout_timestamp: u64, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [108, 240, 45, 63], - (source_channel, timeout_height, timeout_timestamp, data), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `timeoutPacket` (0xa04f91b2) function - pub fn timeout_packet( - &self, - msg: MsgPacketTimeout, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([160, 79, 145, 178], (msg,)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `writeAcknowledgement` (0xca956667) function - pub fn write_acknowledgement( - &self, - packet: IbcCoreChannelV1PacketData, - acknowledgement: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([202, 149, 102, 103], (packet, acknowledgement)) - .expect("method not found (this should never happen)") - } - /// Gets the contract's `AcknowledgePacket` event - pub fn acknowledge_packet_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, AcknowledgePacketFilter> - { - self.0.event() - } - /// Gets the contract's `RecvPacket` event - pub fn recv_packet_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, RecvPacketFilter> { - self.0.event() - } - /// Gets the contract's `SendPacket` event - pub fn send_packet_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, SendPacketFilter> { - self.0.event() - } - /// Gets the contract's `TimeoutPacket` event - pub fn timeout_packet_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, TimeoutPacketFilter> - { - self.0.event() - } - /// Gets the contract's `WriteAcknowledgement` event - pub fn write_acknowledgement_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, WriteAcknowledgementFilter> - { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, IBCPacketEvents> { - self.0 - .event_with_filter(::core::default::Default::default()) - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> for IBCPacket { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - /// Custom Error type `ErrAcknowledgementAlreadyExists` with signature `ErrAcknowledgementAlreadyExists()` and selector `0x5c6d7711` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrAcknowledgementAlreadyExists", - abi = "ErrAcknowledgementAlreadyExists()" - )] - pub struct ErrAcknowledgementAlreadyExists; - /// Custom Error type `ErrAcknowledgementIsEmpty` with signature `ErrAcknowledgementIsEmpty()` and selector `0x2430f403` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrAcknowledgementIsEmpty", - abi = "ErrAcknowledgementIsEmpty()" - )] - pub struct ErrAcknowledgementIsEmpty; - /// Custom Error type `ErrClientNotFound` with signature `ErrClientNotFound()` and selector `0xb6c71f7d` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrClientNotFound", abi = "ErrClientNotFound()")] - pub struct ErrClientNotFound; - /// Custom Error type `ErrDestinationAndCounterpartyChannelMismatch` with signature `ErrDestinationAndCounterpartyChannelMismatch()` and selector `0x9387f5d0` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrDestinationAndCounterpartyChannelMismatch", - abi = "ErrDestinationAndCounterpartyChannelMismatch()" - )] - pub struct ErrDestinationAndCounterpartyChannelMismatch; - /// Custom Error type `ErrDestinationAndCounterpartyPortMismatch` with signature `ErrDestinationAndCounterpartyPortMismatch()` and selector `0xa6076043` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrDestinationAndCounterpartyPortMismatch", - abi = "ErrDestinationAndCounterpartyPortMismatch()" - )] - pub struct ErrDestinationAndCounterpartyPortMismatch; - /// Custom Error type `ErrHeightTimeout` with signature `ErrHeightTimeout()` and selector `0xa9cfb705` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrHeightTimeout", abi = "ErrHeightTimeout()")] - pub struct ErrHeightTimeout; - /// Custom Error type `ErrInvalidChannelState` with signature `ErrInvalidChannelState()` and selector `0x96d09146` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidChannelState", abi = "ErrInvalidChannelState()")] - pub struct ErrInvalidChannelState; - /// Custom Error type `ErrInvalidConnectionState` with signature `ErrInvalidConnectionState()` and selector `0x8ca98990` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidConnectionState", - abi = "ErrInvalidConnectionState()" - )] - pub struct ErrInvalidConnectionState; - /// Custom Error type `ErrInvalidPacketCommitment` with signature `ErrInvalidPacketCommitment()` and selector `0x438a8d16` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidPacketCommitment", - abi = "ErrInvalidPacketCommitment()" - )] - pub struct ErrInvalidPacketCommitment; - /// Custom Error type `ErrInvalidProof` with signature `ErrInvalidProof()` and selector `0x14209932` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidProof", abi = "ErrInvalidProof()")] - pub struct ErrInvalidProof; - /// Custom Error type `ErrInvalidTimeoutHeight` with signature `ErrInvalidTimeoutHeight()` and selector `0xc8e1d264` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidTimeoutHeight", abi = "ErrInvalidTimeoutHeight()")] - pub struct ErrInvalidTimeoutHeight; - /// Custom Error type `ErrInvalidTimeoutTimestamp` with signature `ErrInvalidTimeoutTimestamp()` and selector `0xe6277ce0` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidTimeoutTimestamp", - abi = "ErrInvalidTimeoutTimestamp()" - )] - pub struct ErrInvalidTimeoutTimestamp; - /// Custom Error type `ErrLatestHeightNotFound` with signature `ErrLatestHeightNotFound()` and selector `0xe53d4e37` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrLatestHeightNotFound", abi = "ErrLatestHeightNotFound()")] - pub struct ErrLatestHeightNotFound; - /// Custom Error type `ErrLatestTimestampNotFound` with signature `ErrLatestTimestampNotFound()` and selector `0x9b6c9adc` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrLatestTimestampNotFound", - abi = "ErrLatestTimestampNotFound()" - )] - pub struct ErrLatestTimestampNotFound; - /// Custom Error type `ErrModuleNotFound` with signature `ErrModuleNotFound()` and selector `0xc6830cff` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrModuleNotFound", abi = "ErrModuleNotFound()")] - pub struct ErrModuleNotFound; - /// Custom Error type `ErrNextSequenceMustBeGreaterThanTimeoutSequence` with signature `ErrNextSequenceMustBeGreaterThanTimeoutSequence()` and selector `0xe758ef82` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrNextSequenceMustBeGreaterThanTimeoutSequence", - abi = "ErrNextSequenceMustBeGreaterThanTimeoutSequence()" - )] - pub struct ErrNextSequenceMustBeGreaterThanTimeoutSequence; - /// Custom Error type `ErrPacketAlreadyReceived` with signature `ErrPacketAlreadyReceived()` and selector `0xa46bbab4` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrPacketAlreadyReceived", abi = "ErrPacketAlreadyReceived()")] - pub struct ErrPacketAlreadyReceived; - /// Custom Error type `ErrPacketCommitmentNotFound` with signature `ErrPacketCommitmentNotFound()` and selector `0x4d7cfc57` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrPacketCommitmentNotFound", - abi = "ErrPacketCommitmentNotFound()" - )] - pub struct ErrPacketCommitmentNotFound; - /// Custom Error type `ErrPacketSequenceNextSequenceMismatch` with signature `ErrPacketSequenceNextSequenceMismatch()` and selector `0x402a84a3` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrPacketSequenceNextSequenceMismatch", - abi = "ErrPacketSequenceNextSequenceMismatch()" - )] - pub struct ErrPacketSequenceNextSequenceMismatch; - /// Custom Error type `ErrPacketWithoutTimeout` with signature `ErrPacketWithoutTimeout()` and selector `0x5734400c` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrPacketWithoutTimeout", abi = "ErrPacketWithoutTimeout()")] - pub struct ErrPacketWithoutTimeout; - /// Custom Error type `ErrSourceAndCounterpartyChannelMismatch` with signature `ErrSourceAndCounterpartyChannelMismatch()` and selector `0x77668ed1` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrSourceAndCounterpartyChannelMismatch", - abi = "ErrSourceAndCounterpartyChannelMismatch()" - )] - pub struct ErrSourceAndCounterpartyChannelMismatch; - /// Custom Error type `ErrSourceAndCounterpartyPortMismatch` with signature `ErrSourceAndCounterpartyPortMismatch()` and selector `0xda885c1d` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrSourceAndCounterpartyPortMismatch", - abi = "ErrSourceAndCounterpartyPortMismatch()" - )] - pub struct ErrSourceAndCounterpartyPortMismatch; - /// Custom Error type `ErrTimeoutHeightNotReached` with signature `ErrTimeoutHeightNotReached()` and selector `0x12c51c64` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrTimeoutHeightNotReached", - abi = "ErrTimeoutHeightNotReached()" - )] - pub struct ErrTimeoutHeightNotReached; - /// Custom Error type `ErrTimeoutTimestampNotReached` with signature `ErrTimeoutTimestampNotReached()` and selector `0x8551d235` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrTimeoutTimestampNotReached", - abi = "ErrTimeoutTimestampNotReached()" - )] - pub struct ErrTimeoutTimestampNotReached; - /// Custom Error type `ErrTimestampTimeout` with signature `ErrTimestampTimeout()` and selector `0xa4821270` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrTimestampTimeout", abi = "ErrTimestampTimeout()")] - pub struct ErrTimestampTimeout; - /// Custom Error type `ErrUnauthorized` with signature `ErrUnauthorized()` and selector `0xcc12cef6` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrUnauthorized", abi = "ErrUnauthorized()")] - pub struct ErrUnauthorized; - /// Custom Error type `ErrUnknownChannelOrdering` with signature `ErrUnknownChannelOrdering()` and selector `0x6cc79c02` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrUnknownChannelOrdering", - abi = "ErrUnknownChannelOrdering()" - )] - pub struct ErrUnknownChannelOrdering; - /// Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCPacketErrors { - ErrAcknowledgementAlreadyExists(ErrAcknowledgementAlreadyExists), - ErrAcknowledgementIsEmpty(ErrAcknowledgementIsEmpty), - ErrClientNotFound(ErrClientNotFound), - ErrDestinationAndCounterpartyChannelMismatch(ErrDestinationAndCounterpartyChannelMismatch), - ErrDestinationAndCounterpartyPortMismatch(ErrDestinationAndCounterpartyPortMismatch), - ErrHeightTimeout(ErrHeightTimeout), - ErrInvalidChannelState(ErrInvalidChannelState), - ErrInvalidConnectionState(ErrInvalidConnectionState), - ErrInvalidPacketCommitment(ErrInvalidPacketCommitment), - ErrInvalidProof(ErrInvalidProof), - ErrInvalidTimeoutHeight(ErrInvalidTimeoutHeight), - ErrInvalidTimeoutTimestamp(ErrInvalidTimeoutTimestamp), - ErrLatestHeightNotFound(ErrLatestHeightNotFound), - ErrLatestTimestampNotFound(ErrLatestTimestampNotFound), - ErrModuleNotFound(ErrModuleNotFound), - ErrNextSequenceMustBeGreaterThanTimeoutSequence( - ErrNextSequenceMustBeGreaterThanTimeoutSequence, - ), - ErrPacketAlreadyReceived(ErrPacketAlreadyReceived), - ErrPacketCommitmentNotFound(ErrPacketCommitmentNotFound), - ErrPacketSequenceNextSequenceMismatch(ErrPacketSequenceNextSequenceMismatch), - ErrPacketWithoutTimeout(ErrPacketWithoutTimeout), - ErrSourceAndCounterpartyChannelMismatch(ErrSourceAndCounterpartyChannelMismatch), - ErrSourceAndCounterpartyPortMismatch(ErrSourceAndCounterpartyPortMismatch), - ErrTimeoutHeightNotReached(ErrTimeoutHeightNotReached), - ErrTimeoutTimestampNotReached(ErrTimeoutTimestampNotReached), - ErrTimestampTimeout(ErrTimestampTimeout), - ErrUnauthorized(ErrUnauthorized), - ErrUnknownChannelOrdering(ErrUnknownChannelOrdering), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for IBCPacketErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) - { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrAcknowledgementAlreadyExists(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrAcknowledgementIsEmpty(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ErrClientNotFound(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ErrDestinationAndCounterpartyChannelMismatch(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ErrDestinationAndCounterpartyPortMismatch(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ErrHeightTimeout(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidChannelState(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidConnectionState(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidPacketCommitment(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ErrInvalidProof(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidTimeoutHeight(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidTimeoutTimestamp(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrLatestHeightNotFound(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrLatestTimestampNotFound(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ErrModuleNotFound(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok( - Self::ErrNextSequenceMustBeGreaterThanTimeoutSequence(decoded), - ); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrPacketAlreadyReceived(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrPacketCommitmentNotFound(decoded)); - } - if let Ok(decoded) = - ::decode( - data, - ) - { - return Ok(Self::ErrPacketSequenceNextSequenceMismatch(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrPacketWithoutTimeout(decoded)); - } - if let Ok(decoded) = - ::decode( - data, - ) - { - return Ok(Self::ErrSourceAndCounterpartyChannelMismatch(decoded)); - } - if let Ok(decoded) = - ::decode( - data, - ) - { - return Ok(Self::ErrSourceAndCounterpartyPortMismatch(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrTimeoutHeightNotReached(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrTimeoutTimestampNotReached(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrTimestampTimeout(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ErrUnauthorized(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrUnknownChannelOrdering(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IBCPacketErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::ErrAcknowledgementAlreadyExists(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrAcknowledgementIsEmpty(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrClientNotFound(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrDestinationAndCounterpartyChannelMismatch(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrDestinationAndCounterpartyPortMismatch(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrHeightTimeout(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrInvalidChannelState(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidConnectionState(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidPacketCommitment(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidProof(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrInvalidTimeoutHeight(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidTimeoutTimestamp(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrLatestHeightNotFound(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrLatestTimestampNotFound(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrModuleNotFound(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrNextSequenceMustBeGreaterThanTimeoutSequence(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrPacketAlreadyReceived(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrPacketCommitmentNotFound(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrPacketSequenceNextSequenceMismatch(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrPacketWithoutTimeout(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrSourceAndCounterpartyChannelMismatch(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrSourceAndCounterpartyPortMismatch(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrTimeoutHeightNotReached(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrTimeoutTimestampNotReached(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrTimestampTimeout(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrUnauthorized(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrUnknownChannelOrdering(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for IBCPacketErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for IBCPacketErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ErrAcknowledgementAlreadyExists(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrAcknowledgementIsEmpty(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrClientNotFound(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrDestinationAndCounterpartyChannelMismatch(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrDestinationAndCounterpartyPortMismatch(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrHeightTimeout(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidChannelState(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidConnectionState(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidPacketCommitment(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidProof(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidTimeoutHeight(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidTimeoutTimestamp(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrLatestHeightNotFound(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrLatestTimestampNotFound(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrModuleNotFound(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrNextSequenceMustBeGreaterThanTimeoutSequence(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrPacketAlreadyReceived(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrPacketCommitmentNotFound(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrPacketSequenceNextSequenceMismatch(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrPacketWithoutTimeout(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrSourceAndCounterpartyChannelMismatch(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrSourceAndCounterpartyPortMismatch(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrTimeoutHeightNotReached(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrTimeoutTimestampNotReached(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrTimestampTimeout(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrUnauthorized(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrUnknownChannelOrdering(element) => ::core::fmt::Display::fmt(element, f), - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for IBCPacketErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrAcknowledgementAlreadyExists) -> Self { - Self::ErrAcknowledgementAlreadyExists(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrAcknowledgementIsEmpty) -> Self { - Self::ErrAcknowledgementIsEmpty(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrClientNotFound) -> Self { - Self::ErrClientNotFound(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrDestinationAndCounterpartyChannelMismatch) -> Self { - Self::ErrDestinationAndCounterpartyChannelMismatch(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrDestinationAndCounterpartyPortMismatch) -> Self { - Self::ErrDestinationAndCounterpartyPortMismatch(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrHeightTimeout) -> Self { - Self::ErrHeightTimeout(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrInvalidChannelState) -> Self { - Self::ErrInvalidChannelState(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrInvalidConnectionState) -> Self { - Self::ErrInvalidConnectionState(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrInvalidPacketCommitment) -> Self { - Self::ErrInvalidPacketCommitment(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrInvalidProof) -> Self { - Self::ErrInvalidProof(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrInvalidTimeoutHeight) -> Self { - Self::ErrInvalidTimeoutHeight(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrInvalidTimeoutTimestamp) -> Self { - Self::ErrInvalidTimeoutTimestamp(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrLatestHeightNotFound) -> Self { - Self::ErrLatestHeightNotFound(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrLatestTimestampNotFound) -> Self { - Self::ErrLatestTimestampNotFound(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrModuleNotFound) -> Self { - Self::ErrModuleNotFound(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrNextSequenceMustBeGreaterThanTimeoutSequence) -> Self { - Self::ErrNextSequenceMustBeGreaterThanTimeoutSequence(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrPacketAlreadyReceived) -> Self { - Self::ErrPacketAlreadyReceived(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrPacketCommitmentNotFound) -> Self { - Self::ErrPacketCommitmentNotFound(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrPacketSequenceNextSequenceMismatch) -> Self { - Self::ErrPacketSequenceNextSequenceMismatch(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrPacketWithoutTimeout) -> Self { - Self::ErrPacketWithoutTimeout(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrSourceAndCounterpartyChannelMismatch) -> Self { - Self::ErrSourceAndCounterpartyChannelMismatch(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrSourceAndCounterpartyPortMismatch) -> Self { - Self::ErrSourceAndCounterpartyPortMismatch(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrTimeoutHeightNotReached) -> Self { - Self::ErrTimeoutHeightNotReached(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrTimeoutTimestampNotReached) -> Self { - Self::ErrTimeoutTimestampNotReached(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrTimestampTimeout) -> Self { - Self::ErrTimestampTimeout(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrUnauthorized) -> Self { - Self::ErrUnauthorized(value) - } - } - impl ::core::convert::From for IBCPacketErrors { - fn from(value: ErrUnknownChannelOrdering) -> Self { - Self::ErrUnknownChannelOrdering(value) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "AcknowledgePacket", - abi = "AcknowledgePacket((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes)" - )] - pub struct AcknowledgePacketFilter { - pub packet: IbcCoreChannelV1PacketData, - pub acknowledgement: ::ethers::core::types::Bytes, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "RecvPacket", - abi = "RecvPacket((uint64,string,string,string,string,bytes,(uint64,uint64),uint64))" - )] - pub struct RecvPacketFilter { - pub packet: IbcCoreChannelV1PacketData, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "SendPacket", - abi = "SendPacket(uint64,string,string,(uint64,uint64),uint64,bytes)" - )] - pub struct SendPacketFilter { - pub sequence: u64, - pub source_port: ::std::string::String, - pub source_channel: ::std::string::String, - pub timeout_height: IbcCoreClientV1HeightData, - pub timeout_timestamp: u64, - pub data: ::ethers::core::types::Bytes, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "TimeoutPacket", - abi = "TimeoutPacket((uint64,string,string,string,string,bytes,(uint64,uint64),uint64))" - )] - pub struct TimeoutPacketFilter { - pub packet: IbcCoreChannelV1PacketData, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - #[ethevent( - name = "WriteAcknowledgement", - abi = "WriteAcknowledgement((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes)" - )] - pub struct WriteAcknowledgementFilter { - pub packet: IbcCoreChannelV1PacketData, - pub acknowledgement: ::ethers::core::types::Bytes, - } - /// Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, - )] - pub enum IBCPacketEvents { - AcknowledgePacketFilter(AcknowledgePacketFilter), - RecvPacketFilter(RecvPacketFilter), - SendPacketFilter(SendPacketFilter), - TimeoutPacketFilter(TimeoutPacketFilter), - WriteAcknowledgementFilter(WriteAcknowledgementFilter), - } - impl ::ethers::contract::EthLogDecode for IBCPacketEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = AcknowledgePacketFilter::decode_log(log) { - return Ok(IBCPacketEvents::AcknowledgePacketFilter(decoded)); - } - if let Ok(decoded) = RecvPacketFilter::decode_log(log) { - return Ok(IBCPacketEvents::RecvPacketFilter(decoded)); - } - if let Ok(decoded) = SendPacketFilter::decode_log(log) { - return Ok(IBCPacketEvents::SendPacketFilter(decoded)); - } - if let Ok(decoded) = TimeoutPacketFilter::decode_log(log) { - return Ok(IBCPacketEvents::TimeoutPacketFilter(decoded)); - } - if let Ok(decoded) = WriteAcknowledgementFilter::decode_log(log) { - return Ok(IBCPacketEvents::WriteAcknowledgementFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IBCPacketEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::AcknowledgePacketFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::RecvPacketFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::SendPacketFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::TimeoutPacketFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::WriteAcknowledgementFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IBCPacketEvents { - fn from(value: AcknowledgePacketFilter) -> Self { - Self::AcknowledgePacketFilter(value) - } - } - impl ::core::convert::From for IBCPacketEvents { - fn from(value: RecvPacketFilter) -> Self { - Self::RecvPacketFilter(value) - } - } - impl ::core::convert::From for IBCPacketEvents { - fn from(value: SendPacketFilter) -> Self { - Self::SendPacketFilter(value) - } - } - impl ::core::convert::From for IBCPacketEvents { - fn from(value: TimeoutPacketFilter) -> Self { - Self::TimeoutPacketFilter(value) - } - } - impl ::core::convert::From for IBCPacketEvents { - fn from(value: WriteAcknowledgementFilter) -> Self { - Self::WriteAcknowledgementFilter(value) - } - } - /// Container type for all input parameters for the `COMMITMENT_PREFIX` function with signature `COMMITMENT_PREFIX()` and selector `0xa9550dac` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "COMMITMENT_PREFIX", abi = "COMMITMENT_PREFIX()")] - pub struct CommitmentPrefixCall; - /// Container type for all input parameters for the `acknowledgePacket` function with signature `acknowledgePacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,bytes,(uint64,uint64),address))` and selector `0x07037704` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "acknowledgePacket", - abi = "acknowledgePacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,bytes,(uint64,uint64),address))" - )] - pub struct AcknowledgePacketCall { - pub msg: MsgPacketAcknowledgement, - } - /// Container type for all input parameters for the `capabilities` function with signature `capabilities(string)` and selector `0x5717bcf5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "capabilities", abi = "capabilities(string)")] - pub struct CapabilitiesCall(pub ::std::string::String); - /// Container type for all input parameters for the `channelCapabilityPath` function with signature `channelCapabilityPath(string,string)` and selector `0x3bc3339f` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "channelCapabilityPath", - abi = "channelCapabilityPath(string,string)" - )] - pub struct ChannelCapabilityPathCall { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - } - /// Container type for all input parameters for the `channels` function with signature `channels(string,string)` and selector `0x5b3de260` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "channels", abi = "channels(string,string)")] - pub struct ChannelsCall(pub ::std::string::String, pub ::std::string::String); - /// Container type for all input parameters for the `clientImpls` function with signature `clientImpls(string)` and selector `0xd1297b8d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientImpls", abi = "clientImpls(string)")] - pub struct ClientImplsCall(pub ::std::string::String); - /// Container type for all input parameters for the `clientRegistry` function with signature `clientRegistry(string)` and selector `0x990491a5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientRegistry", abi = "clientRegistry(string)")] - pub struct ClientRegistryCall(pub ::std::string::String); - /// Container type for all input parameters for the `clientTypes` function with signature `clientTypes(string)` and selector `0xc2380105` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "clientTypes", abi = "clientTypes(string)")] - pub struct ClientTypesCall(pub ::std::string::String); - /// Container type for all input parameters for the `commitments` function with signature `commitments(bytes32)` and selector `0x839df945` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "commitments", abi = "commitments(bytes32)")] - pub struct CommitmentsCall(pub [u8; 32]); - /// Container type for all input parameters for the `connections` function with signature `connections(string)` and selector `0x31973f00` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "connections", abi = "connections(string)")] - pub struct ConnectionsCall(pub ::std::string::String); - /// Container type for all input parameters for the `getClient` function with signature `getClient(string)` and selector `0x7eb78932` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getClient", abi = "getClient(string)")] - pub struct GetClientCall { - pub client_id: ::std::string::String, - } - /// Container type for all input parameters for the `nextChannelSequencePath` function with signature `nextChannelSequencePath()` and selector `0x8669fd15` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "nextChannelSequencePath", abi = "nextChannelSequencePath()")] - pub struct NextChannelSequencePathCall; - /// Container type for all input parameters for the `nextClientSequencePath` function with signature `nextClientSequencePath()` and selector `0x990c3888` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "nextClientSequencePath", abi = "nextClientSequencePath()")] - pub struct NextClientSequencePathCall; - /// Container type for all input parameters for the `nextConnectionSequencePath` function with signature `nextConnectionSequencePath()` and selector `0x46807086` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "nextConnectionSequencePath", - abi = "nextConnectionSequencePath()" - )] - pub struct NextConnectionSequencePathCall; - /// Container type for all input parameters for the `recvPacket` function with signature `recvPacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,(uint64,uint64),address))` and selector `0xe8f088c6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "recvPacket", - abi = "recvPacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,(uint64,uint64),address))" - )] - pub struct RecvPacketCall { - pub msg: MsgPacketRecv, - } - /// Container type for all input parameters for the `sendPacket` function with signature `sendPacket(string,(uint64,uint64),uint64,bytes)` and selector `0x6cf02d3f` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "sendPacket", - abi = "sendPacket(string,(uint64,uint64),uint64,bytes)" - )] - pub struct SendPacketCall { - pub source_channel: ::std::string::String, - pub timeout_height: IbcCoreClientV1HeightData, - pub timeout_timestamp: u64, - pub data: ::ethers::core::types::Bytes, - } - /// Container type for all input parameters for the `timeoutPacket` function with signature `timeoutPacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,(uint64,uint64),uint64,address))` and selector `0xa04f91b2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "timeoutPacket", - abi = "timeoutPacket(((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,(uint64,uint64),uint64,address))" - )] - pub struct TimeoutPacketCall { - pub msg: MsgPacketTimeout, - } - /// Container type for all input parameters for the `writeAcknowledgement` function with signature `writeAcknowledgement((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes)` and selector `0xca956667` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "writeAcknowledgement", - abi = "writeAcknowledgement((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes)" - )] - pub struct WriteAcknowledgementCall { - pub packet: IbcCoreChannelV1PacketData, - pub acknowledgement: ::ethers::core::types::Bytes, - } - /// Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum IBCPacketCalls { - CommitmentPrefix(CommitmentPrefixCall), - AcknowledgePacket(AcknowledgePacketCall), - Capabilities(CapabilitiesCall), - ChannelCapabilityPath(ChannelCapabilityPathCall), - Channels(ChannelsCall), - ClientImpls(ClientImplsCall), - ClientRegistry(ClientRegistryCall), - ClientTypes(ClientTypesCall), - Commitments(CommitmentsCall), - Connections(ConnectionsCall), - GetClient(GetClientCall), - NextChannelSequencePath(NextChannelSequencePathCall), - NextClientSequencePath(NextClientSequencePathCall), - NextConnectionSequencePath(NextConnectionSequencePathCall), - RecvPacket(RecvPacketCall), - SendPacket(SendPacketCall), - TimeoutPacket(TimeoutPacketCall), - WriteAcknowledgement(WriteAcknowledgementCall), - } - impl ::ethers::core::abi::AbiDecode for IBCPacketCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::CommitmentPrefix(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::AcknowledgePacket(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::Capabilities(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ChannelCapabilityPath(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Channels(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ClientImpls(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ClientRegistry(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ClientTypes(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Commitments(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Connections(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::GetClient(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextChannelSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextClientSequencePath(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::NextConnectionSequencePath(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::RecvPacket(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::SendPacket(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::TimeoutPacket(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::WriteAcknowledgement(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IBCPacketCalls { - fn encode(self) -> Vec { - match self { - Self::CommitmentPrefix(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::AcknowledgePacket(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Capabilities(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChannelCapabilityPath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Channels(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientImpls(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientRegistry(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ClientTypes(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Commitments(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Connections(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetClient(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::NextChannelSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextClientSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NextConnectionSequencePath(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RecvPacket(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SendPacket(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TimeoutPacket(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::WriteAcknowledgement(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for IBCPacketCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::CommitmentPrefix(element) => ::core::fmt::Display::fmt(element, f), - Self::AcknowledgePacket(element) => ::core::fmt::Display::fmt(element, f), - Self::Capabilities(element) => ::core::fmt::Display::fmt(element, f), - Self::ChannelCapabilityPath(element) => ::core::fmt::Display::fmt(element, f), - Self::Channels(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientImpls(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientRegistry(element) => ::core::fmt::Display::fmt(element, f), - Self::ClientTypes(element) => ::core::fmt::Display::fmt(element, f), - Self::Commitments(element) => ::core::fmt::Display::fmt(element, f), - Self::Connections(element) => ::core::fmt::Display::fmt(element, f), - Self::GetClient(element) => ::core::fmt::Display::fmt(element, f), - Self::NextChannelSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::NextClientSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::NextConnectionSequencePath(element) => ::core::fmt::Display::fmt(element, f), - Self::RecvPacket(element) => ::core::fmt::Display::fmt(element, f), - Self::SendPacket(element) => ::core::fmt::Display::fmt(element, f), - Self::TimeoutPacket(element) => ::core::fmt::Display::fmt(element, f), - Self::WriteAcknowledgement(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: CommitmentPrefixCall) -> Self { - Self::CommitmentPrefix(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: AcknowledgePacketCall) -> Self { - Self::AcknowledgePacket(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: CapabilitiesCall) -> Self { - Self::Capabilities(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: ChannelCapabilityPathCall) -> Self { - Self::ChannelCapabilityPath(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: ChannelsCall) -> Self { - Self::Channels(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: ClientImplsCall) -> Self { - Self::ClientImpls(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: ClientRegistryCall) -> Self { - Self::ClientRegistry(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: ClientTypesCall) -> Self { - Self::ClientTypes(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: CommitmentsCall) -> Self { - Self::Commitments(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: ConnectionsCall) -> Self { - Self::Connections(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: GetClientCall) -> Self { - Self::GetClient(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: NextChannelSequencePathCall) -> Self { - Self::NextChannelSequencePath(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: NextClientSequencePathCall) -> Self { - Self::NextClientSequencePath(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: NextConnectionSequencePathCall) -> Self { - Self::NextConnectionSequencePath(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: RecvPacketCall) -> Self { - Self::RecvPacket(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: SendPacketCall) -> Self { - Self::SendPacket(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: TimeoutPacketCall) -> Self { - Self::TimeoutPacket(value) - } - } - impl ::core::convert::From for IBCPacketCalls { - fn from(value: WriteAcknowledgementCall) -> Self { - Self::WriteAcknowledgement(value) - } - } - /// Container type for all return fields from the `COMMITMENT_PREFIX` function with signature `COMMITMENT_PREFIX()` and selector `0xa9550dac` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CommitmentPrefixReturn(pub ::std::string::String); - /// Container type for all return fields from the `capabilities` function with signature `capabilities(string)` and selector `0x5717bcf5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CapabilitiesReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `channelCapabilityPath` function with signature `channelCapabilityPath(string,string)` and selector `0x3bc3339f` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelCapabilityPathReturn(pub ::std::string::String); - /// Container type for all return fields from the `channels` function with signature `channels(string,string)` and selector `0x5b3de260` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ChannelsReturn { - pub state: u8, - pub ordering: u8, - pub counterparty: IbcCoreChannelV1CounterpartyData, - pub version: ::std::string::String, - } - /// Container type for all return fields from the `clientImpls` function with signature `clientImpls(string)` and selector `0xd1297b8d` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientImplsReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `clientRegistry` function with signature `clientRegistry(string)` and selector `0x990491a5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientRegistryReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `clientTypes` function with signature `clientTypes(string)` and selector `0xc2380105` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ClientTypesReturn(pub ::std::string::String); - /// Container type for all return fields from the `commitments` function with signature `commitments(bytes32)` and selector `0x839df945` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct CommitmentsReturn(pub [u8; 32]); - /// Container type for all return fields from the `connections` function with signature `connections(string)` and selector `0x31973f00` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ConnectionsReturn { - pub client_id: ::std::string::String, - pub state: u8, - pub counterparty: IbcCoreConnectionV1CounterpartyData, - pub delay_period: u64, - } - /// Container type for all return fields from the `getClient` function with signature `getClient(string)` and selector `0x7eb78932` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetClientReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `nextChannelSequencePath` function with signature `nextChannelSequencePath()` and selector `0x8669fd15` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextChannelSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `nextClientSequencePath` function with signature `nextClientSequencePath()` and selector `0x990c3888` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextClientSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `nextConnectionSequencePath` function with signature `nextConnectionSequencePath()` and selector `0x46807086` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct NextConnectionSequencePathReturn(pub [u8; 32]); - /// Container type for all return fields from the `sendPacket` function with signature `sendPacket(string,(uint64,uint64),uint64,bytes)` and selector `0x6cf02d3f` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct SendPacketReturn(pub u64); -} diff --git a/generated/rust/contracts/src/lib.rs b/generated/rust/contracts/src/lib.rs deleted file mode 100644 index ec28803f32..0000000000 --- a/generated/rust/contracts/src/lib.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![allow(clippy::all)] -//! This lib contains abigen! generated bindings for solidity contracts. -//! This is autogenerated code. -//! Do not manually edit these files. -//! These files may be overwritten by the codegen system at any time. -pub mod cometbls_client; -pub mod erc20; -pub mod glue; -pub mod i_light_client; -pub mod ibc_channel_handshake; -pub mod ibc_client; -pub mod ibc_connection; -pub mod ibc_handler; -pub mod ibc_packet; -pub mod multicall; -pub mod shared_types; -pub mod ucs01_relay; diff --git a/generated/rust/contracts/src/multicall.rs b/generated/rust/contracts/src/multicall.rs deleted file mode 100644 index e5f412dd7f..0000000000 --- a/generated/rust/contracts/src/multicall.rs +++ /dev/null @@ -1,283 +0,0 @@ -pub use multicall::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod multicall { - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([( - ::std::borrow::ToOwned::to_owned("multicall"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("multicall"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("calls"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new(::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Address, - ::ethers::core::abi::ethabi::ParamType::Bool, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ),), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct Call3[]"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("returnData"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new(::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bool, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ),), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct Result[]"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - },], - )]), - events: ::core::convert::From::from([( - ::std::borrow::ToOwned::to_owned("MulticallResult"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("MulticallResult"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new(::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bool, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ),), - ), - indexed: false, - },], - anonymous: false, - },], - )]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static MULTICALL_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __BYTECODE: &[u8] = b"`\x80\x80`@R4a\0\x16Wa\x05$\x90\x81a\0\x1C\x829\xF3[`\0\x80\xFD\xFE`@`\x80`@R`\x04\x806\x10\x15a\0\x15W`\0\x80\xFD[`\0\x90\x815`\xE0\x1Cc\xE8\xBB\xF5\xD7\x14a\0,W`\0\x80\xFD[` \x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\xB3W`\x045\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x85\x11a\x01\xB7W6`#\x86\x01\x12\x15a\x01\xB7W\x84`\x04\x015\x92\x83\x11a\x01\xB7W`$\x90`$\x86\x01\x95`$6\x91\x86`\x05\x1B\x01\x01\x11a\x01\xB3Wa\0\xA3\x84a\x037V[\x95\x83[\x85\x81\x10a\0\xF3Wa\0\xEF\x88\x7Fy\x8FY\xB5\xFB\xED\xBCk\x92\xC3f\xAE\xBB\xE4\xEF7\x89V\xA3\xA1\xB9\xFFJ\x1B\xA0v\x0F=\x07R\xA8\x83`@Q\x80a\0\xE0\x84\x82a\x01\xBBV[\x03\x90\xA1`@Q\x91\x82\x91\x82a\x01\xBBV[\x03\x90\xF3[\x88\x83a\0\xFF\x83\x8Ba\x03\xECV[Qa\x01N\x88\x80a\x01\x10\x87\x8D\x8Aa\x04\x05V[\x95a\x018\x82a\x01\x1E\x89a\x04JV[\x92a\x01+\x81\x8B\x01\x8Ba\x04kV[\x93\x90\x91Q\x80\x94\x81\x93a\x04\xBCV[\x03\x92Z\xF1a\x01Da\x04\xCAV[\x83\x85\x01R\x15\x15\x82RV[Q\x91\x015\x17\x15a\x01`W`\x01\x01a\0\xA6V[`d\x85`\x17\x86\x86\x8B\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x85RRR\x7FMulticall3: call failed\0\0\0\0\0\0\0\0\0`DR\xFD[\x82\x80\xFD[P\x80\xFD[` \x80\x82\x01\x90\x80\x83R\x83Q\x80\x92R`@\x92`@\x81\x01\x82`@\x85`\x05\x1B\x84\x01\x01\x96\x01\x94`\0\x90`\0\x93[\x86\x85\x10a\x01\xF6WPPPPPPPP\x90V[\x90\x91\x92\x93\x94\x95\x96\x97\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\x82\x82\x03\x01\x85R\x86\x80\x8AQ\x80Q\x15\x15\x84R\x01Q\x91\x84\x82\x82\x01R\x82Q\x92\x83\x86\x83\x01R\x86[\x84\x81\x10a\x02\x92WPP`\x01\x92\x82\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F``\x93\x8A\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x9A\x01\x95\x01\x95\x01\x93\x96\x95\x94\x92\x91\x90a\x01\xE4V[\x81\x81\x01\x84\x01Q\x83\x82\x01``\x01R\x8A\x93\x01a\x02AV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F`@Q\x93\x01\x16\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x03\x1AW`@RV[a\x02\xA7V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x03\x1AW`\x05\x1B` \x01\x90V[\x90a\x03Ia\x03D\x83a\x03\x1FV[a\x02\xD6V[\x82\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a\x03w\x82\x94a\x03\x1FV[\x01`\0\x80[\x82\x81\x10a\x03\x89WPPPPV[`@\x90\x81Q\x82\x81\x01\x81\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x03\x1AW` \x93R\x83\x81R\x82``\x81\x83\x01R\x82\x87\x01\x01R\x01a\x03|V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[\x80Q\x82\x10\x15a\x04\0W` \x91`\x05\x1B\x01\x01\x90V[a\x03\xBDV[\x91\x90\x81\x10\x15a\x04\0W`\x05\x1B\x81\x015\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA1\x816\x03\x01\x82\x12\x15a\x04EW\x01\x90V[`\0\x80\xFD[5s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x04EW\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x04EW\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x04EW` \x01\x91\x816\x03\x83\x13a\x04EWV[\x90\x80\x92\x91\x827\x01`\0\x81R\x90V[=\x15a\x05\x1FW=\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x03\x1AWa\x05\x12` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x85\x01\x16\x01a\x02\xD6V[\x91\x82R=`\0` \x84\x01>V[``\x90V"; - /// The bytecode of the contract. - #[cfg(feature = "providers")] - pub static MULTICALL_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__BYTECODE); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __DEPLOYED_BYTECODE: &[u8] = b"`@`\x80`@R`\x04\x806\x10\x15a\0\x15W`\0\x80\xFD[`\0\x90\x815`\xE0\x1Cc\xE8\xBB\xF5\xD7\x14a\0,W`\0\x80\xFD[` \x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\xB3W`\x045\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x85\x11a\x01\xB7W6`#\x86\x01\x12\x15a\x01\xB7W\x84`\x04\x015\x92\x83\x11a\x01\xB7W`$\x90`$\x86\x01\x95`$6\x91\x86`\x05\x1B\x01\x01\x11a\x01\xB3Wa\0\xA3\x84a\x037V[\x95\x83[\x85\x81\x10a\0\xF3Wa\0\xEF\x88\x7Fy\x8FY\xB5\xFB\xED\xBCk\x92\xC3f\xAE\xBB\xE4\xEF7\x89V\xA3\xA1\xB9\xFFJ\x1B\xA0v\x0F=\x07R\xA8\x83`@Q\x80a\0\xE0\x84\x82a\x01\xBBV[\x03\x90\xA1`@Q\x91\x82\x91\x82a\x01\xBBV[\x03\x90\xF3[\x88\x83a\0\xFF\x83\x8Ba\x03\xECV[Qa\x01N\x88\x80a\x01\x10\x87\x8D\x8Aa\x04\x05V[\x95a\x018\x82a\x01\x1E\x89a\x04JV[\x92a\x01+\x81\x8B\x01\x8Ba\x04kV[\x93\x90\x91Q\x80\x94\x81\x93a\x04\xBCV[\x03\x92Z\xF1a\x01Da\x04\xCAV[\x83\x85\x01R\x15\x15\x82RV[Q\x91\x015\x17\x15a\x01`W`\x01\x01a\0\xA6V[`d\x85`\x17\x86\x86\x8B\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x85RRR\x7FMulticall3: call failed\0\0\0\0\0\0\0\0\0`DR\xFD[\x82\x80\xFD[P\x80\xFD[` \x80\x82\x01\x90\x80\x83R\x83Q\x80\x92R`@\x92`@\x81\x01\x82`@\x85`\x05\x1B\x84\x01\x01\x96\x01\x94`\0\x90`\0\x93[\x86\x85\x10a\x01\xF6WPPPPPPPP\x90V[\x90\x91\x92\x93\x94\x95\x96\x97\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\x82\x82\x03\x01\x85R\x86\x80\x8AQ\x80Q\x15\x15\x84R\x01Q\x91\x84\x82\x82\x01R\x82Q\x92\x83\x86\x83\x01R\x86[\x84\x81\x10a\x02\x92WPP`\x01\x92\x82\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F``\x93\x8A\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x9A\x01\x95\x01\x95\x01\x93\x96\x95\x94\x92\x91\x90a\x01\xE4V[\x81\x81\x01\x84\x01Q\x83\x82\x01``\x01R\x8A\x93\x01a\x02AV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F`@Q\x93\x01\x16\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x03\x1AW`@RV[a\x02\xA7V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x03\x1AW`\x05\x1B` \x01\x90V[\x90a\x03Ia\x03D\x83a\x03\x1FV[a\x02\xD6V[\x82\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a\x03w\x82\x94a\x03\x1FV[\x01`\0\x80[\x82\x81\x10a\x03\x89WPPPPV[`@\x90\x81Q\x82\x81\x01\x81\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x03\x1AW` \x93R\x83\x81R\x82``\x81\x83\x01R\x82\x87\x01\x01R\x01a\x03|V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[\x80Q\x82\x10\x15a\x04\0W` \x91`\x05\x1B\x01\x01\x90V[a\x03\xBDV[\x91\x90\x81\x10\x15a\x04\0W`\x05\x1B\x81\x015\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xA1\x816\x03\x01\x82\x12\x15a\x04EW\x01\x90V[`\0\x80\xFD[5s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x03a\x04EW\x90V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15a\x04EW\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x04EW` \x01\x91\x816\x03\x83\x13a\x04EWV[\x90\x80\x92\x91\x827\x01`\0\x81R\x90V[=\x15a\x05\x1FW=\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\x03\x1AWa\x05\x12` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x85\x01\x16\x01a\x02\xD6V[\x91\x82R=`\0` \x84\x01>V[``\x90V"; - /// The deployed bytecode of the contract. - #[cfg(feature = "providers")] - pub static MULTICALL_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE); - #[cfg(feature = "providers")] - pub struct Multicall(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for Multicall { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for Multicall { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for Multicall { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for Multicall { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(Multicall)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl Multicall { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - MULTICALL_ABI.clone(), - client, - )) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - MULTICALL_ABI.clone(), - MULTICALL_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - /// Calls the contract's `multicall` (0xe8bbf5d7) function - pub fn multicall( - &self, - calls: ::std::vec::Vec, - ) -> ::ethers::contract::builders::ContractCall> { - self.0 - .method_hash([232, 187, 245, 215], calls) - .expect("method not found (this should never happen)") - } - /// Gets the contract's `MulticallResult` event - pub fn multicall_result_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, MulticallResultFilter> - { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, MulticallResultFilter> - { - self.0 - .event_with_filter(::core::default::Default::default()) - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> for Multicall { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "MulticallResult", abi = "MulticallResult((bool,bytes)[])")] - pub struct MulticallResultFilter(pub ::std::vec::Vec); - /// Container type for all input parameters for the `multicall` function with signature `multicall((address,bool,bytes)[])` and selector `0xe8bbf5d7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "multicall", abi = "multicall((address,bool,bytes)[])")] - pub struct MulticallCall { - pub calls: ::std::vec::Vec, - } - /// Container type for all return fields from the `multicall` function with signature `multicall((address,bool,bytes)[])` and selector `0xe8bbf5d7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct MulticallReturn { - pub return_data: ::std::vec::Vec, - } - /// `Call3(address,bool,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct Call3 { - pub target: ::ethers::core::types::Address, - pub allow_failure: bool, - pub call_data: ::ethers::core::types::Bytes, - } - /// `Result(bool,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct Result { - pub success: bool, - pub return_data: ::ethers::core::types::Bytes, - } -} diff --git a/generated/rust/contracts/src/shared_types.rs b/generated/rust/contracts/src/shared_types.rs deleted file mode 100644 index e3fdd84394..0000000000 --- a/generated/rust/contracts/src/shared_types.rs +++ /dev/null @@ -1,475 +0,0 @@ -/// `ConsensusStateUpdate(bytes32,(uint64,uint64))` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct ConsensusStateUpdate { - pub consensus_state_commitment: [u8; 32], - pub height: IbcCoreClientV1HeightData, -} -/// `GoogleProtobufTimestampData(int64,int64)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct GoogleProtobufTimestampData { - pub secs: i64, - pub nanos: i64, -} -/// `MsgChannelCloseConfirm(string,string,bytes,(uint64,uint64),address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgChannelCloseConfirm { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - pub proof_init: ::ethers::core::types::Bytes, - pub proof_height: IbcCoreClientV1HeightData, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgChannelCloseInit(string,string,address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgChannelCloseInit { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgChannelOpenAck(string,string,string,string,bytes,(uint64,uint64),address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgChannelOpenAck { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - pub counterparty_version: ::std::string::String, - pub counterparty_channel_id: ::std::string::String, - pub proof_try: ::ethers::core::types::Bytes, - pub proof_height: IbcCoreClientV1HeightData, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgChannelOpenConfirm(string,string,bytes,(uint64,uint64),address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgChannelOpenConfirm { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, - pub proof_ack: ::ethers::core::types::Bytes, - pub proof_height: IbcCoreClientV1HeightData, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgChannelOpenInit(string,(uint8,uint8,(string,string),string[],string),address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgChannelOpenInit { - pub port_id: ::std::string::String, - pub channel: IbcCoreChannelV1ChannelData, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgChannelOpenTry(string,(uint8,uint8,(string,string),string[],string),string,bytes,(uint64,uint64),address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgChannelOpenTry { - pub port_id: ::std::string::String, - pub channel: IbcCoreChannelV1ChannelData, - pub counterparty_version: ::std::string::String, - pub proof_init: ::ethers::core::types::Bytes, - pub proof_height: IbcCoreClientV1HeightData, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgConnectionOpenAck(string,bytes,(string,string[]),string,bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgConnectionOpenAck { - pub connection_id: ::std::string::String, - pub client_state_bytes: ::ethers::core::types::Bytes, - pub version: IbcCoreConnectionV1VersionData, - pub counterparty_connection_id: ::std::string::String, - pub proof_try: ::ethers::core::types::Bytes, - pub proof_client: ::ethers::core::types::Bytes, - pub proof_consensus: ::ethers::core::types::Bytes, - pub proof_height: IbcCoreClientV1HeightData, - pub consensus_height: IbcCoreClientV1HeightData, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgConnectionOpenConfirm(string,bytes,(uint64,uint64),address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgConnectionOpenConfirm { - pub connection_id: ::std::string::String, - pub proof_ack: ::ethers::core::types::Bytes, - pub proof_height: IbcCoreClientV1HeightData, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgConnectionOpenInit(string,(string,string[]),(string,string,(bytes)),uint64,address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgConnectionOpenInit { - pub client_id: ::std::string::String, - pub version: IbcCoreConnectionV1VersionData, - pub counterparty: IbcCoreConnectionV1CounterpartyData, - pub delay_period: u64, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgConnectionOpenTry((string,string,(bytes)),uint64,string,bytes,(string,string[])[],bytes,bytes,bytes,(uint64,uint64),(uint64,uint64),address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgConnectionOpenTry { - pub counterparty: IbcCoreConnectionV1CounterpartyData, - pub delay_period: u64, - pub client_id: ::std::string::String, - pub client_state_bytes: ::ethers::core::types::Bytes, - pub counterparty_versions: ::std::vec::Vec, - pub proof_init: ::ethers::core::types::Bytes, - pub proof_client: ::ethers::core::types::Bytes, - pub proof_consensus: ::ethers::core::types::Bytes, - pub proof_height: IbcCoreClientV1HeightData, - pub consensus_height: IbcCoreClientV1HeightData, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgCreateClient(string,bytes,bytes,address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgCreateClient { - pub client_type: ::std::string::String, - pub client_state_bytes: ::ethers::core::types::Bytes, - pub consensus_state_bytes: ::ethers::core::types::Bytes, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgPacketAcknowledgement((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,bytes,(uint64,uint64),address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgPacketAcknowledgement { - pub packet: IbcCoreChannelV1PacketData, - pub acknowledgement: ::ethers::core::types::Bytes, - pub proof: ::ethers::core::types::Bytes, - pub proof_height: IbcCoreClientV1HeightData, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgPacketRecv((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,(uint64,uint64),address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgPacketRecv { - pub packet: IbcCoreChannelV1PacketData, - pub proof: ::ethers::core::types::Bytes, - pub proof_height: IbcCoreClientV1HeightData, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgPacketTimeout((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,(uint64,uint64),uint64,address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgPacketTimeout { - pub packet: IbcCoreChannelV1PacketData, - pub proof: ::ethers::core::types::Bytes, - pub proof_height: IbcCoreClientV1HeightData, - pub next_sequence_recv: u64, - pub relayer: ::ethers::core::types::Address, -} -/// `MsgUpdateClient(string,bytes,address)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct MsgUpdateClient { - pub client_id: ::std::string::String, - pub client_message: ::ethers::core::types::Bytes, - pub relayer: ::ethers::core::types::Address, -} -/// `IbcCoreChannelV1ChannelData(uint8,uint8,(string,string),string[],string)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct IbcCoreChannelV1ChannelData { - pub state: u8, - pub ordering: u8, - pub counterparty: IbcCoreChannelV1CounterpartyData, - pub connection_hops: ::std::vec::Vec<::std::string::String>, - pub version: ::std::string::String, -} -/// `IbcCoreChannelV1CounterpartyData(string,string)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct IbcCoreChannelV1CounterpartyData { - pub port_id: ::std::string::String, - pub channel_id: ::std::string::String, -} -/// `IbcCoreChannelV1PacketData(uint64,string,string,string,string,bytes,(uint64,uint64),uint64)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, -)] -pub struct IbcCoreChannelV1PacketData { - pub sequence: u64, - pub source_port: ::std::string::String, - pub source_channel: ::std::string::String, - pub destination_port: ::std::string::String, - pub destination_channel: ::std::string::String, - pub data: ::ethers::core::types::Bytes, - pub timeout_height: IbcCoreClientV1HeightData, - pub timeout_timestamp: u64, -} -/// `IbcCoreClientV1HeightData(uint64,uint64)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - ::serde::Serialize, - ::serde::Deserialize, -)] -pub struct IbcCoreClientV1HeightData { - pub revision_number: u64, - pub revision_height: u64, -} -/// `IbcCoreCommitmentV1MerklePrefixData(bytes)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct IbcCoreCommitmentV1MerklePrefixData { - pub key_prefix: ::ethers::core::types::Bytes, -} -/// `IbcCoreConnectionV1ConnectionEndData(string,(string,string[])[],uint8,(string,string,(bytes)),uint64)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct IbcCoreConnectionV1ConnectionEndData { - pub client_id: ::std::string::String, - pub versions: ::std::vec::Vec, - pub state: u8, - pub counterparty: IbcCoreConnectionV1CounterpartyData, - pub delay_period: u64, -} -/// `IbcCoreConnectionV1CounterpartyData(string,string,(bytes))` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct IbcCoreConnectionV1CounterpartyData { - pub client_id: ::std::string::String, - pub connection_id: ::std::string::String, - pub prefix: IbcCoreCommitmentV1MerklePrefixData, -} -/// `IbcCoreConnectionV1VersionData(string,string[])` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct IbcCoreConnectionV1VersionData { - pub identifier: ::std::string::String, - pub features: ::std::vec::Vec<::std::string::String>, -} -/// `UnionIbcLightclientsCometblsV1HeaderData((int64,(int64,int64),bytes,bytes,bytes),(uint64,uint64),bytes)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct UnionIbcLightclientsCometblsV1HeaderData { - pub signed_header: UnionIbcLightclientsCometblsV1LightHeaderData, - pub trusted_height: IbcCoreClientV1HeightData, - pub zero_knowledge_proof: ::ethers::core::types::Bytes, -} -/// `UnionIbcLightclientsCometblsV1LightHeaderData(int64,(int64,int64),bytes,bytes,bytes)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, -)] -pub struct UnionIbcLightclientsCometblsV1LightHeaderData { - pub height: i64, - pub time: GoogleProtobufTimestampData, - pub validators_hash: ::ethers::core::types::Bytes, - pub next_validators_hash: ::ethers::core::types::Bytes, - pub app_hash: ::ethers::core::types::Bytes, -} diff --git a/generated/rust/contracts/src/ucs01_relay.rs b/generated/rust/contracts/src/ucs01_relay.rs deleted file mode 100644 index 6e1ecee1d2..0000000000 --- a/generated/rust/contracts/src/ucs01_relay.rs +++ /dev/null @@ -1,3639 +0,0 @@ -pub use ucs01_relay::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types -)] -pub mod ucs01_relay { - pub use super::super::shared_types::*; - #[cfg(feature = "providers")] - #[allow(deprecated)] - #[cfg(feature = "providers")] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { - inputs: ::std::vec![], - }), - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("UPGRADE_INTERFACE_VERSION"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("UPGRADE_INTERFACE_VERSION",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getDenomAddress"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getDenomAddress"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("sourceChannel"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("denom"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("getOutstanding"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getOutstanding"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("sourceChannel"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("token"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ibcAddress"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("ibcAddress"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("initialize"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("initialize"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_ibcHandler"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("contract IIBCPacket"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("admin"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("onAcknowledgementPacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onAcknowledgementPacket",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ibcPacket"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Packet.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("acknowledgement"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("onChanCloseConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onChanCloseConfirm"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("onChanCloseInit"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onChanCloseInit"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("onChanOpenAck"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onChanOpenAck"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterpartyVersion",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("relayer"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("onChanOpenConfirm"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onChanOpenConfirm"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("onChanOpenInit"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onChanOpenInit"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("order"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.Order", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("relayer"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("onChanOpenTry"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onChanOpenTry"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("order"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "enum IbcCoreChannelV1GlobalEnums.Order", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Counterparty.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("counterpartyVersion",), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("relayer"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("onRecvPacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onRecvPacket"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ibcPacket"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Packet.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("relayer"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("onRecvPacketProcessing"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onRecvPacketProcessing",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ibcPacket"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Packet.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("onTimeoutPacket"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onTimeoutPacket"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("ibcPacket"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreChannelV1Packet.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("owner"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("owner"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("paused"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("paused"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("proxiableUUID"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("proxiableUUID"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("renounceOwnership"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("renounceOwnership"), - inputs: ::std::vec![], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("send"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("send"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("sourceChannel"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("receiver"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("tokens"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Address, - ::ethers::core::abi::ethabi::ParamType::Uint(128usize), - ],), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct LocalToken[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("extension"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("timeoutHeight"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IbcCoreClientV1Height.Data", - ), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("timeoutTimestamp"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("transferOwnership"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferOwnership"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("newOwner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("updateMetadata"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("updateMetadata"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("denom"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("contract IERC20Denom"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("newName"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("newSymbol"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("newDecimals"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("upgradeToAndCall"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("upgradeToAndCall"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("newImplementation"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - },], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("DenomCreated"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("DenomCreated"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("packetSequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("denom"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("token"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Initialized"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Initialized"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("OwnershipTransferred"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("OwnershipTransferred",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("previousOwner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("newOwner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Paused"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Paused"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Received"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Received"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("packetSequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sender"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("receiver"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("denom"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("token"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Refunded"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Refunded"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("packetSequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("receiver"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("denom"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("token"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Sent"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Sent"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("packetSequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("channelId"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("receiver"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("denom"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("token"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - indexed: false, - }, - ], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Unpaused"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Unpaused"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: false, - },], - anonymous: false, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("Upgraded"), - ::std::vec![::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Upgraded"), - inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("implementation"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - },], - anonymous: false, - },], - ), - ]), - errors: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("AddressEmptyCode"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("AddressEmptyCode"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("target"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("AddressInsufficientBalance"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("AddressInsufficientBalance",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC1967InvalidImplementation"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC1967InvalidImplementation",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("implementation"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ERC1967NonPayable"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ERC1967NonPayable"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("EnforcedPause"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("EnforcedPause"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidAcknowledgement"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidAcknowledgement",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidAmount"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidAmount"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidBytesAddress"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidBytesAddress",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidCounterpartyProtocolVersion"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned( - "ErrInvalidCounterpartyProtocolVersion", - ), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidHexAddress"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidHexAddress",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidProtocolOrdering"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidProtocolOrdering",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrInvalidProtocolVersion"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrInvalidProtocolVersion",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrNotIBC"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrNotIBC"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrUnauthorized"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrUnauthorized"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ErrUnstoppable"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ErrUnstoppable"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("ExpectedPause"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ExpectedPause"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("FailedInnerCall"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("FailedInnerCall"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("InvalidInitialization"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("InvalidInitialization",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("NotInitializing"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("NotInitializing"), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("OwnableInvalidOwner"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("OwnableInvalidOwner",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("OwnableUnauthorizedAccount"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("OwnableUnauthorizedAccount",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("SafeERC20FailedOperation"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("SafeERC20FailedOperation",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("token"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("UUPSUnauthorizedCallContext"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("UUPSUnauthorizedCallContext",), - inputs: ::std::vec![], - },], - ), - ( - ::std::borrow::ToOwned::to_owned("UUPSUnsupportedProxiableUUID"), - ::std::vec![::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("UUPSUnsupportedProxiableUUID",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("slot"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - },], - ), - ]), - receive: false, - fallback: false, - } - } - /// The parsed JSON ABI of the contract. - #[cfg(feature = "providers")] - pub static UCS01RELAY_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __BYTECODE: &[u8] = b"`\xA0\x80`@R4b\0\0\xD1W0`\x80R\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0\x90\x81T\x90`\xFF\x82`@\x1C\x16b\0\0\xC2WP`\x01`\x01`@\x1B\x03`\x02`\x01`@\x1B\x03\x19\x82\x82\x16\x01b\0\0|W[`@QaW\x8E\x90\x81b\0\0\xD7\x829`\x80Q\x81\x81\x81a\x0B\x15\x01Ra\r\x96\x01R\xF3[`\x01`\x01`@\x1B\x03\x19\x90\x91\x16\x81\x17\x90\x91U`@Q\x90\x81R\x7F\xC7\xF5\x05\xB2\xF3q\xAE!u\xEEI\x13\xF4I\x9E\x1F&3\xA7\xB5\x93c!\xEE\xD1\xCD\xAE\xB6\x11Q\x81\xD2\x90` \x90\xA18\x80\x80b\0\0\\V[c\xF9.\xE8\xA9`\xE0\x1B\x81R`\x04\x90\xFD[`\0\x80\xFD\xFE`\x80`@R`\x046\x10\x15b\0\0\x13W`\0\x80\xFD[`\x005`\xE0\x1C\x80c!\x8D\x1E>\x14b\0\x01\xAFW\x80c#\x01\xC6\xF5\x14b\0\x01\xA9W\x80c+f\xB1\x16\x14b\0\x01\xA3W\x80c:t\xCE&\x14b\0\x01\x9DW\x80c?A\xC9\xEA\x14b\0\x01gW\x80cH\\\xC9U\x14b\0\x01\x97W\x80cO\x1E\xF2\x86\x14b\0\x01\x91W\x80cR\xC7\x15}\x14b\0\x01\x8BW\x80cR\xD1\x90-\x14b\0\x01\x85W\x80c\\\x97Z\xBB\x14b\0\x01\x7FW\x80c`\xCAV\xEB\x14b\0\x01yW\x80cij\x9B\xF4\x14b\0\x01sW\x80cqP\x18\xA6\x14b\0\x01mW\x80cu8\xEDh\x14b\0\x01gW\x80c\x8D\xA5\xCB[\x14b\0\x01aW\x80c\xA5\xB7\xE1x\x14b\0\x01[W\x80c\xAD<\xB1\xCC\x14b\0\x01UW\x80c\xBD\x95\x0F\x89\x14b\0\x01OW\x80c\xEC\x1B\xD8\x97\x14b\0\x01IW\x80c\xF2\xF8?z\x14b\0\x01CW\x80c\xF2\xFD\xE3\x8B\x14b\0\x01=W\x80c\xF8(\x8C\xC6\x14b\0\x017Wc\xFB\x8BS.\x14b\0\x011W`\0\x80\xFD[b\0\x1B\xE0V[b\0\x1B\xC0V[b\0\x1BmV[b\0\x1A\x84V[b\0\x19FV[b\0\x12\x88V[b\0\x12\x06V[b\0\x11'V[b\0\x10QV[b\0\x08\x12V[b\0\x0F\x8BV[b\0\x0F7V[b\0\x0EsV[b\0\x0E\x11V[b\0\rNV[b\0\x0C\xDEV[b\0\n\x8EV[b\0\x08\\V[b\0\x06\xEEV[b\0\x06MV[b\0\x04\x8EV[b\0\x02\xADV[`\x045\x90`\x03\x82\x10\x15b\0\x01\xC5WV[`\0\x80\xFD[\x91\x81`\x1F\x84\x01\x12\x15b\0\x01\xC5W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11b\0\x01\xC5W` \x80\x85\x01\x94\x84`\x05\x1B\x01\x01\x11b\0\x01\xC5WV[\x91\x81`\x1F\x84\x01\x12\x15b\0\x01\xC5W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11b\0\x01\xC5W` \x83\x81\x86\x01\x95\x01\x01\x11b\0\x01\xC5WV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF|`@\x91\x01\x12b\0\x01\xC5W`\x84\x90V[\x90\x81`@\x91\x03\x12b\0\x01\xC5W\x90V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x03b\0\x01\xC5WV[`\xE45\x90b\0\x02\x9C\x82b\0\x02nV[V[`\xC45\x90b\0\x02\x9C\x82b\0\x02nV[4b\0\x01\xC5Wa\x01\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wb\0\x02\xE9b\0\x01\xB5V[`$5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x83\x11b\0\x01\xC5Wb\0\x03\x10`\x04\x936\x90\x85\x01b\0\x01\xCAV[PP`D5\x82\x81\x11b\0\x01\xC5Wb\0\x03,\x906\x90\x85\x01b\0\x01\xFEV[PP`d5\x82\x81\x11b\0\x01\xC5Wb\0\x03H\x906\x90\x85\x01b\0\x01\xFEV[PP`\x845\x82\x81\x11b\0\x01\xC5Wb\0\x03d\x906\x90\x85\x01b\0\x02_V[P`\xA45\x82\x81\x11b\0\x01\xC5Wb\0\x03\x7F\x906\x90\x85\x01b\0\x01\xFEV[\x90\x92`\xC45\x90\x81\x11b\0\x01\xC5Wb\0\x03\xB3\x94b\0\x03\x9F\x916\x91\x01b\0\x01\xFEV[\x93\x90\x92b\0\x03\xACb\0\x02\x8DV[Pb\0\x1D\xAEV[\0[\x90\x81a\x01 \x91\x03\x12b\0\x01\xC5W\x90V[`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x82\x01\x12b\0\x01\xC5W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11b\0\x01\xC5Wb\0\x04\x12\x91`\x04\x01b\0\x03\xB5V[\x90`$5b\0\x04!\x81b\0\x02nV[\x90V[`\0[\x83\x81\x10b\0\x048WPP`\0\x91\x01RV[\x81\x81\x01Q\x83\x82\x01R` \x01b\0\x04'V[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F` \x93b\0\x04\x87\x81Q\x80\x92\x81\x87R\x87\x80\x88\x01\x91\x01b\0\x04$V[\x01\x16\x01\x01\x90V[4b\0\x01\xC5Wb\0\x04\xCDb\0\x04\xB8b\0\x04\xA76b\0\x03\xC5V[\x90b\0\x04\xB2b\0,\xB6V[b\0\x1F\xA5V[`@Q\x91\x82\x91` \x83R` \x83\x01\x90b\0\x04IV[\x03\x90\xF3[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11b\0\x05\x15W`@RV[b\0\x04\xD1V[`@\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17b\0\x05\x15W`@RV[`\xA0\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17b\0\x05\x15W`@RV[\x90`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17b\0\x05\x15W`@RV[`@Q\x90`\x80\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17b\0\x05\x15W`@RV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11b\0\x05\x15W`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16` \x01\x90V[\x92\x91\x92b\0\x06\x01\x82b\0\x05\xB8V[\x91b\0\x06\x11`@Q\x93\x84b\0\x05UV[\x82\x94\x81\x84R\x81\x83\x01\x11b\0\x01\xC5W\x82\x81` \x93\x84`\0\x96\x017\x01\x01RV[\x90\x80`\x1F\x83\x01\x12\x15b\0\x01\xC5W\x81` b\0\x04!\x935\x91\x01b\0\x05\xF3V[4b\0\x01\xC5W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11b\0\x01\xC5Wb\0\x06\xE5b\0\x06\xA7` \x926\x90`\x04\x01b\0\x06/V[b\0\x06\xC0`$5\x91b\0\x06\xBA\x83b\0\x02nV[b\0!\xDBV[\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0R` R`@`\0 \x90V[T`@Q\x90\x81R\xF3[4b\0\x01\xC5W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11b\0\x01\xC5Wb\0\x07C\x906\x90`\x04\x01b\0\x06/V[`$5\x91\x82\x11b\0\x01\xC5Wb\0\x07\x8Cs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91b\0\x07\x85b\0\x07~` \x956\x90`\x04\x01b\0\x06/V[\x91b\0\"\x03V[\x90b\0\"+V[T\x16`@Q\x90\x81R\xF3[``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x82\x01\x12b\0\x01\xC5Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91`\x045\x83\x81\x11b\0\x01\xC5W\x82b\0\x07\xE5\x91`\x04\x01b\0\x01\xFEV[\x93\x90\x93\x92`$5\x91\x82\x11b\0\x01\xC5Wb\0\x08\x02\x91`\x04\x01b\0\x01\xFEV[\x90\x91`D5b\0\x04!\x81b\0\x02nV[4b\0\x01\xC5Wb\0\x08#6b\0\x07\x96V[PPPPPb\0\x082b\0,\xB6V[`\x04`@Q\x7F\x067\xC7\x96\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4b\0\x01\xC5W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W`\x045b\0\x08\x9B\x81b\0\x02nV[`$5\x90b\0\x08\xAA\x82b\0\x02nV[\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0T\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xFF\x84`@\x1C\x16\x15\x93\x16\x80\x15\x90\x81b\0\n\x85W[`\x01\x14\x90\x81b\0\nzW[\x15\x90\x81b\0\npW[Pb\0\nFWb\0\te\x91\x83b\0\tZ\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0`\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\x82T\x16\x17\x90UV[b\0\t\xE8Wb\0\"SV[b\0\tlW\0[b\0\t\xB9\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81T\x16\x90UV[`@Q`\x01\x81R\x7F\xC7\xF5\x05\xB2\xF3q\xAE!u\xEEI\x13\xF4I\x9E\x1F&3\xA7\xB5\x93c!\xEE\xD1\xCD\xAE\xB6\x11Q\x81\xD2\x90` \x90\xA1\0[b\0\n@\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0h\x01\0\0\0\0\0\0\0\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82T\x16\x17\x90UV[b\0\"SV[`\x04`@Q\x7F\xF9.\xE8\xA9\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x158b\0\x08\xFEV[0;\x15\x91Pb\0\x08\xF5V[\x84\x91Pb\0\x08\xEAV[`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W`\x04\x805\x90b\0\n\xC9\x82b\0\x02nV[`$5g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11b\0\x01\xC5W6`#\x82\x01\x12\x15b\0\x01\xC5Wb\0\n\xFD\x906\x90`$\x81\x85\x015\x91\x01b\0\x05\xF3V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x7F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x800\x14\x90\x81\x15b\0\x0C\xAFW[Pb\0\x0C\x86W\x90` \x83\x92b\0\x0BVb\x000\xDFV[`@Q\x93\x84\x80\x92\x7FR\xD1\x90-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82R\x88\x16Z\xFA`\0\x92\x81b\0\x0CNW[Pb\0\x0B\xE3WPP`@Q\x7FL\x9C\x8C\xE3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x92\x16\x90\x82\x01\x90\x81R\x81\x90` \x01\x03\x90\xFD[\x83\x83\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x84\x03b\0\x0C\x19Wb\0\x03\xB3\x83\x83b\0:tV[`@Q\x7F\xAA\x1DI\xA4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\x90\x81\x01\x84\x81R\x81\x90` \x01\x03\x90\xFD[b\0\x0Cv\x91\x93P` =` \x11b\0\x0C~W[b\0\x0Cm\x81\x83b\0\x05UV[\x81\x01\x90b\0-fV[\x918b\0\x0B\x8EV[P=b\0\x0CaV[\x82`@Q\x7F\xE0|\x8D\xBA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x81\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBCT\x16\x14\x158b\0\x0BAV[4b\0\x01\xC5Wb\0\x03\xB3b\0\r1b\0\x0C\xF76b\0\x03\xC5V[Pb\0\r\x02b\0,\xB6V[b\0\r;\x815\x91b\0\r\x14\x83b\0\x10\xF8V[b\0\r#`@\x82\x01\x82b\0\"\xB9V[\x94\x90\x91`\xA0\x81\x01\x90b\0\"\xB9V[P\x936\x91b\0\x05\xF3V[\x90b\0-\xBAV[`\0\x91\x03\x12b\0\x01\xC5WV[4b\0\x01\xC5W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x160\x03b\0\r\xE7W` `@Q\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x81R\xF3[`\x04`@Q\x7F\xE0|\x8D\xBA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4b\0\x01\xC5W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W` `\xFF\x7F\xCD^\xD1\\n\x18~w\xE9\xAE\xE8\x81\x84\xC2\x1FO!\x82\xABX'\xCB;~\x07\xFB\xED\xCDc\xF03\0T\x16`@Q\x90\x15\x15\x81R\xF3[4b\0\x01\xC5W`\xA0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11b\0\x01\xC5Wb\0\x0E\xC8\x906\x90`\x04\x01b\0\x01\xFEV[PP`$5\x81\x81\x11b\0\x01\xC5Wb\0\x0E\xE5\x906\x90`\x04\x01b\0\x01\xFEV[PP`D5\x81\x81\x11b\0\x01\xC5Wb\0\x0F\x02\x906\x90`\x04\x01b\0\x01\xFEV[PP`d5\x90\x81\x11b\0\x01\xC5Wb\0\x0F#b\0\x03\xB3\x916\x90`\x04\x01b\0\x01\xFEV[\x90b\0\x0F1`\x845b\0\x02nV[b\0#\rV[4b\0\x01\xC5W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\0T\x16`@Q\x90\x81R\xF3[4b\0\x01\xC5W`\0\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x10NWb\0\x0F\xC7b\x000\xDFV[\x80s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\x90\x16\xD0\x9Dr\xD4\x0F\xDA\xE2\xFD\x8C\xEA\xC6\xB6#Lw\x06!O\xD3\x9C\x1C\xD1\xE6\t\xA0R\x8C\x19\x93\0\x80T\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\x16\x90U\x16\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x82\x80\xA3\x80\xF3[\x80\xFD[4b\0\x01\xC5W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\x90\x16\xD0\x9Dr\xD4\x0F\xDA\xE2\xFD\x8C\xEA\xC6\xB6#Lw\x06!O\xD3\x9C\x1C\xD1\xE6\t\xA0R\x8C\x19\x93\0T\x16`@Q\x90\x81R\xF3[\x91\x81`\x1F\x84\x01\x12\x15b\0\x01\xC5W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11b\0\x01\xC5W` \x80\x85\x01\x94\x84`\x06\x1B\x01\x01\x11b\0\x01\xC5WV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x03b\0\x01\xC5WV[`\xC45\x90b\0\x02\x9C\x82b\0\x10\xF8V[5\x90b\0\x02\x9C\x82b\0\x10\xF8V[4b\0\x01\xC5W`\xE0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11b\0\x01\xC5Wb\0\x11|\x906\x90`\x04\x01b\0\x01\xFEV[`$5\x83\x81\x11b\0\x01\xC5Wb\0\x11\x97\x906\x90`\x04\x01b\0\x01\xFEV[\x90`D5\x85\x81\x11b\0\x01\xC5Wb\0\x11\xB3\x906\x90`\x04\x01b\0\x10\xC4V[\x90`d5\x96\x87\x11b\0\x01\xC5Wb\0\x11\xD3b\0\x03\xB3\x976\x90`\x04\x01b\0\x01\xFEV[\x94\x90\x93b\0\x11\xE16b\0\x02/V[\x96b\0\x11\xECb\0\x11\x0BV[\x98b\0% V[\x90` b\0\x04!\x92\x81\x81R\x01\x90b\0\x04IV[4b\0\x01\xC5W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wb\0\x04\xCD`@Qb\0\x12I\x81b\0\x05\x1BV[`\x05\x81R\x7F5.0.0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R`@Q\x91\x82\x91` \x83R` \x83\x01\x90b\0\x04IV[4b\0\x01\xC5Wb\0\x12\x996b\0\x03\xC5V[P03\x03b\0\x19\x1CWb\0\x12\xFCb\0\x12\xB5`\xA0\x83\x01\x83b\0\"\xB9V[P\x91b\0\x12\xC6` \x82\x01\x82b\0\"\xB9V[\x92\x90b\0\x12\xF5`@\x84\x01\x94b\0\x12\xECb\0\x12\xE1\x87\x87b\0\"\xB9V[\x94\x90\x926\x91b\0\x05\xF3V[\x926\x91b\0\x05\xF3V[\x90b\x005TV[\x90`@\x84\x01\x92b\0\x13\x0E\x84\x86b\0'\xE2V[\x94\x90P`\0[\x85\x81\x10b\0\x13\x1EW\0[b\0\x13@b\0\x13:\x82b\0\x133\x85\x8Bb\0'\xE2V[\x90b\0(9V[b\0({V[\x90b\0\x13xb\0\x13c` \x84\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x15b\0\x18\xF2W\x85\x88b\0\x13\xE8b\0\x13\xE4b\0\x13\xD0b\0\x13\xCAb\0\x13\xC2b\0\x13\xB6b\0\x13\xAFb\0\x13\xA8\x8BQb\x005\xE8V[\x98b\x005\xE8V[\x88b\x006\xA1V[\x95` \x81\x01\x90b\0\"\xB9V[6\x91b\0\x05\xF3V[b\x007!V[\x93b\0\x13\xDD\x87Qb\x005\xE8V[\x90b\x007\xADV[\x15\x90V[\x15b\0\x15\xF0W\x92b\0\x13\xFEb\0\x14\xD2\x94b\08\x08V[b\0\x14\t\x81b\09\x0BV[\x91b\0\x14eb\0\x14\\\x84o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFb\0\x143`\x80\x8E\x01\x8Eb\0\"\xB9V[\x93\x90b\0\x14S` \x88\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x946\x91b\0\x05\xF3V[\x92\x16\x91b\09\xFAV[` \x81\x81\x01Q`@Q\x7F\xA9\x05\x9C\xBB\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x16`\x04\x82\x01Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16`$\x82\x01R\x96\x87\x90\x81\x90`D\x82\x01\x90V[\x03\x81`\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x88\x16Z\xF1\x92\x83\x15b\0\x15\xEAWb\0\x15\xAAb\0\x13\xC2\x7F\xCC\xE45\xD1j\xA7\x12/9o\x8BWl\x1F\0/\xF5\x8CL*R\xA3\xB7\x9CO\xD9\nm\xD2\x1E\x05\x92\x94\x8F\x94`\x01\x9A\x8E\x98b\0\x15\xB4W[P[b\0\x15\x81` b\0\x15ib\0\x15cb\0\x15Yb\0\x15M\x8Db\0\"\xADV[\x9C`\x80\x81\x01\x90b\0\"\xB9V[\x97\x90\x9A\x80b\0\"\xB9V[b\x004\xD5V[\x92\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x92s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x96\x87`@Q\x98\x89\x98\x16\x9B\x16\x99\x87b\0+UV[\x03\x90\xA3\x01b\0\x13\x14V[b\0\x15\xDA\x90` =` \x11b\0\x15\xE2W[b\0\x15\xD1\x81\x83b\0\x05UV[\x81\x01\x90b\0+;V[P8b\0\x15.V[P=b\0\x15\xC5V[b\0$\xB1V[Pb\0\x165b\0\x16\x04``\x88\x01\x88b\0\"\xB9V[b\0\x12\xECb\0\x16.`\x80\x8B\x95\x94\x95\x01\x94b\0\x16 \x86\x8Db\0\"\xB9V[\x93\x90\x91\x8AQ\x956\x91b\0\x05\xF3V[\x90b\x007\xB9V[b\0\x16ub\0\x16[b\0\x16Tb\0\x16M\x85\x8Cb\0\"\xB9V[\x90b\0(\xD0V[\x83b\0\"+V[Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x84\x16\x15b\0\x17\x8FW[P\x82\x16\x94b\0\x16\xB8` \x82\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x95\x80;\x15b\0\x01\xC5W`@Q\x7F@\xC1\x0F\x19\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x86\x16`\x04\x82\x01Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x97\x90\x97\x16`$\x88\x01R`\0\x90\x87\x90`D\x90\x82\x90\x84\x90Z\xF1\x92\x83\x15b\0\x15\xEAWb\0\x15\xAAb\0\x13\xC2\x7F\xCC\xE45\xD1j\xA7\x12/9o\x8BWl\x1F\0/\xF5\x8CL*R\xA3\xB7\x9CO\xD9\nm\xD2\x1E\x05\x92\x94\x8F\x94`\x01\x9A\x8E\x98b\0\x17qW[Pb\0\x150V[\x80b\0\x17\x81b\0\x17\x88\x92b\0\x05\0V[\x80b\0\rBV[8b\0\x17jV[\x82Q` \x84\x01 `@Q\x91\x94Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91a\x14\xF2\x80\x82\x01\x84\x81\x11\x83\x82\x10\x17b\0\x05\x15W\x86b\0\x17\xCC\x91\x84\x93b\0B\x9C\x859b\0\x11\xF3V[\x03\x90`\0\xF5\x80\x15b\0\x15\xEAW\x8A\x85\x84\x86\x93\x16b\0\x17\xEC\x81\x98\x82\x94b\0\"\xB9V[b\0\x17\xF7\x91b\0(\xD0V[b\0\x18\x03\x90\x85b\0\"+V[\x90b\0\x18I\x91\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82T\x16\x17\x90UV[b\0\x18U\x90\x8Db\0\"\xB9V[b\0\x18`\x91b\0(\xE9V[\x90b\0\x18\x8B\x91\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0R` R`@`\0 \x90V[\x90b\0\x18\x97\x91b\0)\xB3V[b\0\x18\xA2\x8Ab\0\"\xADV[\x90b\0\x18\xAF\x8A\x8Cb\0\"\xB9V[\x92\x90\x86\x86`@Q\x94\x85\x94\x16\x95b\0\x18\xC7\x93\x85b\0*\xF0V[\x03\x7F\x0F\xD7\xE5\xA6IT\xF5t\xDBo\x85Q\xC9\\*\xC0j\xA8\xDE\xD0\xC8\xAC\xA4\xED\xE8\x82\xC4O\x02\xA2E\xAD\x91\xA28b\0\x16\x96V[`\x04`@Q\x7F\xB3r`\x16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xCC\x12\xCE\xF6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4b\0\x01\xC5W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`\x80\x816\x01\x12b\0\x01\xC5W`\x045b\0\x19\x86\x81b\0\x02nV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$5\x81\x81\x11b\0\x01\xC5Wb\0\x19\xAA\x906\x90`\x04\x01b\0\x01\xFEV[\x90\x91`D5\x90\x81\x11b\0\x01\xC5Wb\0\x19\xC7\x906\x90`\x04\x01b\0\x01\xFEV[\x92\x90\x94`d5\x94`\xFF\x86\x16\x80\x96\x03b\0\x01\xC5Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90b\0\x19\xFAb\x000\xDFV[\x16\x92\x83;\x15b\0\x01\xC5W`\0\x95b\0\x1Aa\x87\x93b\0\x1AQ\x97`@Q\x9A\x8B\x99\x8A\x98\x89\x97\x7FrY4t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x89R```\x04\x8A\x01R`d\x89\x01\x91b\0\x1E\xFEV[\x92\x86\x84\x03\x01`$\x87\x01Rb\0\x1E\xFEV[\x90`D\x83\x01R\x03\x92Z\xF1\x80\x15b\0\x15\xEAWb\0\x1AyW\0[b\0\x03\xB3\x90b\0\x05\0V[4b\0\x01\xC5W`\xE0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wb\0\x1A\xBFb\0\x01\xB5V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90`$5\x82\x81\x11b\0\x01\xC5Wb\0\x1A\xE4\x906\x90`\x04\x01b\0\x01\xCAV[PP`D5\x82\x81\x11b\0\x01\xC5Wb\0\x1B\x01\x906\x90`\x04\x01b\0\x01\xFEV[PP`d5\x82\x81\x11b\0\x01\xC5Wb\0\x1B\x1E\x906\x90`\x04\x01b\0\x01\xFEV[PP`\x845\x82\x81\x11b\0\x01\xC5Wb\0\x1B;\x906\x90`\x04\x01b\0\x02_V[P`\xA45\x91\x82\x11b\0\x01\xC5Wb\0\x1B[b\0\x03\xB3\x926\x90`\x04\x01b\0\x01\xFEV[\x91b\0\x1Bfb\0\x02\x9EV[Pb\0+\xB9V[4b\0\x01\xC5W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wb\0\x03\xB3`\x045b\0\x1B\xB0\x81b\0\x02nV[b\0\x1B\xBAb\x000\xDFV[b\0+\xE8V[4b\0\x01\xC5Wb\0\x1B\xD16b\0\x07\x96V[PPPPPb\0\x03\xB3b\0,\xB6V[4b\0\x01\xC5W``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11b\0\x01\xC5Wb\0\x1C5\x906\x90`\x04\x01b\0\x03\xB5V[\x90`$5\x90\x81\x11b\0\x01\xC5Wb\0\x1CQ\x906\x90`\x04\x01b\0\x01\xFEV[b\0\x1C^`D5b\0\x02nV[b\0\x1Chb\0,\xB6V[`\x01\x81\x14\x80\x15\x90b\0\x1D,W[b\0\x1D\x02Wb\0\x1C\xABb\0\x1C\xD1\x91\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x93b\0,\xACV[5\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x90V[\x16\x15b\0\x1C\xDAW\0[b\0\r1\x81b\0\r;b\0\x1C\xF2b\0\x03\xB3\x94b\0\"\xADV[\x91b\0\r#`@\x82\x01\x82b\0\"\xB9V[`\x04`@Q\x7Fn\xC7\xD3?\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[P\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x80b\0\x1D_b\0\x1C\xAB\x84\x86b\0,\xACV[\x16\x15\x15\x90\x81b\0\x1DqW[Pb\0\x1CuV[\x7F\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x91Pb\0\x1D\xA4b\0\x1C\xAB\x84\x86b\0,\xACV[\x16\x14\x158b\0\x1DjV[\x91b\0\x1D\xC9\x91b\0\x1D\xC3\x91b\0\x13\xC2b\0,\xB6V[b\0-\x02V[\x15b\0\x1E\x81W`\x03\x81\x10\x15b\0\x1ERW`\x01\x03b\0\x1E(Wb\0\x1D\xC3b\0\x13\xE4\x91b\0\x1D\xF7\x936\x91b\0\x05\xF3V[b\0\x1D\xFEWV[`\x04`@Q\x7F\xBB\x92\x85\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xB8Rne\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`!`\x04R`$`\0\xFD[`\x04`@Q\x7F=?w \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x905\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x826\x03\x01\x81\x12\x15b\0\x01\xC5W\x01` \x815\x91\x01\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11b\0\x01\xC5W\x816\x03\x83\x13b\0\x01\xC5WV[`\x1F\x82` \x94\x93\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x81\x86R\x86\x86\x017`\0\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x90V[` \x90\x81\x815\x91b\0\x1FO\x83b\0\x10\xF8V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x93\x16\x85R\x015b\0\x1Fj\x81b\0\x10\xF8V[\x16\x91\x01RV[=\x15b\0\x1F\xA0W=\x90b\0\x1F\x84\x82b\0\x05\xB8V[\x91b\0\x1F\x94`@Q\x93\x84b\0\x05UV[\x82R=`\0` \x84\x01>V[``\x90V[\x90`\0\x80\x91`@Q\x80\x94b\0!3` \x83\x01\x93\x7F\xBD\x95\x0F\x89\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x85R`@`$\x85\x01Rb\0 \x03`d\x85\x01b\0\x1F\xF5\x85b\0\x11\x1AV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90RV[b\0!\x16b\0!\x04a\x01\0b\0 \xE9\x87b\0 \xC8b\0 \xA8b\0 \x88b\0 Fb\0 2` \x8D\x01\x8Db\0\x1E\xABV[a\x01 `\x84\x88\x01Ra\x01\x84\x87\x01\x91b\0\x1E\xFEV[b\0 U`@\x8D\x01\x8Db\0\x1E\xABV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x9C\x96`\xA4\x88\x82\x86\x03\x01\x91\x01Rb\0\x1E\xFEV[b\0 \x97``\x8C\x01\x8Cb\0\x1E\xABV[\x8D\x83\x03\x86\x01`\xC4\x8F\x01R\x90b\0\x1E\xFEV[b\0 \xB7`\x80\x8B\x01\x8Bb\0\x1E\xABV[\x8C\x83\x03\x85\x01`\xE4\x8E\x01R\x90b\0\x1E\xFEV[\x90b\0 \xD8`\xA0\x8A\x01\x8Ab\0\x1E\xABV[\x91\x8B\x84\x03\x01a\x01\x04\x8C\x01Rb\0\x1E\xFEV[\x95b\0 \xFDa\x01$\x89\x01`\xC0\x83\x01b\0\x1F=V[\x01b\0\x11\x1AV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x01d\x86\x01RV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`D\x84\x01RV[\x03\x93b\0!g\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x95\x86\x81\x01\x83R\x82b\0\x05UV[Q\x90\x820Z\xF1b\0!wb\0\x1FpV[P\x15b\0!\xC0W`@Q\x7F\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R\x90b\0\x04!\x90\x82`!\x81\x01[\x03\x90\x81\x01\x83R\x82b\0\x05UV[`@Q`\0` \x82\x01R\x90b\0\x04!\x90\x82`!\x81\x01b\0!\xB3V[` b\0!\xF6\x91\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01b\0\x04$V[\x81\x01`\x03\x81R\x03\x01\x90 \x90V[` b\0\"\x1E\x91\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01b\0\x04$V[\x81\x01`\x01\x81R\x03\x01\x90 \x90V[` \x90b\0\"G\x92\x82`@Q\x94\x83\x86\x80\x95Q\x93\x84\x92\x01b\0\x04$V[\x82\x01\x90\x81R\x03\x01\x90 \x90V[b\0\"\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92b\0\"wb\0:\x1AV[b\0\x1B\xBAb\0:\x1AV[\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0T\x16\x17`\0UV[5b\0\x04!\x81b\0\x10\xF8V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15b\0\x01\xC5W\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11b\0\x01\xC5W` \x01\x91\x816\x03\x83\x13b\0\x01\xC5WV[b\0\x1D\xC3\x90b\0#!\x92b\0\x13\xC2b\0,\xB6V[\x15b\0\x1D\xFEWV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11b\0\x05\x15W`\x05\x1B` \x01\x90V[\x90b\0#N\x82b\0#)V[`@\x90b\0#``@Q\x91\x82b\0\x05UV[\x83\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0b\0#\x90\x82\x95b\0#)V[\x01\x91`\0\x90`\0[\x84\x81\x10b\0#\xA7WPPPPPV[` \x90\x82Qb\0#\xB7\x81b\0\x05\x1BV[``\x81R\x82\x85\x81\x83\x01R\x82\x87\x01\x01R\x01b\0#\x98V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[\x91\x90\x81\x10\x15b\0$\rW`\x06\x1B\x01\x90V[b\0#\xCDV[\x80Q\x82\x10\x15b\0$\rW` \x91`\x05\x1B\x01\x01\x90V[o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x03b\0\x01\xC5WV[5b\0\x04!\x81b\0$(V[\x90\x81` \x91\x03\x12b\0\x01\xC5WQb\0\x04!\x81b\0\x10\xF8V[\x91\x93b\0$\x9Db\0$\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93b\0\x04!\x98\x96\x97`\xA0\x87R`\xA0\x87\x01\x91b\0\x1E\xFEV[\x95` \x85\x01\x90b\0\x1F=V[\x16``\x82\x01R`\x80\x81\x84\x03\x91\x01Rb\0\x04IV[`@Q=`\0\x82>=\x90\xFD[5b\0\x04!\x81b\0\x02nV[\x96\x95\x94\x91\x93b\0$\xFD`\x80\x95b\0%\x1B\x95g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFb\0%\x0C\x95\x16\x8BR`\xA0` \x8C\x01R`\xA0\x8B\x01\x91b\0\x1E\xFEV[\x90\x88\x82\x03`@\x8A\x01Rb\0\x04IV[\x90\x86\x82\x03``\x88\x01Rb\0\x04IV[\x93\x01RV[\x96\x99\x98\x94\x99\x97\x95\x93\x97\x91\x90\x91b\0%7\x8Bb\0#BV[\x96`\0[\x8C\x81\x10b\0'rWP\x90\x88\x99\x9A\x9B\x91`@\x97`@Q\x90` \x98\x89\x94\x833\x87\x82\x01\x90b\0%\x8F\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0`\x14\x92``\x1B\x16\x81R\x01\x90V[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x85Rb\0%\xC1\x90\x85b\0\x05UV[b\0%\xCBb\0\x05\x97V[\x93\x84Rb\0%\xDB6\x8B\x8Ab\0\x05\xF3V[\x86\x85\x01R\x8C`@\x85\x01R6\x90b\0%\xF2\x92b\0\x05\xF3V[``\x83\x01R`\0Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x91b\0&\x1C\x90b\x003\xC1V[\x92`@Q\x9C\x8D\x94\x85\x93\x84\x93\x7Fl\xF0-?\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x85R\x8B`\x04\x86\x01\x94b\0&[\x95b\0$gV[\x03\x91Z\x90`\0\x91\xF1\x97\x88\x15b\0\x15\xEAW`\0\x98b\0'\xE4\xC0.\xCCj\x17(\xF2(\xE2\x0E\xCF7\xE3\xB4|\x92\x0B\x90\x7Fucs01-relay-1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` `@Qb\0-U\x81b\0\x05\x1BV[`\r\x81R\x01R` \x81Q\x91\x01 \x14\x90V[\x90\x81` \x91\x03\x12b\0\x01\xC5WQ\x90V[\x93b\0+\xAA`\x80\x94b\0+\x9Bo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x95g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFb\0+4\x96\x9B\x9A\x9B\x16\x89R`\xA0` \x8A\x01R`\xA0\x89\x01\x90b\0\x04IV[\x91\x90\x91` \x91b\0-\xD6b\0\x15cb\0\x13\xC2\x85\x84\x01\x84b\0\"\xB9V[\x92b\0-\xEBb\0\x13\xCAb\0\x13\xC2\x84\x80b\0\"\xB9V[\x91`@\x94`@\x82\x01\x93b\0.\0\x85\x84b\0'\xE2V[\x97\x90P`\0\x95s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x85\x84\x16\x97[\x8A\x81\x10b\0.7WPPPPPPPPPPPPV[\x8B\x90b\0.ib\0\x16[b\0.ab\0.Zb\0\x13:\x85b\0\x133\x8A\x8Ab\0'\xE2V[\x94b\0\"\x03V[\x84Qb\0\"+V[\x91\x8D\x89\x84\x16\x15b\0/\x9CWP\x88\x83\x16b\0.\x95\x8B\x83\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x90\x80;\x15b\0\x01\xC5W\x87Q\x7F@\xC1\x0F\x19\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x8A\x16`\x04\x82\x01Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x90\x92\x16`$\x83\x01R`\0\x90\x82\x90`D\x90\x82\x90\x84\x90Z\xF1\x91\x82\x15b\0\x15\xEAW\x8F`\x01\x95\x8F\x94\x8F\x94\x8F\x94\x8F\x94\x8F\x90b\0/m\x8F\x94\x98\x7F'\t\x14\xFD\x198\xFCIK\x81J&C\t\x9C\\\x02\x08\x93g\"9\x0Byu:\xCC\xDC\x07\xDESM\x99b\0/{\x97b\0/\x85W[P[\x84Q\x94\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x93Q\x96\x87\x96\x16\x99\x86b\0-vV[\x03\x90\xA3\x01b\0.!V[\x80b\0\x17\x81b\0/\x95\x92b\0\x05\0V[8b\0/QV[\x92Pb\x000f\x8Ab\0/\xF9b\0/\xB3\x84Qb\09\x0BV[\x95b\0/\xE3\x83\x86\x01\x91\x88b\0/\xDCb\0\x13c\x85Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x91b\09\xFAV[Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x8B\x8A`\0\x8BQ\x80\x96\x81\x95\x82\x94\x7F\xA9\x05\x9C\xBB\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x84R`\x04\x84\x01\x90\x92\x91o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF` \x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@\x85\x01\x96\x16\x84R\x16\x91\x01RV[\x03\x92\x89\x16Z\xF1\x91\x82\x15b\0\x15\xEAW\x8F`\x01\x95\x8F\x94\x8F\x94\x8F\x94\x8F\x94\x8F\x90b\0/m\x8F\x94\x98\x7F'\t\x14\xFD\x198\xFCIK\x81J&C\t\x9C\\\x02\x08\x93g\"9\x0Byu:\xCC\xDC\x07\xDESM\x99b\0/{\x97b\x000\xBDW[Pb\0/SV[b\x000\xD7\x90\x82=\x84\x11b\0\x15\xE2Wb\0\x15\xD1\x81\x83b\0\x05UV[P8b\x000\xB6V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\x90\x16\xD0\x9Dr\xD4\x0F\xDA\xE2\xFD\x8C\xEA\xC6\xB6#Lw\x06!O\xD3\x9C\x1C\xD1\xE6\t\xA0R\x8C\x19\x93\0T\x163\x03b\x001 WV[`$`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R\xFD[\x90`@Q\x91\x82`\0\x82Tb\x001e\x81b\0)\x02V[\x90\x81\x84R` \x94`\x01\x91`\x01\x81\x16\x90\x81`\0\x14b\x001\xDBWP`\x01\x14b\x001\x98W[PPPb\0\x02\x9C\x92P\x03\x83b\0\x05UV[`\0\x90\x81R\x85\x81 \x95\x93P\x91\x90[\x81\x83\x10b\x001\xC2WPPb\0\x02\x9C\x93P\x82\x01\x018\x80\x80b\x001\x87V[\x85T\x88\x84\x01\x85\x01R\x94\x85\x01\x94\x87\x94P\x91\x83\x01\x91b\x001\xA6V[\x91PPb\0\x02\x9C\x95\x93P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x91P\x16\x82\x84\x01R\x15\x15`\x05\x1B\x82\x01\x018\x80\x80b\x001\x87V[\x91` \x81\x01\x91o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80b\x002A\x85b\0$CV[\x16\x15b\0\x18\xF2Wb\x002\x91b\x002\x8Bb\x002\\\x84\x88b\0(\xE9V[b\x002g\x86b\0$\xBDV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0R` R`@`\0 \x90V[b\x001PV[\x80Q\x90\x95\x90\x15b\x003SWPPPb\x002\xCFb\x002\xB6b\x002\xB6b\x002\xD6\x93b\0$\xBDV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x91b\0$CV[\x90\x80;\x15b\0\x01\xC5W`@Q\x7F\x9D\xC2\x9F\xAC\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x90\x92\x16`$\x83\x01R`\0\x90\x82\x90`D\x90\x82\x90\x84\x90Z\xF1\x80\x15b\0\x15\xEAWb\x003CWP\x90V[\x80b\0\x17\x81b\0\x04!\x92b\0\x05\0V[b\0\x04!\x95P\x93b\x003\xB5\x92\x91b\x003\xACb\x003\xBB\x96b\x003\x96b\x003|b\x002\xB6\x89b\0$\xBDV[b\x003\x8Bb\0\x13c\x87b\0$CV[\x900\x903\x90b\0;\x93V[b\0\x14Sb\x003\xA5\x88b\0$\xBDV[\x94b\0$CV[\x92\x16\x91b\0<\x9FV[b\0$\xBDV[b\0<\xBFV[b\x003\xF8\x90\x80Q` \x90\x81\x83\x01Q\x91`@```@\x86\x01Q\x95\x01Q\x91b\x004*`@Q\x97\x88\x95`\x80\x84\x88\x01R`\xA0\x87\x01\x90b\0\x04IV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x96\x87\x87\x83\x03\x01`@\x88\x01Rb\0\x04IV[\x90\x85\x85\x83\x03\x01``\x86\x01R\x86Q\x91\x82\x81R\x81\x81\x01\x82\x80\x85`\x05\x1B\x84\x01\x01\x99\x01\x94`\0\x92[\x85\x84\x10b\x004wWPPPPPPP\x83b\0!\xB3\x91\x84\x84b\0\x04!\x97\x03\x01`\x80\x85\x01Rb\0\x04IV[\x91\x93`\x01\x91\x93\x95\x97\x98P\x80\x8B\x8B\x85\x83\x9A\x9D\x9E\x03\x01\x87R\x8BQ\x90\x82o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81b\x004\xB6\x85Q\x8B\x86R\x8B\x86\x01\x90b\0\x04IV[\x94\x01Q\x16\x91\x01R\x9A\x01\x94\x01\x94\x01\x91\x8A\x97\x96\x94\x91\x99\x98\x99\x95\x93\x95b\x004NV[\x90\x81\x82Q\x90`@Q\x93`\x02\x80\x86\x01\x93\x80\x80\x01\x85R`\x0F\x90o0123456789abcdef`\x0FR`\"\x88\x01\x93\x01\x93[\x84\x81\x03b\x005-WPPP` \x91P`\0\x81R\x01`@Ra0x`\x02\x82Q\x01\x91R\x82RV[\x90\x91\x80\x93`\x01\x80\x93\x01\x92\x84\x84Q\x16Q\x90\x82\x01S\x83\x83Q`\x04\x1C\x16Q\x81S\x01\x92\x91\x90b\x005\x08V[`\"b\0\x04!\x91`@Q\x93\x81b\x005v\x86\x93Q\x80\x92` \x80\x87\x01\x91\x01b\0\x04$V[\x82\x01\x90\x7F/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x91\x82` \x82\x01Rb\x005\xB7\x82Q\x80\x93` `!\x85\x01\x91\x01b\0\x04$V[\x01\x90`!\x82\x01R\x03`\x02\x81\x01\x84R\x01\x82b\0\x05UV[`@Q\x90b\x005\xDC\x82b\0\x05\x1BV[`\0` \x83\x82\x81R\x01RV[b\x005\xF2b\x005\xCDV[P` \x81Q\x91`@Q\x92b\x006\x07\x84b\0\x05\x1BV[\x83R\x01` \x82\x01R\x90V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x01\x91\x82\x11b\x006oWV[b\x006\x12V[` \x03\x90` \x82\x11b\x006oWV[\x90` \x82\x01\x80\x92\x11b\x006oWV[\x91\x90\x82\x01\x80\x92\x11b\x006oWV[\x90b\x006\xACb\x005\xCDV[P\x81Q\x90\x80Q\x91\x82\x81\x10b\x007\x1BW`\x01\x92` \x85\x01\x93\x84Q\x82` \x86\x01Q\x80\x83\x03b\x007\nW[PPPb\x006\xE4W[PPPP\x90V[\x81\x03\x90\x81\x11b\x006oW\x83RQ\x90\x80Q\x91\x82\x01\x80\x92\x11b\x006oWR8\x80\x80\x80b\x006\xDDV[\x81\x92\x93P \x91 \x148\x82\x81b\x006\xD4V[PPP\x90V[`\x14\x81Q\x03b\x007\x83W` \x81Q\x91\x01Q\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\x91\x82\x81\x16\x91`\x14\x81\x10b\x007mW[PP\x90P``\x1C\x90V[\x83\x91\x92P`\x14\x03`\x03\x1B\x1B\x16\x16\x808\x80b\x007cV[`\x04`@Q\x7Fxq\x8C;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90b\0\x13\xE4\x91b\0=\x93V[b\x007\xCBb\0\x04!\x92` \x92b\x005TV[`@Q\x93\x81b\x007\xE5\x86\x93Q\x80\x92\x86\x80\x87\x01\x91\x01b\0\x04$V[\x82\x01b\x007\xFB\x82Q\x80\x93\x86\x80\x85\x01\x91\x01b\0\x04$V[\x01\x03\x80\x84R\x01\x82b\0\x05UV[\x80Q\x90b\083b\08\x1A\x83b\0\x05\xB8V[\x92b\08*`@Q\x94\x85b\0\x05UV[\x80\x84Rb\0\x05\xB8V[\x90` \x80\x84\x01\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x80\x94\x016\x837\x80\x83\x01Q\x92Q\x92\x91\x93[\x81\x84\x10\x15b\08\xDAWP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x80b\08\xAEW[PPQ\x82Q\x82\x16\x91\x19\x16\x17\x90R\x90V[\x90\x80\x92\x93P\x03\x90\x81\x11b\x006oWb\08\xCBb\08\xD1\x91b\0>\x8CV[b\x006AV[\x908\x80b\08\x9EV[\x92\x91\x93\x84Q\x81R\x81\x81\x01\x80\x91\x11b\x006oW\x93\x81\x81\x01\x80\x91\x11b\x006oW\x91\x83\x81\x01\x90\x81\x11b\x006oW\x92b\08kV[`*\x81Q\x03b\09\xD0W` \x81\x01Q\x90\x7F0x\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x7F\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`*`\"\x84\x01Q\x93\x01Q\x93\x16\x03b\09\xD0W{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0b\09\xC3b\09\xBC\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x93b\0>\x9CV[\x93b\0>\x9CV[` \x1C\x16\x91\x16\x17``\x1C\x90V[`\x04`@Q\x7F\xFEo\x15p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90b\0\x06\xC0b\0:\n\x92b\0!\xDBV[\x80T\x91\x82\x03\x91\x82\x11b\x006oWUV[`\xFF\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0T`@\x1C\x16\x15b\0:JWV[`\x04`@Q\x7F\xD7\xE6\xBC\xF8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90\x81;\x15b\0;LWs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82T\x16\x17\x90U\x7F\xBC|\xD7Z \xEE'\xFD\x9A\xDE\xBA\xB3 A\xF7U!M\xBCk\xFF\xA9\x0C\xC0\"[9\xDA.\\-;`\0\x80\xA2\x80Q\x15b\0;\x18Wb\0;\x15\x91b\0A\xD9V[PV[PP4b\0;\"WV[`\x04`@Q\x7F\xB3\x98\x97\x9F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`$\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x7FL\x9C\x8C\xE3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x16`\x04\x82\x01R\xFD[`\0\x91b\0<\x1C\x93\x83\x92`@Q\x96` \x88\x01\x93\x7F#\xB8r\xDD\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x85Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84\x80\x92\x16`$\x8B\x01R\x16`D\x89\x01R`d\x88\x01R`d\x87Rb\0<\x02\x87b\0\x058V[\x16\x94Q\x90\x82\x86Z\xF1b\0<\x14b\0\x1FpV[\x90\x83b\0A\xF6V[\x80Q\x90\x81\x15\x15\x91\x82b\0<}W[PPb\0<4WPV[`@Q\x7FRt\xAF\xE7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x90\x91\x16`\x04\x82\x01R`$\x90\xFD[b\0<\x97\x92P\x90` \x80b\0\x13\xE4\x93\x83\x01\x01\x91\x01b\0+;V[8\x80b\0<*V[\x90b\0\x06\xC0b\0<\xAF\x92b\0!\xDBV[\x80T\x91\x82\x01\x80\x92\x11b\x006oWUV[\x90`@Q\x91`\x80\x83\x01`@R`\x0Fo0123456789abcdef`\x0FR`\x02\x84\x01\x91`(\x83R`\0`J\x86\x01R``\x1B\x90`\x01`\0[\x80\x80\x01\x87\x01`\"\x85\x83\x1A\x85\x81\x16Q`#\x84\x01S`\x04\x1CQ\x91\x01S\x01`\x14\x81\x14b\0='W`\x01\x90b\0<\xFAV[PPPa0x`\x02\x82Q\x01\x91R\x82RV[\x90\x81`\x03\x1B\x91\x7F\x1F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x03b\x006oWV[`\xFF\x81\x11b\x006oW`\x01\x90\x1B\x90V[\x81\x81\x03\x92\x91`\0\x13\x80\x15\x82\x85\x13\x16\x91\x84\x12\x16\x17b\x006oWV[\x91\x90\x82Q\x92\x81Q\x84\x81\x10b\0>\x83W[P` \x80\x82\x01Q\x94` \x84\x01Q\x90`\0\x96[\x81\x88\x10b\0=\xD2WPPPPb\0\x04!\x92\x93PQ\x90Q\x90b\0=yV[\x80Q\x83Q\x90\x81\x81\x03b\0>\x0BW[PPb\0=\xFCb\0=\xF5b\0>\x03\x92b\x006\x84V[\x93b\x006\x84V[\x97b\x006\x84V[\x96\x91b\0=\xB5V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x86\x85\x10b\0>MW[\x91\x82\x16\x91\x16\x81\x81\x14b\0=\xE0W\x03\x97PPPPPPPV[Pb\0>|b\08\xCBb\0>vb\0>p\x8Db\0>j\x89b\x006uV[b\x006\x93V[b\0=8V[b\0=iV[\x19b\0>5V[\x93P8b\0=\xA3V[`\x1F\x81\x11b\x006oWa\x01\0\n\x90V[\x7F\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x82\x16b\09\xD0W\x7F\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xD0\x81\x81\x84\x01\x16b\09\xD0W\x7F\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x92`\xFF\x84\x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\x83\x01`\x07\x1C\x16\x02\x90\x7F\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x82\x16\x90\x03\x93\x83\x83\x86\x01\x16b\09\xD0W\x83\x83\x7F\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\x80\x94\x16\x87\x03\x01\x16b\09\xD0W`\xFF\x90\x7F@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\x86\x01`\x07\x1C\x16\x02\x93\x7F \x85\x16\x90\x03\x90\x82\x82\x01\x94\x16\x90\x03\x01\x16b\09\xD0W\x7F\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\x81\x16b\09\xD0W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x91`\x04\x1B\x90`\x08\x1B\x7F\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x81\x16\x7F\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\x83\x16\x17`\x08\x1B\x91\x7F\xF0\0\0\0\0\0\0\0\xF0\0\0\0\0\0\0\0\xF0\0\0\0\0\0\0\0\xF0\0\0\0\0\0\0\0\x7F\x0F\0\0\0\0\0\0\0\x0F\0\0\0\0\0\0\0\x0F\0\0\0\0\0\0\0\x0F\0\0\0\0\0\0\0~\xFF\0\0\0\0\0\0\0\xFF\0\0\0\0\0\0\0\xFF\0\0\0\0\0\0\0\xFF\0\0\0\0\0\0z\xFF\0\0\0\0\0\0\0\xFF\0\0\0\0\0\0\0\xFF\0\0\0\0\0\0\0\xFF\0\0\x86\x16{\x0F\0\0\0\0\0\0\0\x0F\0\0\0\0\0\0\0\x0F\0\0\0\0\0\0\0\x0F\0\0\0\x86\x16{\xF0\0\0\0\0\0\0\0\xF0\0\0\0\0\0\0\0\xF0\0\0\0\0\0\0\0\xF0\0\0\0\x86\x16\x17\x17`\x10\x1B\x95\x16\x93\x16\x91\x16\x17\x17\x17\x80` \x1B\x90\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0{\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0k\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\x84\x16o\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\x84\x16\x17`@\x1B\x93\x16\x91\x16\x17\x17\x16\x90V[`\0\x80b\0\x04!\x93` \x81Q\x91\x01\x84Z\xF4b\0A\xF4b\0\x1FpV[\x91[\x90b\0B7WP\x80Q\x15b\0B\rW\x80Q\x90` \x01\xFD[`\x04`@Q\x7F\x14%\xEAB\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x81Q\x15\x80b\0B\x91W[b\0BJWP\x90V[`$\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x7F\x99\x96\xB3\x15\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x16`\x04\x82\x01R\xFD[P\x80;\x15b\0BAV\xFE`\x80`@R4b\0\x03XWb\0\x14\xF2\x808\x03\x80b\0\0\x1D\x81b\0\x03]V[\x92\x839\x81\x01` \x91\x82\x81\x83\x03\x12b\0\x03XW\x80Q`\x01`\x01`@\x1B\x03\x91\x82\x82\x11b\0\x03XW\x01\x91`\x1F\x81\x81\x85\x01\x12\x15b\0\x03XW\x83Q\x93\x83\x85\x11b\0\x02UW`\x1F\x19\x94b\0\0q\x83\x82\x01\x87\x16\x88\x01b\0\x03]V[\x93\x81\x85R\x87\x82\x84\x01\x01\x11b\0\x03XW\x86\x91`\0[\x82\x81\x10b\0\x03DWPP\x90`\0\x91\x84\x01\x01R\x81Q\x90\x83\x82\x11b\0\x02UW`\x03\x92\x83T\x92`\x01\x93\x84\x81\x81\x1C\x91\x16\x80\x15b\0\x039W[\x89\x82\x10\x14b\0\x03#W\x83\x81\x11b\0\x02\xD8W[P\x80\x88\x84\x82\x11`\x01\x14b\0\x02wW`\0\x91b\0\x02kW[P`\0\x19\x82\x87\x1B\x1C\x19\x16\x90\x84\x1B\x17\x84U[\x80Q\x94\x85\x11b\0\x02UW`\x04\x96\x87T\x84\x81\x81\x1C\x91\x16\x80\x15b\0\x02JW[\x82\x82\x10\x14b\0\x025W\x83\x81\x11b\0\x01\xEAW[P\x80\x92\x86\x11`\x01\x14b\0\x01~WP\x84\x95P\x90\x84\x92\x91`\0\x95b\0\x01rW[PP\x1B\x92`\0\x19\x91\x1B\x1C\x19\x16\x17\x90U[`\x05\x80T`\x01`\x01`\xA0\x1B\x03\x19\x163\x17\x90U`@Qa\x11n\x90\x81b\0\x03\x84\x829\xF3[\x01Q\x93P8\x80b\0\x01@V[\x93\x92\x95\x85\x90\x81\x16\x88`\0R\x85`\0 \x95`\0\x90[\x89\x83\x83\x10b\0\x01\xCFWPPP\x10b\0\x01\xB4W[PPPP\x81\x1B\x01\x90Ub\0\x01PV[\x01Q\x90`\xF8\x84`\0\x19\x92\x1B\x16\x1C\x19\x16\x90U8\x80\x80\x80b\0\x01\xA5V[\x85\x87\x01Q\x89U\x90\x97\x01\x96\x94\x85\x01\x94\x88\x93P\x90\x81\x01\x90b\0\x01\x92V[\x88`\0R\x81`\0 \x84\x80\x89\x01`\x05\x1C\x82\x01\x92\x84\x8A\x10b\0\x02+W[\x01`\x05\x1C\x01\x90\x85\x90[\x82\x81\x10b\0\x02\x1EWPPb\0\x01\"V[`\0\x81U\x01\x85\x90b\0\x02\x0EV[\x92P\x81\x92b\0\x02\x05V[`\"\x89cNH{q`\xE0\x1B`\0RR`$`\0\xFD[\x90`\x7F\x16\x90b\0\x01\x10V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[\x90P\x82\x01Q8b\0\0\xE2V[\x88\x86\x93\x16\x90\x87`\0R\x8A`\0 \x91`\0[\x8C\x82\x82\x10b\0\x02\xC1WPP\x83\x11b\0\x02\xA8W[PP\x81\x1B\x01\x84Ub\0\0\xF3V[\x84\x01Q`\0\x19\x83\x89\x1B`\xF8\x16\x1C\x19\x16\x90U8\x80b\0\x02\x9BV[\x83\x88\x01Q\x85U\x89\x96\x90\x94\x01\x93\x92\x83\x01\x92\x01b\0\x02\x88V[\x85`\0R\x88`\0 \x84\x80\x84\x01`\x05\x1C\x82\x01\x92\x8B\x85\x10b\0\x03\x19W[\x01`\x05\x1C\x01\x90\x85\x90[\x82\x81\x10b\0\x03\x0CWPPb\0\0\xCBV[`\0\x81U\x01\x85\x90b\0\x02\xFCV[\x92P\x81\x92b\0\x02\xF3V[cNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[\x90`\x7F\x16\x90b\0\0\xB9V[\x81\x81\x01\x84\x01Q\x86\x82\x01\x85\x01R\x83\x01b\0\0\x85V[`\0\x80\xFD[`@Q\x91\x90`\x1F\x01`\x1F\x19\x16\x82\x01`\x01`\x01`@\x1B\x03\x81\x11\x83\x82\x10\x17b\0\x02UW`@RV\xFE`\x80`@\x81\x81R`\x04\x91\x826\x10\x15a\0\x16W`\0\x80\xFD[`\0\x92\x835`\xE0\x1C\x91\x82c\x06\xFD\xDE\x03\x14a\r\x86WP\x81c\t^\xA7\xB3\x14a\x0C\x81W\x81c\x18\x16\r\xDD\x14a\x0CDW\x81c#\xB8r\xDD\x14a\n\xBDW\x81c1<\xE5g\x14a\n}W\x81c@\xC1\x0F\x19\x14a\tpW\x81cp\xA0\x821\x14a\t\x0FW\x81crY4t\x14a\x04\xD6W\x81c\x95\xD8\x9BA\x14a\x03\x14W\x81c\x9D\xC2\x9F\xAC\x14a\x01\xCAWP\x80c\xA9\x05\x9C\xBB\x14a\x01|W\x80c\xDDb\xED>\x14a\x01\tWc\xF8Q\xA4@\x14a\0\xB4W`\0\x80\xFD[4a\x01\x05W\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W` \x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x05T\x16\x90Q\x90\x81R\xF3[P\x80\xFD[P4a\x01\x05W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W\x80` \x92a\x01Da\x0F\x16V[a\x01La\x0F>V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x16\x83R`\x01\x86R\x83\x83 \x91\x16\x82R\x84R T\x90Q\x90\x81R\xF3[P4a\x01\x05W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W` \x90a\x01\xC3a\x01\xB9a\x0F\x16V[`$5\x903a\x0F\xE2V[Q`\x01\x81R\xF3[\x83\x91P4a\x01\x05W\x82\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05Wa\x02\x03a\x0F\x16V[\x90`$5\x90a\x02\x10a\x11#V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16\x92\x83\x15a\x02\xE5W\x83\x85R\x84` R\x85\x85 T\x91\x83\x83\x10a\x02\x86WPP\x81\x84\x95\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x93` \x93\x86\x88R\x87\x85R\x03\x81\x87 U\x81`\x02T\x03`\x02UQ\x90\x81R\xA3\x80\xF3[a\x02\xE1\x84\x84\x89Q\x94\x85\x94\x7F\xE4P\xD3\x8C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x86R\x85\x01`@\x91\x94\x93\x92s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF``\x83\x01\x96\x16\x82R` \x82\x01R\x01RV[\x03\x90\xFD[`$\x82\x86\x88Q\x91\x7F\x96\xC6\xFD\x1E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[\x83\x834a\x01\x05W\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W\x80Q\x90\x81\x83`\x07Ta\x03U\x81a\x0F\x8FV[\x80\x84R\x90` \x90`\x01\x90\x81\x81\x16\x90\x81\x15a\x04qWP`\x01\x14a\x03\xF0W[PPP\x03`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16\x82\x01\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11\x83\x85\x10\x17a\x03\xC4WP\x82\x91\x82a\x03\xC0\x92R\x82a\x0E\xB0V[\x03\x90\xF3[\x80`A\x86\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`$\x94RR\xFD[`\x07\x88R\x7F\xA6l\xC9(\xB5\xED\xB8*\xF9\xBDI\x92)T\x15Z\xB7\xB0\x94&\x94\xBE\xA4\xCEDf\x1D\x9A\x876\xC6\x88\x94\x93P\x87\x92\x91\x90[\x82\x84\x10a\x04YWP\x92\x93PP\x82\x01` \x01\x90P\x81`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a\x03rV[\x85T\x88\x85\x01\x83\x01R\x94\x85\x01\x94\x87\x94P\x92\x81\x01\x92a\x04\x1DV[`\x1F\x95P` \x93P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x96\x94\x92P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x91P\x16\x82\x84\x01R\x15\x15`\x05\x1B\x82\x01\x01\x91\x81\x93a\x03rV[\x834a\t\x0CW``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t\x0CWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x805\x83\x81\x11a\t\x08Wa\x05&\x906\x90\x83\x01a\x0FaV[\x91\x90`$5\x85\x81\x11a\t\x04Wa\x05?\x906\x90\x84\x01a\x0FaV[\x92\x90\x95`D5\x94`\xFF\x86\x16\x80\x96\x03a\t\0Wa\x05Ya\x11#V[\x81\x81\x11a\x08\xD4W\x80a\x05l`\x06Ta\x0F\x8FV[\x94`\x1F\x95\x86\x81\x11a\x08hW[P\x88\x90\x86\x83\x11`\x01\x14a\x07\xA7W\x89\x92a\x07\x9CW[PP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17`\x06U[\x83\x11a\x07pWPa\x05\xD1`\x07Ta\x0F\x8FV[\x81\x81\x11a\x07\x14W[P\x83\x90\x82\x11`\x01\x14a\x06ZW\x83\x94\x82\x93\x94\x92a\x06OW[PP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17`\x07U[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0`\x08T\x16\x17`\x08U\x80\xF3[\x015\x90P\x84\x80a\x05\xF0V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x16\x94\x7F\xA6l\xC9(\xB5\xED\xB8*\xF9\xBDI\x92)T\x15Z\xB7\xB0\x94&\x94\xBE\xA4\xCEDf\x1D\x9A\x876\xC6\x88\x91\x85[\x87\x81\x10a\x06\xFCWP\x83`\x01\x95\x96\x97\x10a\x06\xC4W[PPP\x81\x1B\x01`\x07Ua\x06#V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U\x84\x80\x80a\x06\xB6V[\x90\x92` `\x01\x81\x92\x86\x86\x015\x81U\x01\x94\x01\x91\x01a\x06\xA2V[\x7F\xA6l\xC9(\xB5\xED\xB8*\xF9\xBDI\x92)T\x15Z\xB7\xB0\x94&\x94\xBE\xA4\xCEDf\x1D\x9A\x876\xC6\x88\x82\x80\x85\x01`\x05\x1C\x82\x01\x92` \x86\x10a\x07gW[\x01`\x05\x1C\x01\x90[\x81\x81\x10a\x07\\WPa\x05\xD9V[\x85\x81U`\x01\x01a\x07OV[\x92P\x81\x92a\x07HV[\x84`A`$\x92\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83RR\xFD[\x015\x90P\x89\x80a\x05\x8CV[\x90\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16\x91`\x06\x8AR\x7F\xF6R\"#\x13\xE2\x84YR\x8D\x92\x0Be\x11\\\x16\xC0O>\xFC\x82\xAA\xED\xC9{\xE5\x9F?7|\r?\x92\x8A[\x81\x81\x10a\x08PWP\x90\x84`\x01\x95\x94\x93\x92\x10a\x08\x18W[PPP\x81\x1B\x01`\x06Ua\x05\xBFV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U\x89\x80\x80a\x08\nV[\x91\x93` `\x01\x81\x92\x87\x87\x015\x81U\x01\x95\x01\x92\x01a\x07\xF4V[\x90\x91P`\x06\x89R\x7F\xF6R\"#\x13\xE2\x84YR\x8D\x92\x0Be\x11\\\x16\xC0O>\xFC\x82\xAA\xED\xC9{\xE5\x9F?7|\r?\x86\x80\x85\x01`\x05\x1C\x82\x01\x92` \x86\x10a\x08\xCBW[\x90\x85\x94\x93\x92\x91\x01`\x05\x1C\x01\x90[\x81\x81\x10a\x08\xBDWPa\x05xV[\x8A\x81U\x84\x93P`\x01\x01a\x08\xB0V[\x92P\x81\x92a\x08\xA3V[`$\x87`A\x85\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83RR\xFD[\x86\x80\xFD[\x84\x80\xFD[\x82\x80\xFD[\x80\xFD[PP4a\x01\x05W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W\x80` \x92s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\taa\x0F\x16V[\x16\x81R\x80\x84R T\x90Q\x90\x81R\xF3[\x91\x90P4a\t\x08W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t\x08Wa\t\xA9a\x0F\x16V[\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$5\x92a\t\xCBa\x11#V[\x16\x92\x83\x15a\nOW`\x02T\x90\x83\x82\x01\x80\x92\x11a\n#WP\x84\x92\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x92` \x92`\x02U\x85\x85R\x84\x83R\x80\x85 \x82\x81T\x01\x90UQ\x90\x81R\xA3\x80\xF3[\x85`\x11`$\x92\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83RR\xFD[\x84`$\x92Q\x91\x7F\xECD/\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[PP4a\x01\x05W\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W` \x90`\xFF`\x08T\x16\x90Q\x90\x81R\xF3[\x90P\x824a\t\x0CW``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t\x0CWa\n\xF7a\x0F\x16V[a\n\xFFa\x0F>V[\x91`D5\x93s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16\x80\x83R`\x01` R\x86\x83 3\x84R` R\x86\x83 T\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x03a\x0BgW[` \x88a\x01\xC3\x89\x89\x89a\x0F\xE2V[\x86\x83\x10a\x0B\xFFW\x81\x15a\x0B\xD0W3\x15a\x0B\xA1WP\x82R`\x01` \x90\x81R\x86\x83 3\x84R\x81R\x91\x86\x90 \x90\x85\x90\x03\x90U\x82\x90a\x01\xC3\x87a\x0BYV[`$\x90\x84\x89Q\x91\x7F\x94(\rb\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[`$\x90\x84\x89Q\x91\x7F\xE6\x02\xDF\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[\x87Q\x7F\xFB\x8FA\xB2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3\x91\x81\x01\x91\x82R` \x82\x01\x93\x90\x93R`@\x81\x01\x87\x90R\x82\x91P``\x01\x03\x90\xFD[PP4a\x01\x05W\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W` \x90`\x02T\x90Q\x90\x81R\xF3[\x90P4a\t\x08W\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t\x08Wa\x0C\xB9a\x0F\x16V[`$5\x903\x15a\rWWs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x91\x82\x15a\r(WP\x80\x83` \x953\x81R`\x01\x87R\x81\x81 \x85\x82R\x87R U\x82Q\x90\x81R\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x843\x92\xA3Q`\x01\x81R\xF3[`$\x90\x85\x85Q\x91\x7F\x94(\rb\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[`$\x83\x86\x86Q\x91\x7F\xE6\x02\xDF\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[\x84\x90\x844a\t\x08W\x82\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t\x08W\x81\x83`\x06Ta\r\xC5\x81a\x0F\x8FV[\x80\x84R\x90` \x90`\x01\x90\x81\x81\x16\x90\x81\x15a\x04qWP`\x01\x14a\x0E/WPPP\x03`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16\x82\x01\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11\x83\x85\x10\x17a\x03\xC4WP\x82\x91\x82a\x03\xC0\x92R\x82a\x0E\xB0V[`\x06\x88R\x7F\xF6R\"#\x13\xE2\x84YR\x8D\x92\x0Be\x11\\\x16\xC0O>\xFC\x82\xAA\xED\xC9{\xE5\x9F?7|\r?\x94\x93P\x87\x92\x91\x90[\x82\x84\x10a\x0E\x98WP\x92\x93PP\x82\x01` \x01\x90P\x81`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a\x03rV[\x85T\x88\x85\x01\x83\x01R\x94\x85\x01\x94\x87\x94P\x92\x81\x01\x92a\x0E\\V[` \x80\x82R\x82Q\x81\x83\x01\x81\x90R\x93\x92`\0[\x85\x81\x10a\x0F\x02WPPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x84`\0`@\x80\x96\x97\x86\x01\x01R\x01\x16\x01\x01\x90V[\x81\x81\x01\x83\x01Q\x84\x82\x01`@\x01R\x82\x01a\x0E\xC2V[`\x045\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x0F9WV[`\0\x80\xFD[`$5\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x0F9WV[\x91\x81`\x1F\x84\x01\x12\x15a\x0F9W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x0F9W` \x83\x81\x86\x01\x95\x01\x01\x11a\x0F9WV[\x90`\x01\x82\x81\x1C\x92\x16\x80\x15a\x0F\xD8W[` \x83\x10\x14a\x0F\xA9WV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[\x91`\x7F\x16\x91a\x0F\x9EV[\x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x16\x92\x83\x15a\x10\xF2W\x16\x92\x83\x15a\x10\xC1W`\0\x90\x83\x82R\x81` R`@\x82 T\x90\x83\x82\x10a\x10iWP\x91`@\x82\x82\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x95\x87` \x96R\x82\x86R\x03\x82\x82 U\x86\x81R \x81\x81T\x01\x90U`@Q\x90\x81R\xA3V[`@Q\x7F\xE4P\xD3\x8C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x90\x91\x16`\x04\x82\x01R`$\x81\x01\x91\x90\x91R`D\x81\x01\x83\x90R`d\x90\xFD[`$`@Q\x7F\xECD/\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R\xFD[`$`@Q\x7F\x96\xC6\xFD\x1E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x05T\x163\x03a\x11DWV[`\x04`@Q\x7F\xCF\x19>\xD8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD"; - /// The bytecode of the contract. - #[cfg(feature = "providers")] - pub static UCS01RELAY_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__BYTECODE); - #[rustfmt::skip] - #[cfg(feature = "providers")] - const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R`\x046\x10\x15b\0\0\x13W`\0\x80\xFD[`\x005`\xE0\x1C\x80c!\x8D\x1E>\x14b\0\x01\xAFW\x80c#\x01\xC6\xF5\x14b\0\x01\xA9W\x80c+f\xB1\x16\x14b\0\x01\xA3W\x80c:t\xCE&\x14b\0\x01\x9DW\x80c?A\xC9\xEA\x14b\0\x01gW\x80cH\\\xC9U\x14b\0\x01\x97W\x80cO\x1E\xF2\x86\x14b\0\x01\x91W\x80cR\xC7\x15}\x14b\0\x01\x8BW\x80cR\xD1\x90-\x14b\0\x01\x85W\x80c\\\x97Z\xBB\x14b\0\x01\x7FW\x80c`\xCAV\xEB\x14b\0\x01yW\x80cij\x9B\xF4\x14b\0\x01sW\x80cqP\x18\xA6\x14b\0\x01mW\x80cu8\xEDh\x14b\0\x01gW\x80c\x8D\xA5\xCB[\x14b\0\x01aW\x80c\xA5\xB7\xE1x\x14b\0\x01[W\x80c\xAD<\xB1\xCC\x14b\0\x01UW\x80c\xBD\x95\x0F\x89\x14b\0\x01OW\x80c\xEC\x1B\xD8\x97\x14b\0\x01IW\x80c\xF2\xF8?z\x14b\0\x01CW\x80c\xF2\xFD\xE3\x8B\x14b\0\x01=W\x80c\xF8(\x8C\xC6\x14b\0\x017Wc\xFB\x8BS.\x14b\0\x011W`\0\x80\xFD[b\0\x1B\xE0V[b\0\x1B\xC0V[b\0\x1BmV[b\0\x1A\x84V[b\0\x19FV[b\0\x12\x88V[b\0\x12\x06V[b\0\x11'V[b\0\x10QV[b\0\x08\x12V[b\0\x0F\x8BV[b\0\x0F7V[b\0\x0EsV[b\0\x0E\x11V[b\0\rNV[b\0\x0C\xDEV[b\0\n\x8EV[b\0\x08\\V[b\0\x06\xEEV[b\0\x06MV[b\0\x04\x8EV[b\0\x02\xADV[`\x045\x90`\x03\x82\x10\x15b\0\x01\xC5WV[`\0\x80\xFD[\x91\x81`\x1F\x84\x01\x12\x15b\0\x01\xC5W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11b\0\x01\xC5W` \x80\x85\x01\x94\x84`\x05\x1B\x01\x01\x11b\0\x01\xC5WV[\x91\x81`\x1F\x84\x01\x12\x15b\0\x01\xC5W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11b\0\x01\xC5W` \x83\x81\x86\x01\x95\x01\x01\x11b\0\x01\xC5WV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF|`@\x91\x01\x12b\0\x01\xC5W`\x84\x90V[\x90\x81`@\x91\x03\x12b\0\x01\xC5W\x90V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x03b\0\x01\xC5WV[`\xE45\x90b\0\x02\x9C\x82b\0\x02nV[V[`\xC45\x90b\0\x02\x9C\x82b\0\x02nV[4b\0\x01\xC5Wa\x01\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wb\0\x02\xE9b\0\x01\xB5V[`$5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x83\x11b\0\x01\xC5Wb\0\x03\x10`\x04\x936\x90\x85\x01b\0\x01\xCAV[PP`D5\x82\x81\x11b\0\x01\xC5Wb\0\x03,\x906\x90\x85\x01b\0\x01\xFEV[PP`d5\x82\x81\x11b\0\x01\xC5Wb\0\x03H\x906\x90\x85\x01b\0\x01\xFEV[PP`\x845\x82\x81\x11b\0\x01\xC5Wb\0\x03d\x906\x90\x85\x01b\0\x02_V[P`\xA45\x82\x81\x11b\0\x01\xC5Wb\0\x03\x7F\x906\x90\x85\x01b\0\x01\xFEV[\x90\x92`\xC45\x90\x81\x11b\0\x01\xC5Wb\0\x03\xB3\x94b\0\x03\x9F\x916\x91\x01b\0\x01\xFEV[\x93\x90\x92b\0\x03\xACb\0\x02\x8DV[Pb\0\x1D\xAEV[\0[\x90\x81a\x01 \x91\x03\x12b\0\x01\xC5W\x90V[`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x82\x01\x12b\0\x01\xC5W`\x045\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11b\0\x01\xC5Wb\0\x04\x12\x91`\x04\x01b\0\x03\xB5V[\x90`$5b\0\x04!\x81b\0\x02nV[\x90V[`\0[\x83\x81\x10b\0\x048WPP`\0\x91\x01RV[\x81\x81\x01Q\x83\x82\x01R` \x01b\0\x04'V[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F` \x93b\0\x04\x87\x81Q\x80\x92\x81\x87R\x87\x80\x88\x01\x91\x01b\0\x04$V[\x01\x16\x01\x01\x90V[4b\0\x01\xC5Wb\0\x04\xCDb\0\x04\xB8b\0\x04\xA76b\0\x03\xC5V[\x90b\0\x04\xB2b\0,\xB6V[b\0\x1F\xA5V[`@Q\x91\x82\x91` \x83R` \x83\x01\x90b\0\x04IV[\x03\x90\xF3[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11b\0\x05\x15W`@RV[b\0\x04\xD1V[`@\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17b\0\x05\x15W`@RV[`\xA0\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17b\0\x05\x15W`@RV[\x90`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17b\0\x05\x15W`@RV[`@Q\x90`\x80\x82\x01\x82\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17b\0\x05\x15W`@RV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11b\0\x05\x15W`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16` \x01\x90V[\x92\x91\x92b\0\x06\x01\x82b\0\x05\xB8V[\x91b\0\x06\x11`@Q\x93\x84b\0\x05UV[\x82\x94\x81\x84R\x81\x83\x01\x11b\0\x01\xC5W\x82\x81` \x93\x84`\0\x96\x017\x01\x01RV[\x90\x80`\x1F\x83\x01\x12\x15b\0\x01\xC5W\x81` b\0\x04!\x935\x91\x01b\0\x05\xF3V[4b\0\x01\xC5W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W`\x045g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11b\0\x01\xC5Wb\0\x06\xE5b\0\x06\xA7` \x926\x90`\x04\x01b\0\x06/V[b\0\x06\xC0`$5\x91b\0\x06\xBA\x83b\0\x02nV[b\0!\xDBV[\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0R` R`@`\0 \x90V[T`@Q\x90\x81R\xF3[4b\0\x01\xC5W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11b\0\x01\xC5Wb\0\x07C\x906\x90`\x04\x01b\0\x06/V[`$5\x91\x82\x11b\0\x01\xC5Wb\0\x07\x8Cs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91b\0\x07\x85b\0\x07~` \x956\x90`\x04\x01b\0\x06/V[\x91b\0\"\x03V[\x90b\0\"+V[T\x16`@Q\x90\x81R\xF3[``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC\x82\x01\x12b\0\x01\xC5Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91`\x045\x83\x81\x11b\0\x01\xC5W\x82b\0\x07\xE5\x91`\x04\x01b\0\x01\xFEV[\x93\x90\x93\x92`$5\x91\x82\x11b\0\x01\xC5Wb\0\x08\x02\x91`\x04\x01b\0\x01\xFEV[\x90\x91`D5b\0\x04!\x81b\0\x02nV[4b\0\x01\xC5Wb\0\x08#6b\0\x07\x96V[PPPPPb\0\x082b\0,\xB6V[`\x04`@Q\x7F\x067\xC7\x96\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4b\0\x01\xC5W`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W`\x045b\0\x08\x9B\x81b\0\x02nV[`$5\x90b\0\x08\xAA\x82b\0\x02nV[\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0T\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xFF\x84`@\x1C\x16\x15\x93\x16\x80\x15\x90\x81b\0\n\x85W[`\x01\x14\x90\x81b\0\nzW[\x15\x90\x81b\0\npW[Pb\0\nFWb\0\te\x91\x83b\0\tZ\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0`\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\x82T\x16\x17\x90UV[b\0\t\xE8Wb\0\"SV[b\0\tlW\0[b\0\t\xB9\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81T\x16\x90UV[`@Q`\x01\x81R\x7F\xC7\xF5\x05\xB2\xF3q\xAE!u\xEEI\x13\xF4I\x9E\x1F&3\xA7\xB5\x93c!\xEE\xD1\xCD\xAE\xB6\x11Q\x81\xD2\x90` \x90\xA1\0[b\0\n@\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0h\x01\0\0\0\0\0\0\0\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82T\x16\x17\x90UV[b\0\"SV[`\x04`@Q\x7F\xF9.\xE8\xA9\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x158b\0\x08\xFEV[0;\x15\x91Pb\0\x08\xF5V[\x84\x91Pb\0\x08\xEAV[`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W`\x04\x805\x90b\0\n\xC9\x82b\0\x02nV[`$5g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11b\0\x01\xC5W6`#\x82\x01\x12\x15b\0\x01\xC5Wb\0\n\xFD\x906\x90`$\x81\x85\x015\x91\x01b\0\x05\xF3V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x7F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x800\x14\x90\x81\x15b\0\x0C\xAFW[Pb\0\x0C\x86W\x90` \x83\x92b\0\x0BVb\x000\xDFV[`@Q\x93\x84\x80\x92\x7FR\xD1\x90-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82R\x88\x16Z\xFA`\0\x92\x81b\0\x0CNW[Pb\0\x0B\xE3WPP`@Q\x7FL\x9C\x8C\xE3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x92\x16\x90\x82\x01\x90\x81R\x81\x90` \x01\x03\x90\xFD[\x83\x83\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x84\x03b\0\x0C\x19Wb\0\x03\xB3\x83\x83b\0:tV[`@Q\x7F\xAA\x1DI\xA4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\x90\x81\x01\x84\x81R\x81\x90` \x01\x03\x90\xFD[b\0\x0Cv\x91\x93P` =` \x11b\0\x0C~W[b\0\x0Cm\x81\x83b\0\x05UV[\x81\x01\x90b\0-fV[\x918b\0\x0B\x8EV[P=b\0\x0CaV[\x82`@Q\x7F\xE0|\x8D\xBA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90P\x81\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBCT\x16\x14\x158b\0\x0BAV[4b\0\x01\xC5Wb\0\x03\xB3b\0\r1b\0\x0C\xF76b\0\x03\xC5V[Pb\0\r\x02b\0,\xB6V[b\0\r;\x815\x91b\0\r\x14\x83b\0\x10\xF8V[b\0\r#`@\x82\x01\x82b\0\"\xB9V[\x94\x90\x91`\xA0\x81\x01\x90b\0\"\xB9V[P\x936\x91b\0\x05\xF3V[\x90b\0-\xBAV[`\0\x91\x03\x12b\0\x01\xC5WV[4b\0\x01\xC5W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x160\x03b\0\r\xE7W` `@Q\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x81R\xF3[`\x04`@Q\x7F\xE0|\x8D\xBA\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4b\0\x01\xC5W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W` `\xFF\x7F\xCD^\xD1\\n\x18~w\xE9\xAE\xE8\x81\x84\xC2\x1FO!\x82\xABX'\xCB;~\x07\xFB\xED\xCDc\xF03\0T\x16`@Q\x90\x15\x15\x81R\xF3[4b\0\x01\xC5W`\xA0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11b\0\x01\xC5Wb\0\x0E\xC8\x906\x90`\x04\x01b\0\x01\xFEV[PP`$5\x81\x81\x11b\0\x01\xC5Wb\0\x0E\xE5\x906\x90`\x04\x01b\0\x01\xFEV[PP`D5\x81\x81\x11b\0\x01\xC5Wb\0\x0F\x02\x906\x90`\x04\x01b\0\x01\xFEV[PP`d5\x90\x81\x11b\0\x01\xC5Wb\0\x0F#b\0\x03\xB3\x916\x90`\x04\x01b\0\x01\xFEV[\x90b\0\x0F1`\x845b\0\x02nV[b\0#\rV[4b\0\x01\xC5W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\0T\x16`@Q\x90\x81R\xF3[4b\0\x01\xC5W`\0\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x10NWb\0\x0F\xC7b\x000\xDFV[\x80s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\x90\x16\xD0\x9Dr\xD4\x0F\xDA\xE2\xFD\x8C\xEA\xC6\xB6#Lw\x06!O\xD3\x9C\x1C\xD1\xE6\t\xA0R\x8C\x19\x93\0\x80T\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\x16\x90U\x16\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x82\x80\xA3\x80\xF3[\x80\xFD[4b\0\x01\xC5W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5W` s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\x90\x16\xD0\x9Dr\xD4\x0F\xDA\xE2\xFD\x8C\xEA\xC6\xB6#Lw\x06!O\xD3\x9C\x1C\xD1\xE6\t\xA0R\x8C\x19\x93\0T\x16`@Q\x90\x81R\xF3[\x91\x81`\x1F\x84\x01\x12\x15b\0\x01\xC5W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11b\0\x01\xC5W` \x80\x85\x01\x94\x84`\x06\x1B\x01\x01\x11b\0\x01\xC5WV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x03b\0\x01\xC5WV[`\xC45\x90b\0\x02\x9C\x82b\0\x10\xF8V[5\x90b\0\x02\x9C\x82b\0\x10\xF8V[4b\0\x01\xC5W`\xE0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11b\0\x01\xC5Wb\0\x11|\x906\x90`\x04\x01b\0\x01\xFEV[`$5\x83\x81\x11b\0\x01\xC5Wb\0\x11\x97\x906\x90`\x04\x01b\0\x01\xFEV[\x90`D5\x85\x81\x11b\0\x01\xC5Wb\0\x11\xB3\x906\x90`\x04\x01b\0\x10\xC4V[\x90`d5\x96\x87\x11b\0\x01\xC5Wb\0\x11\xD3b\0\x03\xB3\x976\x90`\x04\x01b\0\x01\xFEV[\x94\x90\x93b\0\x11\xE16b\0\x02/V[\x96b\0\x11\xECb\0\x11\x0BV[\x98b\0% V[\x90` b\0\x04!\x92\x81\x81R\x01\x90b\0\x04IV[4b\0\x01\xC5W`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wb\0\x04\xCD`@Qb\0\x12I\x81b\0\x05\x1BV[`\x05\x81R\x7F5.0.0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R`@Q\x91\x82\x91` \x83R` \x83\x01\x90b\0\x04IV[4b\0\x01\xC5Wb\0\x12\x996b\0\x03\xC5V[P03\x03b\0\x19\x1CWb\0\x12\xFCb\0\x12\xB5`\xA0\x83\x01\x83b\0\"\xB9V[P\x91b\0\x12\xC6` \x82\x01\x82b\0\"\xB9V[\x92\x90b\0\x12\xF5`@\x84\x01\x94b\0\x12\xECb\0\x12\xE1\x87\x87b\0\"\xB9V[\x94\x90\x926\x91b\0\x05\xF3V[\x926\x91b\0\x05\xF3V[\x90b\x005TV[\x90`@\x84\x01\x92b\0\x13\x0E\x84\x86b\0'\xE2V[\x94\x90P`\0[\x85\x81\x10b\0\x13\x1EW\0[b\0\x13@b\0\x13:\x82b\0\x133\x85\x8Bb\0'\xE2V[\x90b\0(9V[b\0({V[\x90b\0\x13xb\0\x13c` \x84\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x15b\0\x18\xF2W\x85\x88b\0\x13\xE8b\0\x13\xE4b\0\x13\xD0b\0\x13\xCAb\0\x13\xC2b\0\x13\xB6b\0\x13\xAFb\0\x13\xA8\x8BQb\x005\xE8V[\x98b\x005\xE8V[\x88b\x006\xA1V[\x95` \x81\x01\x90b\0\"\xB9V[6\x91b\0\x05\xF3V[b\x007!V[\x93b\0\x13\xDD\x87Qb\x005\xE8V[\x90b\x007\xADV[\x15\x90V[\x15b\0\x15\xF0W\x92b\0\x13\xFEb\0\x14\xD2\x94b\08\x08V[b\0\x14\t\x81b\09\x0BV[\x91b\0\x14eb\0\x14\\\x84o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFb\0\x143`\x80\x8E\x01\x8Eb\0\"\xB9V[\x93\x90b\0\x14S` \x88\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x946\x91b\0\x05\xF3V[\x92\x16\x91b\09\xFAV[` \x81\x81\x01Q`@Q\x7F\xA9\x05\x9C\xBB\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x16`\x04\x82\x01Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16`$\x82\x01R\x96\x87\x90\x81\x90`D\x82\x01\x90V[\x03\x81`\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x88\x16Z\xF1\x92\x83\x15b\0\x15\xEAWb\0\x15\xAAb\0\x13\xC2\x7F\xCC\xE45\xD1j\xA7\x12/9o\x8BWl\x1F\0/\xF5\x8CL*R\xA3\xB7\x9CO\xD9\nm\xD2\x1E\x05\x92\x94\x8F\x94`\x01\x9A\x8E\x98b\0\x15\xB4W[P[b\0\x15\x81` b\0\x15ib\0\x15cb\0\x15Yb\0\x15M\x8Db\0\"\xADV[\x9C`\x80\x81\x01\x90b\0\"\xB9V[\x97\x90\x9A\x80b\0\"\xB9V[b\x004\xD5V[\x92\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x92s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x96\x87`@Q\x98\x89\x98\x16\x9B\x16\x99\x87b\0+UV[\x03\x90\xA3\x01b\0\x13\x14V[b\0\x15\xDA\x90` =` \x11b\0\x15\xE2W[b\0\x15\xD1\x81\x83b\0\x05UV[\x81\x01\x90b\0+;V[P8b\0\x15.V[P=b\0\x15\xC5V[b\0$\xB1V[Pb\0\x165b\0\x16\x04``\x88\x01\x88b\0\"\xB9V[b\0\x12\xECb\0\x16.`\x80\x8B\x95\x94\x95\x01\x94b\0\x16 \x86\x8Db\0\"\xB9V[\x93\x90\x91\x8AQ\x956\x91b\0\x05\xF3V[\x90b\x007\xB9V[b\0\x16ub\0\x16[b\0\x16Tb\0\x16M\x85\x8Cb\0\"\xB9V[\x90b\0(\xD0V[\x83b\0\"+V[Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x84\x16\x15b\0\x17\x8FW[P\x82\x16\x94b\0\x16\xB8` \x82\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x95\x80;\x15b\0\x01\xC5W`@Q\x7F@\xC1\x0F\x19\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x86\x16`\x04\x82\x01Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x97\x90\x97\x16`$\x88\x01R`\0\x90\x87\x90`D\x90\x82\x90\x84\x90Z\xF1\x92\x83\x15b\0\x15\xEAWb\0\x15\xAAb\0\x13\xC2\x7F\xCC\xE45\xD1j\xA7\x12/9o\x8BWl\x1F\0/\xF5\x8CL*R\xA3\xB7\x9CO\xD9\nm\xD2\x1E\x05\x92\x94\x8F\x94`\x01\x9A\x8E\x98b\0\x17qW[Pb\0\x150V[\x80b\0\x17\x81b\0\x17\x88\x92b\0\x05\0V[\x80b\0\rBV[8b\0\x17jV[\x82Q` \x84\x01 `@Q\x91\x94Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91a\x14\xF2\x80\x82\x01\x84\x81\x11\x83\x82\x10\x17b\0\x05\x15W\x86b\0\x17\xCC\x91\x84\x93b\0B\x9C\x859b\0\x11\xF3V[\x03\x90`\0\xF5\x80\x15b\0\x15\xEAW\x8A\x85\x84\x86\x93\x16b\0\x17\xEC\x81\x98\x82\x94b\0\"\xB9V[b\0\x17\xF7\x91b\0(\xD0V[b\0\x18\x03\x90\x85b\0\"+V[\x90b\0\x18I\x91\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82T\x16\x17\x90UV[b\0\x18U\x90\x8Db\0\"\xB9V[b\0\x18`\x91b\0(\xE9V[\x90b\0\x18\x8B\x91\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0R` R`@`\0 \x90V[\x90b\0\x18\x97\x91b\0)\xB3V[b\0\x18\xA2\x8Ab\0\"\xADV[\x90b\0\x18\xAF\x8A\x8Cb\0\"\xB9V[\x92\x90\x86\x86`@Q\x94\x85\x94\x16\x95b\0\x18\xC7\x93\x85b\0*\xF0V[\x03\x7F\x0F\xD7\xE5\xA6IT\xF5t\xDBo\x85Q\xC9\\*\xC0j\xA8\xDE\xD0\xC8\xAC\xA4\xED\xE8\x82\xC4O\x02\xA2E\xAD\x91\xA28b\0\x16\x96V[`\x04`@Q\x7F\xB3r`\x16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xCC\x12\xCE\xF6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[4b\0\x01\xC5W\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC`\x80\x816\x01\x12b\0\x01\xC5W`\x045b\0\x19\x86\x81b\0\x02nV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$5\x81\x81\x11b\0\x01\xC5Wb\0\x19\xAA\x906\x90`\x04\x01b\0\x01\xFEV[\x90\x91`D5\x90\x81\x11b\0\x01\xC5Wb\0\x19\xC7\x906\x90`\x04\x01b\0\x01\xFEV[\x92\x90\x94`d5\x94`\xFF\x86\x16\x80\x96\x03b\0\x01\xC5Ws\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90b\0\x19\xFAb\x000\xDFV[\x16\x92\x83;\x15b\0\x01\xC5W`\0\x95b\0\x1Aa\x87\x93b\0\x1AQ\x97`@Q\x9A\x8B\x99\x8A\x98\x89\x97\x7FrY4t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x89R```\x04\x8A\x01R`d\x89\x01\x91b\0\x1E\xFEV[\x92\x86\x84\x03\x01`$\x87\x01Rb\0\x1E\xFEV[\x90`D\x83\x01R\x03\x92Z\xF1\x80\x15b\0\x15\xEAWb\0\x1AyW\0[b\0\x03\xB3\x90b\0\x05\0V[4b\0\x01\xC5W`\xE0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wb\0\x1A\xBFb\0\x01\xB5V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90`$5\x82\x81\x11b\0\x01\xC5Wb\0\x1A\xE4\x906\x90`\x04\x01b\0\x01\xCAV[PP`D5\x82\x81\x11b\0\x01\xC5Wb\0\x1B\x01\x906\x90`\x04\x01b\0\x01\xFEV[PP`d5\x82\x81\x11b\0\x01\xC5Wb\0\x1B\x1E\x906\x90`\x04\x01b\0\x01\xFEV[PP`\x845\x82\x81\x11b\0\x01\xC5Wb\0\x1B;\x906\x90`\x04\x01b\0\x02_V[P`\xA45\x91\x82\x11b\0\x01\xC5Wb\0\x1B[b\0\x03\xB3\x926\x90`\x04\x01b\0\x01\xFEV[\x91b\0\x1Bfb\0\x02\x9EV[Pb\0+\xB9V[4b\0\x01\xC5W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wb\0\x03\xB3`\x045b\0\x1B\xB0\x81b\0\x02nV[b\0\x1B\xBAb\x000\xDFV[b\0+\xE8V[4b\0\x01\xC5Wb\0\x1B\xD16b\0\x07\x96V[PPPPPb\0\x03\xB3b\0,\xB6V[4b\0\x01\xC5W``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12b\0\x01\xC5Wg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x045\x81\x81\x11b\0\x01\xC5Wb\0\x1C5\x906\x90`\x04\x01b\0\x03\xB5V[\x90`$5\x90\x81\x11b\0\x01\xC5Wb\0\x1CQ\x906\x90`\x04\x01b\0\x01\xFEV[b\0\x1C^`D5b\0\x02nV[b\0\x1Chb\0,\xB6V[`\x01\x81\x14\x80\x15\x90b\0\x1D,W[b\0\x1D\x02Wb\0\x1C\xABb\0\x1C\xD1\x91\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x93b\0,\xACV[5\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x90V[\x16\x15b\0\x1C\xDAW\0[b\0\r1\x81b\0\r;b\0\x1C\xF2b\0\x03\xB3\x94b\0\"\xADV[\x91b\0\r#`@\x82\x01\x82b\0\"\xB9V[`\x04`@Q\x7Fn\xC7\xD3?\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[P\x7F\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x80b\0\x1D_b\0\x1C\xAB\x84\x86b\0,\xACV[\x16\x15\x15\x90\x81b\0\x1DqW[Pb\0\x1CuV[\x7F\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x91Pb\0\x1D\xA4b\0\x1C\xAB\x84\x86b\0,\xACV[\x16\x14\x158b\0\x1DjV[\x91b\0\x1D\xC9\x91b\0\x1D\xC3\x91b\0\x13\xC2b\0,\xB6V[b\0-\x02V[\x15b\0\x1E\x81W`\x03\x81\x10\x15b\0\x1ERW`\x01\x03b\0\x1E(Wb\0\x1D\xC3b\0\x13\xE4\x91b\0\x1D\xF7\x936\x91b\0\x05\xF3V[b\0\x1D\xFEWV[`\x04`@Q\x7F\xBB\x92\x85\x90\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`\x04`@Q\x7F\xB8Rne\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`!`\x04R`$`\0\xFD[`\x04`@Q\x7F=?w \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x905\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x826\x03\x01\x81\x12\x15b\0\x01\xC5W\x01` \x815\x91\x01\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11b\0\x01\xC5W\x816\x03\x83\x13b\0\x01\xC5WV[`\x1F\x82` \x94\x93\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x93\x81\x86R\x86\x86\x017`\0\x85\x82\x86\x01\x01R\x01\x16\x01\x01\x90V[` \x90\x81\x815\x91b\0\x1FO\x83b\0\x10\xF8V[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x93\x16\x85R\x015b\0\x1Fj\x81b\0\x10\xF8V[\x16\x91\x01RV[=\x15b\0\x1F\xA0W=\x90b\0\x1F\x84\x82b\0\x05\xB8V[\x91b\0\x1F\x94`@Q\x93\x84b\0\x05UV[\x82R=`\0` \x84\x01>V[``\x90V[\x90`\0\x80\x91`@Q\x80\x94b\0!3` \x83\x01\x93\x7F\xBD\x95\x0F\x89\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x85R`@`$\x85\x01Rb\0 \x03`d\x85\x01b\0\x1F\xF5\x85b\0\x11\x1AV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90RV[b\0!\x16b\0!\x04a\x01\0b\0 \xE9\x87b\0 \xC8b\0 \xA8b\0 \x88b\0 Fb\0 2` \x8D\x01\x8Db\0\x1E\xABV[a\x01 `\x84\x88\x01Ra\x01\x84\x87\x01\x91b\0\x1E\xFEV[b\0 U`@\x8D\x01\x8Db\0\x1E\xABV[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x9C\x96`\xA4\x88\x82\x86\x03\x01\x91\x01Rb\0\x1E\xFEV[b\0 \x97``\x8C\x01\x8Cb\0\x1E\xABV[\x8D\x83\x03\x86\x01`\xC4\x8F\x01R\x90b\0\x1E\xFEV[b\0 \xB7`\x80\x8B\x01\x8Bb\0\x1E\xABV[\x8C\x83\x03\x85\x01`\xE4\x8E\x01R\x90b\0\x1E\xFEV[\x90b\0 \xD8`\xA0\x8A\x01\x8Ab\0\x1E\xABV[\x91\x8B\x84\x03\x01a\x01\x04\x8C\x01Rb\0\x1E\xFEV[\x95b\0 \xFDa\x01$\x89\x01`\xC0\x83\x01b\0\x1F=V[\x01b\0\x11\x1AV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x01d\x86\x01RV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`D\x84\x01RV[\x03\x93b\0!g\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x95\x86\x81\x01\x83R\x82b\0\x05UV[Q\x90\x820Z\xF1b\0!wb\0\x1FpV[P\x15b\0!\xC0W`@Q\x7F\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01R\x90b\0\x04!\x90\x82`!\x81\x01[\x03\x90\x81\x01\x83R\x82b\0\x05UV[`@Q`\0` \x82\x01R\x90b\0\x04!\x90\x82`!\x81\x01b\0!\xB3V[` b\0!\xF6\x91\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01b\0\x04$V[\x81\x01`\x03\x81R\x03\x01\x90 \x90V[` b\0\"\x1E\x91\x81`@Q\x93\x82\x85\x80\x94Q\x93\x84\x92\x01b\0\x04$V[\x81\x01`\x01\x81R\x03\x01\x90 \x90V[` \x90b\0\"G\x92\x82`@Q\x94\x83\x86\x80\x95Q\x93\x84\x92\x01b\0\x04$V[\x82\x01\x90\x81R\x03\x01\x90 \x90V[b\0\"\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92b\0\"wb\0:\x1AV[b\0\x1B\xBAb\0:\x1AV[\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0T\x16\x17`\0UV[5b\0\x04!\x81b\0\x10\xF8V[\x905\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE1\x816\x03\x01\x82\x12\x15b\0\x01\xC5W\x01\x805\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11b\0\x01\xC5W` \x01\x91\x816\x03\x83\x13b\0\x01\xC5WV[b\0\x1D\xC3\x90b\0#!\x92b\0\x13\xC2b\0,\xB6V[\x15b\0\x1D\xFEWV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11b\0\x05\x15W`\x05\x1B` \x01\x90V[\x90b\0#N\x82b\0#)V[`@\x90b\0#``@Q\x91\x82b\0\x05UV[\x83\x81R\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0b\0#\x90\x82\x95b\0#)V[\x01\x91`\0\x90`\0[\x84\x81\x10b\0#\xA7WPPPPPV[` \x90\x82Qb\0#\xB7\x81b\0\x05\x1BV[``\x81R\x82\x85\x81\x83\x01R\x82\x87\x01\x01R\x01b\0#\x98V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`2`\x04R`$`\0\xFD[\x91\x90\x81\x10\x15b\0$\rW`\x06\x1B\x01\x90V[b\0#\xCDV[\x80Q\x82\x10\x15b\0$\rW` \x91`\x05\x1B\x01\x01\x90V[o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x03b\0\x01\xC5WV[5b\0\x04!\x81b\0$(V[\x90\x81` \x91\x03\x12b\0\x01\xC5WQb\0\x04!\x81b\0\x10\xF8V[\x91\x93b\0$\x9Db\0$\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93b\0\x04!\x98\x96\x97`\xA0\x87R`\xA0\x87\x01\x91b\0\x1E\xFEV[\x95` \x85\x01\x90b\0\x1F=V[\x16``\x82\x01R`\x80\x81\x84\x03\x91\x01Rb\0\x04IV[`@Q=`\0\x82>=\x90\xFD[5b\0\x04!\x81b\0\x02nV[\x96\x95\x94\x91\x93b\0$\xFD`\x80\x95b\0%\x1B\x95g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFb\0%\x0C\x95\x16\x8BR`\xA0` \x8C\x01R`\xA0\x8B\x01\x91b\0\x1E\xFEV[\x90\x88\x82\x03`@\x8A\x01Rb\0\x04IV[\x90\x86\x82\x03``\x88\x01Rb\0\x04IV[\x93\x01RV[\x96\x99\x98\x94\x99\x97\x95\x93\x97\x91\x90\x91b\0%7\x8Bb\0#BV[\x96`\0[\x8C\x81\x10b\0'rWP\x90\x88\x99\x9A\x9B\x91`@\x97`@Q\x90` \x98\x89\x94\x833\x87\x82\x01\x90b\0%\x8F\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0`\x14\x92``\x1B\x16\x81R\x01\x90V[\x03\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x01\x85Rb\0%\xC1\x90\x85b\0\x05UV[b\0%\xCBb\0\x05\x97V[\x93\x84Rb\0%\xDB6\x8B\x8Ab\0\x05\xF3V[\x86\x85\x01R\x8C`@\x85\x01R6\x90b\0%\xF2\x92b\0\x05\xF3V[``\x83\x01R`\0Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x91b\0&\x1C\x90b\x003\xC1V[\x92`@Q\x9C\x8D\x94\x85\x93\x84\x93\x7Fl\xF0-?\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x85R\x8B`\x04\x86\x01\x94b\0&[\x95b\0$gV[\x03\x91Z\x90`\0\x91\xF1\x97\x88\x15b\0\x15\xEAW`\0\x98b\0'\xE4\xC0.\xCCj\x17(\xF2(\xE2\x0E\xCF7\xE3\xB4|\x92\x0B\x90\x7Fucs01-relay-1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0` `@Qb\0-U\x81b\0\x05\x1BV[`\r\x81R\x01R` \x81Q\x91\x01 \x14\x90V[\x90\x81` \x91\x03\x12b\0\x01\xC5WQ\x90V[\x93b\0+\xAA`\x80\x94b\0+\x9Bo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x95g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFb\0+4\x96\x9B\x9A\x9B\x16\x89R`\xA0` \x8A\x01R`\xA0\x89\x01\x90b\0\x04IV[\x91\x90\x91` \x91b\0-\xD6b\0\x15cb\0\x13\xC2\x85\x84\x01\x84b\0\"\xB9V[\x92b\0-\xEBb\0\x13\xCAb\0\x13\xC2\x84\x80b\0\"\xB9V[\x91`@\x94`@\x82\x01\x93b\0.\0\x85\x84b\0'\xE2V[\x97\x90P`\0\x95s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x85\x84\x16\x97[\x8A\x81\x10b\0.7WPPPPPPPPPPPPV[\x8B\x90b\0.ib\0\x16[b\0.ab\0.Zb\0\x13:\x85b\0\x133\x8A\x8Ab\0'\xE2V[\x94b\0\"\x03V[\x84Qb\0\"+V[\x91\x8D\x89\x84\x16\x15b\0/\x9CWP\x88\x83\x16b\0.\x95\x8B\x83\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x90\x80;\x15b\0\x01\xC5W\x87Q\x7F@\xC1\x0F\x19\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x8A\x16`\x04\x82\x01Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x90\x92\x16`$\x83\x01R`\0\x90\x82\x90`D\x90\x82\x90\x84\x90Z\xF1\x91\x82\x15b\0\x15\xEAW\x8F`\x01\x95\x8F\x94\x8F\x94\x8F\x94\x8F\x94\x8F\x90b\0/m\x8F\x94\x98\x7F'\t\x14\xFD\x198\xFCIK\x81J&C\t\x9C\\\x02\x08\x93g\"9\x0Byu:\xCC\xDC\x07\xDESM\x99b\0/{\x97b\0/\x85W[P[\x84Q\x94\x01Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x93Q\x96\x87\x96\x16\x99\x86b\0-vV[\x03\x90\xA3\x01b\0.!V[\x80b\0\x17\x81b\0/\x95\x92b\0\x05\0V[8b\0/QV[\x92Pb\x000f\x8Ab\0/\xF9b\0/\xB3\x84Qb\09\x0BV[\x95b\0/\xE3\x83\x86\x01\x91\x88b\0/\xDCb\0\x13c\x85Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x91b\09\xFAV[Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x8B\x8A`\0\x8BQ\x80\x96\x81\x95\x82\x94\x7F\xA9\x05\x9C\xBB\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x84R`\x04\x84\x01\x90\x92\x91o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF` \x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@\x85\x01\x96\x16\x84R\x16\x91\x01RV[\x03\x92\x89\x16Z\xF1\x91\x82\x15b\0\x15\xEAW\x8F`\x01\x95\x8F\x94\x8F\x94\x8F\x94\x8F\x94\x8F\x90b\0/m\x8F\x94\x98\x7F'\t\x14\xFD\x198\xFCIK\x81J&C\t\x9C\\\x02\x08\x93g\"9\x0Byu:\xCC\xDC\x07\xDESM\x99b\0/{\x97b\x000\xBDW[Pb\0/SV[b\x000\xD7\x90\x82=\x84\x11b\0\x15\xE2Wb\0\x15\xD1\x81\x83b\0\x05UV[P8b\x000\xB6V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F\x90\x16\xD0\x9Dr\xD4\x0F\xDA\xE2\xFD\x8C\xEA\xC6\xB6#Lw\x06!O\xD3\x9C\x1C\xD1\xE6\t\xA0R\x8C\x19\x93\0T\x163\x03b\x001 WV[`$`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R\xFD[\x90`@Q\x91\x82`\0\x82Tb\x001e\x81b\0)\x02V[\x90\x81\x84R` \x94`\x01\x91`\x01\x81\x16\x90\x81`\0\x14b\x001\xDBWP`\x01\x14b\x001\x98W[PPPb\0\x02\x9C\x92P\x03\x83b\0\x05UV[`\0\x90\x81R\x85\x81 \x95\x93P\x91\x90[\x81\x83\x10b\x001\xC2WPPb\0\x02\x9C\x93P\x82\x01\x018\x80\x80b\x001\x87V[\x85T\x88\x84\x01\x85\x01R\x94\x85\x01\x94\x87\x94P\x91\x83\x01\x91b\x001\xA6V[\x91PPb\0\x02\x9C\x95\x93P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x91P\x16\x82\x84\x01R\x15\x15`\x05\x1B\x82\x01\x018\x80\x80b\x001\x87V[\x91` \x81\x01\x91o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80b\x002A\x85b\0$CV[\x16\x15b\0\x18\xF2Wb\x002\x91b\x002\x8Bb\x002\\\x84\x88b\0(\xE9V[b\x002g\x86b\0$\xBDV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0R` R`@`\0 \x90V[b\x001PV[\x80Q\x90\x95\x90\x15b\x003SWPPPb\x002\xCFb\x002\xB6b\x002\xB6b\x002\xD6\x93b\0$\xBDV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[\x91b\0$CV[\x90\x80;\x15b\0\x01\xC5W`@Q\x7F\x9D\xC2\x9F\xAC\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x90\x92\x16`$\x83\x01R`\0\x90\x82\x90`D\x90\x82\x90\x84\x90Z\xF1\x80\x15b\0\x15\xEAWb\x003CWP\x90V[\x80b\0\x17\x81b\0\x04!\x92b\0\x05\0V[b\0\x04!\x95P\x93b\x003\xB5\x92\x91b\x003\xACb\x003\xBB\x96b\x003\x96b\x003|b\x002\xB6\x89b\0$\xBDV[b\x003\x8Bb\0\x13c\x87b\0$CV[\x900\x903\x90b\0;\x93V[b\0\x14Sb\x003\xA5\x88b\0$\xBDV[\x94b\0$CV[\x92\x16\x91b\0<\x9FV[b\0$\xBDV[b\0<\xBFV[b\x003\xF8\x90\x80Q` \x90\x81\x83\x01Q\x91`@```@\x86\x01Q\x95\x01Q\x91b\x004*`@Q\x97\x88\x95`\x80\x84\x88\x01R`\xA0\x87\x01\x90b\0\x04IV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x96\x87\x87\x83\x03\x01`@\x88\x01Rb\0\x04IV[\x90\x85\x85\x83\x03\x01``\x86\x01R\x86Q\x91\x82\x81R\x81\x81\x01\x82\x80\x85`\x05\x1B\x84\x01\x01\x99\x01\x94`\0\x92[\x85\x84\x10b\x004wWPPPPPPP\x83b\0!\xB3\x91\x84\x84b\0\x04!\x97\x03\x01`\x80\x85\x01Rb\0\x04IV[\x91\x93`\x01\x91\x93\x95\x97\x98P\x80\x8B\x8B\x85\x83\x9A\x9D\x9E\x03\x01\x87R\x8BQ\x90\x82o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81b\x004\xB6\x85Q\x8B\x86R\x8B\x86\x01\x90b\0\x04IV[\x94\x01Q\x16\x91\x01R\x9A\x01\x94\x01\x94\x01\x91\x8A\x97\x96\x94\x91\x99\x98\x99\x95\x93\x95b\x004NV[\x90\x81\x82Q\x90`@Q\x93`\x02\x80\x86\x01\x93\x80\x80\x01\x85R`\x0F\x90o0123456789abcdef`\x0FR`\"\x88\x01\x93\x01\x93[\x84\x81\x03b\x005-WPPP` \x91P`\0\x81R\x01`@Ra0x`\x02\x82Q\x01\x91R\x82RV[\x90\x91\x80\x93`\x01\x80\x93\x01\x92\x84\x84Q\x16Q\x90\x82\x01S\x83\x83Q`\x04\x1C\x16Q\x81S\x01\x92\x91\x90b\x005\x08V[`\"b\0\x04!\x91`@Q\x93\x81b\x005v\x86\x93Q\x80\x92` \x80\x87\x01\x91\x01b\0\x04$V[\x82\x01\x90\x7F/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x91\x82` \x82\x01Rb\x005\xB7\x82Q\x80\x93` `!\x85\x01\x91\x01b\0\x04$V[\x01\x90`!\x82\x01R\x03`\x02\x81\x01\x84R\x01\x82b\0\x05UV[`@Q\x90b\x005\xDC\x82b\0\x05\x1BV[`\0` \x83\x82\x81R\x01RV[b\x005\xF2b\x005\xCDV[P` \x81Q\x91`@Q\x92b\x006\x07\x84b\0\x05\x1BV[\x83R\x01` \x82\x01R\x90V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x01\x91\x82\x11b\x006oWV[b\x006\x12V[` \x03\x90` \x82\x11b\x006oWV[\x90` \x82\x01\x80\x92\x11b\x006oWV[\x91\x90\x82\x01\x80\x92\x11b\x006oWV[\x90b\x006\xACb\x005\xCDV[P\x81Q\x90\x80Q\x91\x82\x81\x10b\x007\x1BW`\x01\x92` \x85\x01\x93\x84Q\x82` \x86\x01Q\x80\x83\x03b\x007\nW[PPPb\x006\xE4W[PPPP\x90V[\x81\x03\x90\x81\x11b\x006oW\x83RQ\x90\x80Q\x91\x82\x01\x80\x92\x11b\x006oWR8\x80\x80\x80b\x006\xDDV[\x81\x92\x93P \x91 \x148\x82\x81b\x006\xD4V[PPP\x90V[`\x14\x81Q\x03b\x007\x83W` \x81Q\x91\x01Q\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\x91\x82\x81\x16\x91`\x14\x81\x10b\x007mW[PP\x90P``\x1C\x90V[\x83\x91\x92P`\x14\x03`\x03\x1B\x1B\x16\x16\x808\x80b\x007cV[`\x04`@Q\x7Fxq\x8C;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90b\0\x13\xE4\x91b\0=\x93V[b\x007\xCBb\0\x04!\x92` \x92b\x005TV[`@Q\x93\x81b\x007\xE5\x86\x93Q\x80\x92\x86\x80\x87\x01\x91\x01b\0\x04$V[\x82\x01b\x007\xFB\x82Q\x80\x93\x86\x80\x85\x01\x91\x01b\0\x04$V[\x01\x03\x80\x84R\x01\x82b\0\x05UV[\x80Q\x90b\083b\08\x1A\x83b\0\x05\xB8V[\x92b\08*`@Q\x94\x85b\0\x05UV[\x80\x84Rb\0\x05\xB8V[\x90` \x80\x84\x01\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x80\x94\x016\x837\x80\x83\x01Q\x92Q\x92\x91\x93[\x81\x84\x10\x15b\08\xDAWP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x80b\08\xAEW[PPQ\x82Q\x82\x16\x91\x19\x16\x17\x90R\x90V[\x90\x80\x92\x93P\x03\x90\x81\x11b\x006oWb\08\xCBb\08\xD1\x91b\0>\x8CV[b\x006AV[\x908\x80b\08\x9EV[\x92\x91\x93\x84Q\x81R\x81\x81\x01\x80\x91\x11b\x006oW\x93\x81\x81\x01\x80\x91\x11b\x006oW\x91\x83\x81\x01\x90\x81\x11b\x006oW\x92b\08kV[`*\x81Q\x03b\09\xD0W` \x81\x01Q\x90\x7F0x\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x7F\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`*`\"\x84\x01Q\x93\x01Q\x93\x16\x03b\09\xD0W{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0b\09\xC3b\09\xBC\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x93b\0>\x9CV[\x93b\0>\x9CV[` \x1C\x16\x91\x16\x17``\x1C\x90V[`\x04`@Q\x7F\xFEo\x15p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90b\0\x06\xC0b\0:\n\x92b\0!\xDBV[\x80T\x91\x82\x03\x91\x82\x11b\x006oWUV[`\xFF\x7F\xF0\xC5~\x16\x84\r\xF0@\xF1P\x88\xDC/\x81\xFE9\x1C9#\xBE\xC7>#\xA9f.\xFC\x9C\"\x9Cj\0T`@\x1C\x16\x15b\0:JWV[`\x04`@Q\x7F\xD7\xE6\xBC\xF8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x90\x81;\x15b\0;LWs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82T\x16\x17\x90U\x7F\xBC|\xD7Z \xEE'\xFD\x9A\xDE\xBA\xB3 A\xF7U!M\xBCk\xFF\xA9\x0C\xC0\"[9\xDA.\\-;`\0\x80\xA2\x80Q\x15b\0;\x18Wb\0;\x15\x91b\0A\xD9V[PV[PP4b\0;\"WV[`\x04`@Q\x7F\xB3\x98\x97\x9F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[`$\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x7FL\x9C\x8C\xE3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x16`\x04\x82\x01R\xFD[`\0\x91b\0<\x1C\x93\x83\x92`@Q\x96` \x88\x01\x93\x7F#\xB8r\xDD\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x85Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84\x80\x92\x16`$\x8B\x01R\x16`D\x89\x01R`d\x88\x01R`d\x87Rb\0<\x02\x87b\0\x058V[\x16\x94Q\x90\x82\x86Z\xF1b\0<\x14b\0\x1FpV[\x90\x83b\0A\xF6V[\x80Q\x90\x81\x15\x15\x91\x82b\0<}W[PPb\0<4WPV[`@Q\x7FRt\xAF\xE7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x90\x91\x16`\x04\x82\x01R`$\x90\xFD[b\0<\x97\x92P\x90` \x80b\0\x13\xE4\x93\x83\x01\x01\x91\x01b\0+;V[8\x80b\0<*V[\x90b\0\x06\xC0b\0<\xAF\x92b\0!\xDBV[\x80T\x91\x82\x01\x80\x92\x11b\x006oWUV[\x90`@Q\x91`\x80\x83\x01`@R`\x0Fo0123456789abcdef`\x0FR`\x02\x84\x01\x91`(\x83R`\0`J\x86\x01R``\x1B\x90`\x01`\0[\x80\x80\x01\x87\x01`\"\x85\x83\x1A\x85\x81\x16Q`#\x84\x01S`\x04\x1CQ\x91\x01S\x01`\x14\x81\x14b\0='W`\x01\x90b\0<\xFAV[PPPa0x`\x02\x82Q\x01\x91R\x82RV[\x90\x81`\x03\x1B\x91\x7F\x1F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x03b\x006oWV[`\xFF\x81\x11b\x006oW`\x01\x90\x1B\x90V[\x81\x81\x03\x92\x91`\0\x13\x80\x15\x82\x85\x13\x16\x91\x84\x12\x16\x17b\x006oWV[\x91\x90\x82Q\x92\x81Q\x84\x81\x10b\0>\x83W[P` \x80\x82\x01Q\x94` \x84\x01Q\x90`\0\x96[\x81\x88\x10b\0=\xD2WPPPPb\0\x04!\x92\x93PQ\x90Q\x90b\0=yV[\x80Q\x83Q\x90\x81\x81\x03b\0>\x0BW[PPb\0=\xFCb\0=\xF5b\0>\x03\x92b\x006\x84V[\x93b\x006\x84V[\x97b\x006\x84V[\x96\x91b\0=\xB5V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x86\x85\x10b\0>MW[\x91\x82\x16\x91\x16\x81\x81\x14b\0=\xE0W\x03\x97PPPPPPPV[Pb\0>|b\08\xCBb\0>vb\0>p\x8Db\0>j\x89b\x006uV[b\x006\x93V[b\0=8V[b\0=iV[\x19b\0>5V[\x93P8b\0=\xA3V[`\x1F\x81\x11b\x006oWa\x01\0\n\x90V[\x7F\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x82\x16b\09\xD0W\x7F\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xCF\xD0\x81\x81\x84\x01\x16b\09\xD0W\x7F\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x92`\xFF\x84\x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\x83\x01`\x07\x1C\x16\x02\x90\x7F\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x82\x16\x90\x03\x93\x83\x83\x86\x01\x16b\09\xD0W\x83\x83\x7F\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\x80\x94\x16\x87\x03\x01\x16b\09\xD0W`\xFF\x90\x7F@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\x86\x01`\x07\x1C\x16\x02\x93\x7F \x85\x16\x90\x03\x90\x82\x82\x01\x94\x16\x90\x03\x01\x16b\09\xD0W\x7F\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\x81\x16b\09\xD0W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x91`\x04\x1B\x90`\x08\x1B\x7F\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x0F\0\x81\x16\x7F\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\xF0\0\x83\x16\x17`\x08\x1B\x91\x7F\xF0\0\0\0\0\0\0\0\xF0\0\0\0\0\0\0\0\xF0\0\0\0\0\0\0\0\xF0\0\0\0\0\0\0\0\x7F\x0F\0\0\0\0\0\0\0\x0F\0\0\0\0\0\0\0\x0F\0\0\0\0\0\0\0\x0F\0\0\0\0\0\0\0~\xFF\0\0\0\0\0\0\0\xFF\0\0\0\0\0\0\0\xFF\0\0\0\0\0\0\0\xFF\0\0\0\0\0\0z\xFF\0\0\0\0\0\0\0\xFF\0\0\0\0\0\0\0\xFF\0\0\0\0\0\0\0\xFF\0\0\x86\x16{\x0F\0\0\0\0\0\0\0\x0F\0\0\0\0\0\0\0\x0F\0\0\0\0\0\0\0\x0F\0\0\0\x86\x16{\xF0\0\0\0\0\0\0\0\xF0\0\0\0\0\0\0\0\xF0\0\0\0\0\0\0\0\xF0\0\0\0\x86\x16\x17\x17`\x10\x1B\x95\x16\x93\x16\x91\x16\x17\x17\x17\x80` \x1B\x90\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0{\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0k\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\x84\x16o\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\x84\x16\x17`@\x1B\x93\x16\x91\x16\x17\x17\x16\x90V[`\0\x80b\0\x04!\x93` \x81Q\x91\x01\x84Z\xF4b\0A\xF4b\0\x1FpV[\x91[\x90b\0B7WP\x80Q\x15b\0B\rW\x80Q\x90` \x01\xFD[`\x04`@Q\x7F\x14%\xEAB\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD[\x81Q\x15\x80b\0B\x91W[b\0BJWP\x90V[`$\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`@Q\x91\x7F\x99\x96\xB3\x15\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x16`\x04\x82\x01R\xFD[P\x80;\x15b\0BAV\xFE`\x80`@R4b\0\x03XWb\0\x14\xF2\x808\x03\x80b\0\0\x1D\x81b\0\x03]V[\x92\x839\x81\x01` \x91\x82\x81\x83\x03\x12b\0\x03XW\x80Q`\x01`\x01`@\x1B\x03\x91\x82\x82\x11b\0\x03XW\x01\x91`\x1F\x81\x81\x85\x01\x12\x15b\0\x03XW\x83Q\x93\x83\x85\x11b\0\x02UW`\x1F\x19\x94b\0\0q\x83\x82\x01\x87\x16\x88\x01b\0\x03]V[\x93\x81\x85R\x87\x82\x84\x01\x01\x11b\0\x03XW\x86\x91`\0[\x82\x81\x10b\0\x03DWPP\x90`\0\x91\x84\x01\x01R\x81Q\x90\x83\x82\x11b\0\x02UW`\x03\x92\x83T\x92`\x01\x93\x84\x81\x81\x1C\x91\x16\x80\x15b\0\x039W[\x89\x82\x10\x14b\0\x03#W\x83\x81\x11b\0\x02\xD8W[P\x80\x88\x84\x82\x11`\x01\x14b\0\x02wW`\0\x91b\0\x02kW[P`\0\x19\x82\x87\x1B\x1C\x19\x16\x90\x84\x1B\x17\x84U[\x80Q\x94\x85\x11b\0\x02UW`\x04\x96\x87T\x84\x81\x81\x1C\x91\x16\x80\x15b\0\x02JW[\x82\x82\x10\x14b\0\x025W\x83\x81\x11b\0\x01\xEAW[P\x80\x92\x86\x11`\x01\x14b\0\x01~WP\x84\x95P\x90\x84\x92\x91`\0\x95b\0\x01rW[PP\x1B\x92`\0\x19\x91\x1B\x1C\x19\x16\x17\x90U[`\x05\x80T`\x01`\x01`\xA0\x1B\x03\x19\x163\x17\x90U`@Qa\x11n\x90\x81b\0\x03\x84\x829\xF3[\x01Q\x93P8\x80b\0\x01@V[\x93\x92\x95\x85\x90\x81\x16\x88`\0R\x85`\0 \x95`\0\x90[\x89\x83\x83\x10b\0\x01\xCFWPPP\x10b\0\x01\xB4W[PPPP\x81\x1B\x01\x90Ub\0\x01PV[\x01Q\x90`\xF8\x84`\0\x19\x92\x1B\x16\x1C\x19\x16\x90U8\x80\x80\x80b\0\x01\xA5V[\x85\x87\x01Q\x89U\x90\x97\x01\x96\x94\x85\x01\x94\x88\x93P\x90\x81\x01\x90b\0\x01\x92V[\x88`\0R\x81`\0 \x84\x80\x89\x01`\x05\x1C\x82\x01\x92\x84\x8A\x10b\0\x02+W[\x01`\x05\x1C\x01\x90\x85\x90[\x82\x81\x10b\0\x02\x1EWPPb\0\x01\"V[`\0\x81U\x01\x85\x90b\0\x02\x0EV[\x92P\x81\x92b\0\x02\x05V[`\"\x89cNH{q`\xE0\x1B`\0RR`$`\0\xFD[\x90`\x7F\x16\x90b\0\x01\x10V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[\x90P\x82\x01Q8b\0\0\xE2V[\x88\x86\x93\x16\x90\x87`\0R\x8A`\0 \x91`\0[\x8C\x82\x82\x10b\0\x02\xC1WPP\x83\x11b\0\x02\xA8W[PP\x81\x1B\x01\x84Ub\0\0\xF3V[\x84\x01Q`\0\x19\x83\x89\x1B`\xF8\x16\x1C\x19\x16\x90U8\x80b\0\x02\x9BV[\x83\x88\x01Q\x85U\x89\x96\x90\x94\x01\x93\x92\x83\x01\x92\x01b\0\x02\x88V[\x85`\0R\x88`\0 \x84\x80\x84\x01`\x05\x1C\x82\x01\x92\x8B\x85\x10b\0\x03\x19W[\x01`\x05\x1C\x01\x90\x85\x90[\x82\x81\x10b\0\x03\x0CWPPb\0\0\xCBV[`\0\x81U\x01\x85\x90b\0\x02\xFCV[\x92P\x81\x92b\0\x02\xF3V[cNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[\x90`\x7F\x16\x90b\0\0\xB9V[\x81\x81\x01\x84\x01Q\x86\x82\x01\x85\x01R\x83\x01b\0\0\x85V[`\0\x80\xFD[`@Q\x91\x90`\x1F\x01`\x1F\x19\x16\x82\x01`\x01`\x01`@\x1B\x03\x81\x11\x83\x82\x10\x17b\0\x02UW`@RV\xFE`\x80`@\x81\x81R`\x04\x91\x826\x10\x15a\0\x16W`\0\x80\xFD[`\0\x92\x835`\xE0\x1C\x91\x82c\x06\xFD\xDE\x03\x14a\r\x86WP\x81c\t^\xA7\xB3\x14a\x0C\x81W\x81c\x18\x16\r\xDD\x14a\x0CDW\x81c#\xB8r\xDD\x14a\n\xBDW\x81c1<\xE5g\x14a\n}W\x81c@\xC1\x0F\x19\x14a\tpW\x81cp\xA0\x821\x14a\t\x0FW\x81crY4t\x14a\x04\xD6W\x81c\x95\xD8\x9BA\x14a\x03\x14W\x81c\x9D\xC2\x9F\xAC\x14a\x01\xCAWP\x80c\xA9\x05\x9C\xBB\x14a\x01|W\x80c\xDDb\xED>\x14a\x01\tWc\xF8Q\xA4@\x14a\0\xB4W`\0\x80\xFD[4a\x01\x05W\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W` \x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x05T\x16\x90Q\x90\x81R\xF3[P\x80\xFD[P4a\x01\x05W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W\x80` \x92a\x01Da\x0F\x16V[a\x01La\x0F>V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x16\x83R`\x01\x86R\x83\x83 \x91\x16\x82R\x84R T\x90Q\x90\x81R\xF3[P4a\x01\x05W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W` \x90a\x01\xC3a\x01\xB9a\x0F\x16V[`$5\x903a\x0F\xE2V[Q`\x01\x81R\xF3[\x83\x91P4a\x01\x05W\x82\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05Wa\x02\x03a\x0F\x16V[\x90`$5\x90a\x02\x10a\x11#V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16\x92\x83\x15a\x02\xE5W\x83\x85R\x84` R\x85\x85 T\x91\x83\x83\x10a\x02\x86WPP\x81\x84\x95\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x93` \x93\x86\x88R\x87\x85R\x03\x81\x87 U\x81`\x02T\x03`\x02UQ\x90\x81R\xA3\x80\xF3[a\x02\xE1\x84\x84\x89Q\x94\x85\x94\x7F\xE4P\xD3\x8C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x86R\x85\x01`@\x91\x94\x93\x92s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF``\x83\x01\x96\x16\x82R` \x82\x01R\x01RV[\x03\x90\xFD[`$\x82\x86\x88Q\x91\x7F\x96\xC6\xFD\x1E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[\x83\x834a\x01\x05W\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W\x80Q\x90\x81\x83`\x07Ta\x03U\x81a\x0F\x8FV[\x80\x84R\x90` \x90`\x01\x90\x81\x81\x16\x90\x81\x15a\x04qWP`\x01\x14a\x03\xF0W[PPP\x03`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16\x82\x01\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11\x83\x85\x10\x17a\x03\xC4WP\x82\x91\x82a\x03\xC0\x92R\x82a\x0E\xB0V[\x03\x90\xF3[\x80`A\x86\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`$\x94RR\xFD[`\x07\x88R\x7F\xA6l\xC9(\xB5\xED\xB8*\xF9\xBDI\x92)T\x15Z\xB7\xB0\x94&\x94\xBE\xA4\xCEDf\x1D\x9A\x876\xC6\x88\x94\x93P\x87\x92\x91\x90[\x82\x84\x10a\x04YWP\x92\x93PP\x82\x01` \x01\x90P\x81`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a\x03rV[\x85T\x88\x85\x01\x83\x01R\x94\x85\x01\x94\x87\x94P\x92\x81\x01\x92a\x04\x1DV[`\x1F\x95P` \x93P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x96\x94\x92P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x91P\x16\x82\x84\x01R\x15\x15`\x05\x1B\x82\x01\x01\x91\x81\x93a\x03rV[\x834a\t\x0CW``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t\x0CWg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x805\x83\x81\x11a\t\x08Wa\x05&\x906\x90\x83\x01a\x0FaV[\x91\x90`$5\x85\x81\x11a\t\x04Wa\x05?\x906\x90\x84\x01a\x0FaV[\x92\x90\x95`D5\x94`\xFF\x86\x16\x80\x96\x03a\t\0Wa\x05Ya\x11#V[\x81\x81\x11a\x08\xD4W\x80a\x05l`\x06Ta\x0F\x8FV[\x94`\x1F\x95\x86\x81\x11a\x08hW[P\x88\x90\x86\x83\x11`\x01\x14a\x07\xA7W\x89\x92a\x07\x9CW[PP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17`\x06U[\x83\x11a\x07pWPa\x05\xD1`\x07Ta\x0F\x8FV[\x81\x81\x11a\x07\x14W[P\x83\x90\x82\x11`\x01\x14a\x06ZW\x83\x94\x82\x93\x94\x92a\x06OW[PP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82`\x01\x1B\x92`\x03\x1B\x1C\x19\x16\x17`\x07U[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0`\x08T\x16\x17`\x08U\x80\xF3[\x015\x90P\x84\x80a\x05\xF0V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x82\x16\x94\x7F\xA6l\xC9(\xB5\xED\xB8*\xF9\xBDI\x92)T\x15Z\xB7\xB0\x94&\x94\xBE\xA4\xCEDf\x1D\x9A\x876\xC6\x88\x91\x85[\x87\x81\x10a\x06\xFCWP\x83`\x01\x95\x96\x97\x10a\x06\xC4W[PPP\x81\x1B\x01`\x07Ua\x06#V[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U\x84\x80\x80a\x06\xB6V[\x90\x92` `\x01\x81\x92\x86\x86\x015\x81U\x01\x94\x01\x91\x01a\x06\xA2V[\x7F\xA6l\xC9(\xB5\xED\xB8*\xF9\xBDI\x92)T\x15Z\xB7\xB0\x94&\x94\xBE\xA4\xCEDf\x1D\x9A\x876\xC6\x88\x82\x80\x85\x01`\x05\x1C\x82\x01\x92` \x86\x10a\x07gW[\x01`\x05\x1C\x01\x90[\x81\x81\x10a\x07\\WPa\x05\xD9V[\x85\x81U`\x01\x01a\x07OV[\x92P\x81\x92a\x07HV[\x84`A`$\x92\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83RR\xFD[\x015\x90P\x89\x80a\x05\x8CV[\x90\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16\x91`\x06\x8AR\x7F\xF6R\"#\x13\xE2\x84YR\x8D\x92\x0Be\x11\\\x16\xC0O>\xFC\x82\xAA\xED\xC9{\xE5\x9F?7|\r?\x92\x8A[\x81\x81\x10a\x08PWP\x90\x84`\x01\x95\x94\x93\x92\x10a\x08\x18W[PPP\x81\x1B\x01`\x06Ua\x05\xBFV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xF8\x85`\x03\x1B\x16\x1C\x19\x91\x015\x16\x90U\x89\x80\x80a\x08\nV[\x91\x93` `\x01\x81\x92\x87\x87\x015\x81U\x01\x95\x01\x92\x01a\x07\xF4V[\x90\x91P`\x06\x89R\x7F\xF6R\"#\x13\xE2\x84YR\x8D\x92\x0Be\x11\\\x16\xC0O>\xFC\x82\xAA\xED\xC9{\xE5\x9F?7|\r?\x86\x80\x85\x01`\x05\x1C\x82\x01\x92` \x86\x10a\x08\xCBW[\x90\x85\x94\x93\x92\x91\x01`\x05\x1C\x01\x90[\x81\x81\x10a\x08\xBDWPa\x05xV[\x8A\x81U\x84\x93P`\x01\x01a\x08\xB0V[\x92P\x81\x92a\x08\xA3V[`$\x87`A\x85\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83RR\xFD[\x86\x80\xFD[\x84\x80\xFD[\x82\x80\xFD[\x80\xFD[PP4a\x01\x05W` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W\x80` \x92s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFa\taa\x0F\x16V[\x16\x81R\x80\x84R T\x90Q\x90\x81R\xF3[\x91\x90P4a\t\x08W\x80\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t\x08Wa\t\xA9a\x0F\x16V[\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`$5\x92a\t\xCBa\x11#V[\x16\x92\x83\x15a\nOW`\x02T\x90\x83\x82\x01\x80\x92\x11a\n#WP\x84\x92\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x92` \x92`\x02U\x85\x85R\x84\x83R\x80\x85 \x82\x81T\x01\x90UQ\x90\x81R\xA3\x80\xF3[\x85`\x11`$\x92\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83RR\xFD[\x84`$\x92Q\x91\x7F\xECD/\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[PP4a\x01\x05W\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W` \x90`\xFF`\x08T\x16\x90Q\x90\x81R\xF3[\x90P\x824a\t\x0CW``\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t\x0CWa\n\xF7a\x0F\x16V[a\n\xFFa\x0F>V[\x91`D5\x93s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16\x80\x83R`\x01` R\x86\x83 3\x84R` R\x86\x83 T\x91\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x03a\x0BgW[` \x88a\x01\xC3\x89\x89\x89a\x0F\xE2V[\x86\x83\x10a\x0B\xFFW\x81\x15a\x0B\xD0W3\x15a\x0B\xA1WP\x82R`\x01` \x90\x81R\x86\x83 3\x84R\x81R\x91\x86\x90 \x90\x85\x90\x03\x90U\x82\x90a\x01\xC3\x87a\x0BYV[`$\x90\x84\x89Q\x91\x7F\x94(\rb\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[`$\x90\x84\x89Q\x91\x7F\xE6\x02\xDF\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[\x87Q\x7F\xFB\x8FA\xB2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3\x91\x81\x01\x91\x82R` \x82\x01\x93\x90\x93R`@\x81\x01\x87\x90R\x82\x91P``\x01\x03\x90\xFD[PP4a\x01\x05W\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\x01\x05W` \x90`\x02T\x90Q\x90\x81R\xF3[\x90P4a\t\x08W\x81\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t\x08Wa\x0C\xB9a\x0F\x16V[`$5\x903\x15a\rWWs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x91\x82\x15a\r(WP\x80\x83` \x953\x81R`\x01\x87R\x81\x81 \x85\x82R\x87R U\x82Q\x90\x81R\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x843\x92\xA3Q`\x01\x81R\xF3[`$\x90\x85\x85Q\x91\x7F\x94(\rb\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[`$\x83\x86\x86Q\x91\x7F\xE6\x02\xDF\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83R\x82\x01R\xFD[\x84\x90\x844a\t\x08W\x82\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFC6\x01\x12a\t\x08W\x81\x83`\x06Ta\r\xC5\x81a\x0F\x8FV[\x80\x84R\x90` \x90`\x01\x90\x81\x81\x16\x90\x81\x15a\x04qWP`\x01\x14a\x0E/WPPP\x03`\x1F\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x16\x82\x01\x92g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x11\x83\x85\x10\x17a\x03\xC4WP\x82\x91\x82a\x03\xC0\x92R\x82a\x0E\xB0V[`\x06\x88R\x7F\xF6R\"#\x13\xE2\x84YR\x8D\x92\x0Be\x11\\\x16\xC0O>\xFC\x82\xAA\xED\xC9{\xE5\x9F?7|\r?\x94\x93P\x87\x92\x91\x90[\x82\x84\x10a\x0E\x98WP\x92\x93PP\x82\x01` \x01\x90P\x81`\x1F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0a\x03rV[\x85T\x88\x85\x01\x83\x01R\x94\x85\x01\x94\x87\x94P\x92\x81\x01\x92a\x0E\\V[` \x80\x82R\x82Q\x81\x83\x01\x81\x90R\x93\x92`\0[\x85\x81\x10a\x0F\x02WPPP\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x84`\0`@\x80\x96\x97\x86\x01\x01R\x01\x16\x01\x01\x90V[\x81\x81\x01\x83\x01Q\x84\x82\x01`@\x01R\x82\x01a\x0E\xC2V[`\x045\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x0F9WV[`\0\x80\xFD[`$5\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x82\x03a\x0F9WV[\x91\x81`\x1F\x84\x01\x12\x15a\x0F9W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x0F9W` \x83\x81\x86\x01\x95\x01\x01\x11a\x0F9WV[\x90`\x01\x82\x81\x1C\x92\x16\x80\x15a\x0F\xD8W[` \x83\x10\x14a\x0F\xA9WV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[\x91`\x7F\x16\x91a\x0F\x9EV[\x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x16\x92\x83\x15a\x10\xF2W\x16\x92\x83\x15a\x10\xC1W`\0\x90\x83\x82R\x81` R`@\x82 T\x90\x83\x82\x10a\x10iWP\x91`@\x82\x82\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x95\x87` \x96R\x82\x86R\x03\x82\x82 U\x86\x81R \x81\x81T\x01\x90U`@Q\x90\x81R\xA3V[`@Q\x7F\xE4P\xD3\x8C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x90\x91\x16`\x04\x82\x01R`$\x81\x01\x91\x90\x91R`D\x81\x01\x83\x90R`d\x90\xFD[`$`@Q\x7F\xECD/\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R\xFD[`$`@Q\x7F\x96\xC6\xFD\x1E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x05T\x163\x03a\x11DWV[`\x04`@Q\x7F\xCF\x19>\xD8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xFD"; - /// The deployed bytecode of the contract. - #[cfg(feature = "providers")] - pub static UCS01RELAY_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = - ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE); - #[cfg(feature = "providers")] - pub struct UCS01Relay(::ethers::contract::Contract); - #[cfg(feature = "providers")] - impl ::core::clone::Clone for UCS01Relay { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - #[cfg(feature = "providers")] - impl ::core::ops::Deref for UCS01Relay { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::ops::DerefMut for UCS01Relay { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - #[cfg(feature = "providers")] - impl ::core::fmt::Debug for UCS01Relay { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(UCS01Relay)) - .field(&self.address()) - .finish() - } - } - #[cfg(feature = "providers")] - impl UCS01Relay { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - UCS01RELAY_ABI.clone(), - client, - )) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - UCS01RELAY_ABI.clone(), - UCS01RELAY_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - /// Calls the contract's `UPGRADE_INTERFACE_VERSION` (0xad3cb1cc) function - pub fn upgrade_interface_version( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([173, 60, 177, 204], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getDenomAddress` (0x3a74ce26) function - pub fn get_denom_address( - &self, - source_channel: ::std::string::String, - denom: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([58, 116, 206, 38], (source_channel, denom)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `getOutstanding` (0x2b66b116) function - pub fn get_outstanding( - &self, - source_channel: ::std::string::String, - token: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([43, 102, 177, 22], (source_channel, token)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `ibcAddress` (0x696a9bf4) function - pub fn ibc_address( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([105, 106, 155, 244], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `initialize` (0x485cc955) function - pub fn initialize( - &self, - ibc_handler: ::ethers::core::types::Address, - admin: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([72, 92, 201, 85], (ibc_handler, admin)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `onAcknowledgementPacket` (0xfb8b532e) function - pub fn on_acknowledgement_packet( - &self, - ibc_packet: IbcCoreChannelV1PacketData, - acknowledgement: ::ethers::core::types::Bytes, - p2: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([251, 139, 83, 46], (ibc_packet, acknowledgement, p2)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `onChanCloseConfirm` (0x3f41c9ea) function - pub fn on_chan_close_confirm( - &self, - p0: ::std::string::String, - p1: ::std::string::String, - p2: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([63, 65, 201, 234], (p0, p1, p2)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `onChanCloseInit` (0x7538ed68) function - pub fn on_chan_close_init( - &self, - p0: ::std::string::String, - p1: ::std::string::String, - p2: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([117, 56, 237, 104], (p0, p1, p2)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `onChanOpenAck` (0x60ca56eb) function - pub fn on_chan_open_ack( - &self, - p0: ::std::string::String, - p1: ::std::string::String, - p2: ::std::string::String, - counterparty_version: ::std::string::String, - relayer: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [96, 202, 86, 235], - (p0, p1, p2, counterparty_version, relayer), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `onChanOpenConfirm` (0xf8288cc6) function - pub fn on_chan_open_confirm( - &self, - p0: ::std::string::String, - p1: ::std::string::String, - p2: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([248, 40, 140, 198], (p0, p1, p2)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `onChanOpenInit` (0xf2f83f7a) function - pub fn on_chan_open_init( - &self, - order: u8, - p1: ::std::vec::Vec<::std::string::String>, - p2: ::std::string::String, - p3: ::std::string::String, - p4: IbcCoreChannelV1CounterpartyData, - version: ::std::string::String, - relayer: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [242, 248, 63, 122], - (order, p1, p2, p3, p4, version, relayer), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `onChanOpenTry` (0x218d1e3e) function - pub fn on_chan_open_try( - &self, - order: u8, - p1: ::std::vec::Vec<::std::string::String>, - p2: ::std::string::String, - p3: ::std::string::String, - p4: IbcCoreChannelV1CounterpartyData, - version: ::std::string::String, - counterparty_version: ::std::string::String, - relayer: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [33, 141, 30, 62], - ( - order, - p1, - p2, - p3, - p4, - version, - counterparty_version, - relayer, - ), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `onRecvPacket` (0x2301c6f5) function - pub fn on_recv_packet( - &self, - ibc_packet: IbcCoreChannelV1PacketData, - relayer: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 1, 198, 245], (ibc_packet, relayer)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `onRecvPacketProcessing` (0xbd950f89) function - pub fn on_recv_packet_processing( - &self, - ibc_packet: IbcCoreChannelV1PacketData, - p1: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([189, 149, 15, 137], (ibc_packet, p1)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `onTimeoutPacket` (0x52c7157d) function - pub fn on_timeout_packet( - &self, - ibc_packet: IbcCoreChannelV1PacketData, - p1: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 199, 21, 125], (ibc_packet, p1)) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `owner` (0x8da5cb5b) function - pub fn owner( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([141, 165, 203, 91], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `paused` (0x5c975abb) function - pub fn paused(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([92, 151, 90, 187], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `proxiableUUID` (0x52d1902d) function - pub fn proxiable_uuid(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 209, 144, 45], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `renounceOwnership` (0x715018a6) function - pub fn renounce_ownership(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([113, 80, 24, 166], ()) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `send` (0xa5b7e178) function - pub fn send( - &self, - source_channel: ::std::string::String, - receiver: ::ethers::core::types::Bytes, - tokens: ::std::vec::Vec, - extension: ::std::string::String, - timeout_height: IbcCoreClientV1HeightData, - timeout_timestamp: u64, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [165, 183, 225, 120], - ( - source_channel, - receiver, - tokens, - extension, - timeout_height, - timeout_timestamp, - ), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `transferOwnership` (0xf2fde38b) function - pub fn transfer_ownership( - &self, - new_owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([242, 253, 227, 139], new_owner) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `updateMetadata` (0xec1bd897) function - pub fn update_metadata( - &self, - denom: ::ethers::core::types::Address, - new_name: ::std::string::String, - new_symbol: ::std::string::String, - new_decimals: u8, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [236, 27, 216, 151], - (denom, new_name, new_symbol, new_decimals), - ) - .expect("method not found (this should never happen)") - } - /// Calls the contract's `upgradeToAndCall` (0x4f1ef286) function - pub fn upgrade_to_and_call( - &self, - new_implementation: ::ethers::core::types::Address, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([79, 30, 242, 134], (new_implementation, data)) - .expect("method not found (this should never happen)") - } - /// Gets the contract's `DenomCreated` event - pub fn denom_created_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, DenomCreatedFilter> - { - self.0.event() - } - /// Gets the contract's `Initialized` event - pub fn initialized_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, InitializedFilter> - { - self.0.event() - } - /// Gets the contract's `OwnershipTransferred` event - pub fn ownership_transferred_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, OwnershipTransferredFilter> - { - self.0.event() - } - /// Gets the contract's `Paused` event - pub fn paused_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PausedFilter> { - self.0.event() - } - /// Gets the contract's `Received` event - pub fn received_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ReceivedFilter> { - self.0.event() - } - /// Gets the contract's `Refunded` event - pub fn refunded_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, RefundedFilter> { - self.0.event() - } - /// Gets the contract's `Sent` event - pub fn sent_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, SentFilter> { - self.0.event() - } - /// Gets the contract's `Unpaused` event - pub fn unpaused_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, UnpausedFilter> { - self.0.event() - } - /// Gets the contract's `Upgraded` event - pub fn upgraded_filter( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, UpgradedFilter> { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, UCS01RelayEvents> { - self.0 - .event_with_filter(::core::default::Default::default()) - } - } - #[cfg(feature = "providers")] - impl From<::ethers::contract::Contract> for UCS01Relay { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - /// Custom Error type `AddressEmptyCode` with signature `AddressEmptyCode(address)` and selector `0x9996b315` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "AddressEmptyCode", abi = "AddressEmptyCode(address)")] - pub struct AddressEmptyCode { - pub target: ::ethers::core::types::Address, - } - /// Custom Error type `AddressInsufficientBalance` with signature `AddressInsufficientBalance(address)` and selector `0xcd786059` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "AddressInsufficientBalance", - abi = "AddressInsufficientBalance(address)" - )] - pub struct AddressInsufficientBalance { - pub account: ::ethers::core::types::Address, - } - /// Custom Error type `ERC1967InvalidImplementation` with signature `ERC1967InvalidImplementation(address)` and selector `0x4c9c8ce3` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ERC1967InvalidImplementation", - abi = "ERC1967InvalidImplementation(address)" - )] - pub struct ERC1967InvalidImplementation { - pub implementation: ::ethers::core::types::Address, - } - /// Custom Error type `ERC1967NonPayable` with signature `ERC1967NonPayable()` and selector `0xb398979f` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ERC1967NonPayable", abi = "ERC1967NonPayable()")] - pub struct ERC1967NonPayable; - /// Custom Error type `EnforcedPause` with signature `EnforcedPause()` and selector `0xd93c0665` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "EnforcedPause", abi = "EnforcedPause()")] - pub struct EnforcedPause; - /// Custom Error type `ErrInvalidAcknowledgement` with signature `ErrInvalidAcknowledgement()` and selector `0x6ec7d33f` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidAcknowledgement", - abi = "ErrInvalidAcknowledgement()" - )] - pub struct ErrInvalidAcknowledgement; - /// Custom Error type `ErrInvalidAmount` with signature `ErrInvalidAmount()` and selector `0xb3726016` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidAmount", abi = "ErrInvalidAmount()")] - pub struct ErrInvalidAmount; - /// Custom Error type `ErrInvalidBytesAddress` with signature `ErrInvalidBytesAddress()` and selector `0x78718c3b` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidBytesAddress", abi = "ErrInvalidBytesAddress()")] - pub struct ErrInvalidBytesAddress; - /// Custom Error type `ErrInvalidCounterpartyProtocolVersion` with signature `ErrInvalidCounterpartyProtocolVersion()` and selector `0xbb928590` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidCounterpartyProtocolVersion", - abi = "ErrInvalidCounterpartyProtocolVersion()" - )] - pub struct ErrInvalidCounterpartyProtocolVersion; - /// Custom Error type `ErrInvalidHexAddress` with signature `ErrInvalidHexAddress()` and selector `0xfe6f1570` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrInvalidHexAddress", abi = "ErrInvalidHexAddress()")] - pub struct ErrInvalidHexAddress; - /// Custom Error type `ErrInvalidProtocolOrdering` with signature `ErrInvalidProtocolOrdering()` and selector `0xb8526e65` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidProtocolOrdering", - abi = "ErrInvalidProtocolOrdering()" - )] - pub struct ErrInvalidProtocolOrdering; - /// Custom Error type `ErrInvalidProtocolVersion` with signature `ErrInvalidProtocolVersion()` and selector `0x3d3f7720` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "ErrInvalidProtocolVersion", - abi = "ErrInvalidProtocolVersion()" - )] - pub struct ErrInvalidProtocolVersion; - /// Custom Error type `ErrNotIBC` with signature `ErrNotIBC()` and selector `0xe54f8f9d` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrNotIBC", abi = "ErrNotIBC()")] - pub struct ErrNotIBC; - /// Custom Error type `ErrUnauthorized` with signature `ErrUnauthorized()` and selector `0xcc12cef6` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrUnauthorized", abi = "ErrUnauthorized()")] - pub struct ErrUnauthorized; - /// Custom Error type `ErrUnstoppable` with signature `ErrUnstoppable()` and selector `0x0637c796` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ErrUnstoppable", abi = "ErrUnstoppable()")] - pub struct ErrUnstoppable; - /// Custom Error type `ExpectedPause` with signature `ExpectedPause()` and selector `0x8dfc202b` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "ExpectedPause", abi = "ExpectedPause()")] - pub struct ExpectedPause; - /// Custom Error type `FailedInnerCall` with signature `FailedInnerCall()` and selector `0x1425ea42` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "FailedInnerCall", abi = "FailedInnerCall()")] - pub struct FailedInnerCall; - /// Custom Error type `InvalidInitialization` with signature `InvalidInitialization()` and selector `0xf92ee8a9` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "InvalidInitialization", abi = "InvalidInitialization()")] - pub struct InvalidInitialization; - /// Custom Error type `NotInitializing` with signature `NotInitializing()` and selector `0xd7e6bcf8` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "NotInitializing", abi = "NotInitializing()")] - pub struct NotInitializing; - /// Custom Error type `OwnableInvalidOwner` with signature `OwnableInvalidOwner(address)` and selector `0x1e4fbdf7` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror(name = "OwnableInvalidOwner", abi = "OwnableInvalidOwner(address)")] - pub struct OwnableInvalidOwner { - pub owner: ::ethers::core::types::Address, - } - /// Custom Error type `OwnableUnauthorizedAccount` with signature `OwnableUnauthorizedAccount(address)` and selector `0x118cdaa7` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "OwnableUnauthorizedAccount", - abi = "OwnableUnauthorizedAccount(address)" - )] - pub struct OwnableUnauthorizedAccount { - pub account: ::ethers::core::types::Address, - } - /// Custom Error type `SafeERC20FailedOperation` with signature `SafeERC20FailedOperation(address)` and selector `0x5274afe7` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "SafeERC20FailedOperation", - abi = "SafeERC20FailedOperation(address)" - )] - pub struct SafeERC20FailedOperation { - pub token: ::ethers::core::types::Address, - } - /// Custom Error type `UUPSUnauthorizedCallContext` with signature `UUPSUnauthorizedCallContext()` and selector `0xe07c8dba` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "UUPSUnauthorizedCallContext", - abi = "UUPSUnauthorizedCallContext()" - )] - pub struct UUPSUnauthorizedCallContext; - /// Custom Error type `UUPSUnsupportedProxiableUUID` with signature `UUPSUnsupportedProxiableUUID(bytes32)` and selector `0xaa1d49a4` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[etherror( - name = "UUPSUnsupportedProxiableUUID", - abi = "UUPSUnsupportedProxiableUUID(bytes32)" - )] - pub struct UUPSUnsupportedProxiableUUID { - pub slot: [u8; 32], - } - /// Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum UCS01RelayErrors { - AddressEmptyCode(AddressEmptyCode), - AddressInsufficientBalance(AddressInsufficientBalance), - ERC1967InvalidImplementation(ERC1967InvalidImplementation), - ERC1967NonPayable(ERC1967NonPayable), - EnforcedPause(EnforcedPause), - ErrInvalidAcknowledgement(ErrInvalidAcknowledgement), - ErrInvalidAmount(ErrInvalidAmount), - ErrInvalidBytesAddress(ErrInvalidBytesAddress), - ErrInvalidCounterpartyProtocolVersion(ErrInvalidCounterpartyProtocolVersion), - ErrInvalidHexAddress(ErrInvalidHexAddress), - ErrInvalidProtocolOrdering(ErrInvalidProtocolOrdering), - ErrInvalidProtocolVersion(ErrInvalidProtocolVersion), - ErrNotIBC(ErrNotIBC), - ErrUnauthorized(ErrUnauthorized), - ErrUnstoppable(ErrUnstoppable), - ExpectedPause(ExpectedPause), - FailedInnerCall(FailedInnerCall), - InvalidInitialization(InvalidInitialization), - NotInitializing(NotInitializing), - OwnableInvalidOwner(OwnableInvalidOwner), - OwnableUnauthorizedAccount(OwnableUnauthorizedAccount), - SafeERC20FailedOperation(SafeERC20FailedOperation), - UUPSUnauthorizedCallContext(UUPSUnauthorizedCallContext), - UUPSUnsupportedProxiableUUID(UUPSUnsupportedProxiableUUID), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for UCS01RelayErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) - { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::AddressEmptyCode(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::AddressInsufficientBalance(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ERC1967InvalidImplementation(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ERC1967NonPayable(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::EnforcedPause(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidAcknowledgement(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ErrInvalidAmount(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidBytesAddress(decoded)); - } - if let Ok(decoded) = - ::decode( - data, - ) - { - return Ok(Self::ErrInvalidCounterpartyProtocolVersion(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidHexAddress(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidProtocolOrdering(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::ErrInvalidProtocolVersion(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ErrNotIBC(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ErrUnauthorized(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ErrUnstoppable(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::ExpectedPause(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::FailedInnerCall(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::InvalidInitialization(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::NotInitializing(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OwnableInvalidOwner(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OwnableUnauthorizedAccount(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::SafeERC20FailedOperation(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UUPSUnauthorizedCallContext(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UUPSUnsupportedProxiableUUID(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for UCS01RelayErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::AddressEmptyCode(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::AddressInsufficientBalance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ERC1967InvalidImplementation(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ERC1967NonPayable(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::EnforcedPause(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrInvalidAcknowledgement(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidAmount(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrInvalidBytesAddress(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidCounterpartyProtocolVersion(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidHexAddress(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidProtocolOrdering(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrInvalidProtocolVersion(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ErrNotIBC(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrUnauthorized(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ErrUnstoppable(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ExpectedPause(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::FailedInnerCall(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::InvalidInitialization(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NotInitializing(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OwnableInvalidOwner(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OwnableUnauthorizedAccount(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SafeERC20FailedOperation(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UUPSUnauthorizedCallContext(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UUPSUnsupportedProxiableUUID(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for UCS01RelayErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for UCS01RelayErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::AddressEmptyCode(element) => ::core::fmt::Display::fmt(element, f), - Self::AddressInsufficientBalance(element) => ::core::fmt::Display::fmt(element, f), - Self::ERC1967InvalidImplementation(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ERC1967NonPayable(element) => ::core::fmt::Display::fmt(element, f), - Self::EnforcedPause(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidAcknowledgement(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidAmount(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidBytesAddress(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidCounterpartyProtocolVersion(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ErrInvalidHexAddress(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidProtocolOrdering(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrInvalidProtocolVersion(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrNotIBC(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrUnauthorized(element) => ::core::fmt::Display::fmt(element, f), - Self::ErrUnstoppable(element) => ::core::fmt::Display::fmt(element, f), - Self::ExpectedPause(element) => ::core::fmt::Display::fmt(element, f), - Self::FailedInnerCall(element) => ::core::fmt::Display::fmt(element, f), - Self::InvalidInitialization(element) => ::core::fmt::Display::fmt(element, f), - Self::NotInitializing(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnableInvalidOwner(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnableUnauthorizedAccount(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeERC20FailedOperation(element) => ::core::fmt::Display::fmt(element, f), - Self::UUPSUnauthorizedCallContext(element) => ::core::fmt::Display::fmt(element, f), - Self::UUPSUnsupportedProxiableUUID(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for UCS01RelayErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: AddressEmptyCode) -> Self { - Self::AddressEmptyCode(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: AddressInsufficientBalance) -> Self { - Self::AddressInsufficientBalance(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ERC1967InvalidImplementation) -> Self { - Self::ERC1967InvalidImplementation(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ERC1967NonPayable) -> Self { - Self::ERC1967NonPayable(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: EnforcedPause) -> Self { - Self::EnforcedPause(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ErrInvalidAcknowledgement) -> Self { - Self::ErrInvalidAcknowledgement(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ErrInvalidAmount) -> Self { - Self::ErrInvalidAmount(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ErrInvalidBytesAddress) -> Self { - Self::ErrInvalidBytesAddress(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ErrInvalidCounterpartyProtocolVersion) -> Self { - Self::ErrInvalidCounterpartyProtocolVersion(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ErrInvalidHexAddress) -> Self { - Self::ErrInvalidHexAddress(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ErrInvalidProtocolOrdering) -> Self { - Self::ErrInvalidProtocolOrdering(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ErrInvalidProtocolVersion) -> Self { - Self::ErrInvalidProtocolVersion(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ErrNotIBC) -> Self { - Self::ErrNotIBC(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ErrUnauthorized) -> Self { - Self::ErrUnauthorized(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ErrUnstoppable) -> Self { - Self::ErrUnstoppable(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: ExpectedPause) -> Self { - Self::ExpectedPause(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: FailedInnerCall) -> Self { - Self::FailedInnerCall(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: InvalidInitialization) -> Self { - Self::InvalidInitialization(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: NotInitializing) -> Self { - Self::NotInitializing(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: OwnableInvalidOwner) -> Self { - Self::OwnableInvalidOwner(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: OwnableUnauthorizedAccount) -> Self { - Self::OwnableUnauthorizedAccount(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: SafeERC20FailedOperation) -> Self { - Self::SafeERC20FailedOperation(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: UUPSUnauthorizedCallContext) -> Self { - Self::UUPSUnauthorizedCallContext(value) - } - } - impl ::core::convert::From for UCS01RelayErrors { - fn from(value: UUPSUnsupportedProxiableUUID) -> Self { - Self::UUPSUnsupportedProxiableUUID(value) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent( - name = "DenomCreated", - abi = "DenomCreated(uint64,string,string,address)" - )] - pub struct DenomCreatedFilter { - #[ethevent(indexed)] - pub packet_sequence: u64, - pub channel_id: ::std::string::String, - pub denom: ::std::string::String, - pub token: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Initialized", abi = "Initialized(uint64)")] - pub struct InitializedFilter { - pub version: u64, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent( - name = "OwnershipTransferred", - abi = "OwnershipTransferred(address,address)" - )] - pub struct OwnershipTransferredFilter { - #[ethevent(indexed)] - pub previous_owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub new_owner: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Paused", abi = "Paused(address)")] - pub struct PausedFilter { - pub account: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent( - name = "Received", - abi = "Received(uint64,string,string,address,string,address,uint256)" - )] - pub struct ReceivedFilter { - pub packet_sequence: u64, - pub channel_id: ::std::string::String, - pub sender: ::std::string::String, - #[ethevent(indexed)] - pub receiver: ::ethers::core::types::Address, - pub denom: ::std::string::String, - #[ethevent(indexed)] - pub token: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent( - name = "Refunded", - abi = "Refunded(uint64,string,address,string,string,address,uint256)" - )] - pub struct RefundedFilter { - pub packet_sequence: u64, - pub channel_id: ::std::string::String, - #[ethevent(indexed)] - pub sender: ::ethers::core::types::Address, - pub receiver: ::std::string::String, - pub denom: ::std::string::String, - #[ethevent(indexed)] - pub token: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent( - name = "Sent", - abi = "Sent(uint64,string,address,string,string,address,uint256)" - )] - pub struct SentFilter { - pub packet_sequence: u64, - pub channel_id: ::std::string::String, - #[ethevent(indexed)] - pub sender: ::ethers::core::types::Address, - pub receiver: ::std::string::String, - pub denom: ::std::string::String, - #[ethevent(indexed)] - pub token: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Unpaused", abi = "Unpaused(address)")] - pub struct UnpausedFilter { - pub account: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethevent(name = "Upgraded", abi = "Upgraded(address)")] - pub struct UpgradedFilter { - #[ethevent(indexed)] - pub implementation: ::ethers::core::types::Address, - } - /// Container type for all of the contract's events - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum UCS01RelayEvents { - DenomCreatedFilter(DenomCreatedFilter), - InitializedFilter(InitializedFilter), - OwnershipTransferredFilter(OwnershipTransferredFilter), - PausedFilter(PausedFilter), - ReceivedFilter(ReceivedFilter), - RefundedFilter(RefundedFilter), - SentFilter(SentFilter), - UnpausedFilter(UnpausedFilter), - UpgradedFilter(UpgradedFilter), - } - impl ::ethers::contract::EthLogDecode for UCS01RelayEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = DenomCreatedFilter::decode_log(log) { - return Ok(UCS01RelayEvents::DenomCreatedFilter(decoded)); - } - if let Ok(decoded) = InitializedFilter::decode_log(log) { - return Ok(UCS01RelayEvents::InitializedFilter(decoded)); - } - if let Ok(decoded) = OwnershipTransferredFilter::decode_log(log) { - return Ok(UCS01RelayEvents::OwnershipTransferredFilter(decoded)); - } - if let Ok(decoded) = PausedFilter::decode_log(log) { - return Ok(UCS01RelayEvents::PausedFilter(decoded)); - } - if let Ok(decoded) = ReceivedFilter::decode_log(log) { - return Ok(UCS01RelayEvents::ReceivedFilter(decoded)); - } - if let Ok(decoded) = RefundedFilter::decode_log(log) { - return Ok(UCS01RelayEvents::RefundedFilter(decoded)); - } - if let Ok(decoded) = SentFilter::decode_log(log) { - return Ok(UCS01RelayEvents::SentFilter(decoded)); - } - if let Ok(decoded) = UnpausedFilter::decode_log(log) { - return Ok(UCS01RelayEvents::UnpausedFilter(decoded)); - } - if let Ok(decoded) = UpgradedFilter::decode_log(log) { - return Ok(UCS01RelayEvents::UpgradedFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for UCS01RelayEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::DenomCreatedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::InitializedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnershipTransferredFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::PausedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ReceivedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::RefundedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::SentFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::UnpausedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::UpgradedFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for UCS01RelayEvents { - fn from(value: DenomCreatedFilter) -> Self { - Self::DenomCreatedFilter(value) - } - } - impl ::core::convert::From for UCS01RelayEvents { - fn from(value: InitializedFilter) -> Self { - Self::InitializedFilter(value) - } - } - impl ::core::convert::From for UCS01RelayEvents { - fn from(value: OwnershipTransferredFilter) -> Self { - Self::OwnershipTransferredFilter(value) - } - } - impl ::core::convert::From for UCS01RelayEvents { - fn from(value: PausedFilter) -> Self { - Self::PausedFilter(value) - } - } - impl ::core::convert::From for UCS01RelayEvents { - fn from(value: ReceivedFilter) -> Self { - Self::ReceivedFilter(value) - } - } - impl ::core::convert::From for UCS01RelayEvents { - fn from(value: RefundedFilter) -> Self { - Self::RefundedFilter(value) - } - } - impl ::core::convert::From for UCS01RelayEvents { - fn from(value: SentFilter) -> Self { - Self::SentFilter(value) - } - } - impl ::core::convert::From for UCS01RelayEvents { - fn from(value: UnpausedFilter) -> Self { - Self::UnpausedFilter(value) - } - } - impl ::core::convert::From for UCS01RelayEvents { - fn from(value: UpgradedFilter) -> Self { - Self::UpgradedFilter(value) - } - } - /// Container type for all input parameters for the `UPGRADE_INTERFACE_VERSION` function with signature `UPGRADE_INTERFACE_VERSION()` and selector `0xad3cb1cc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "UPGRADE_INTERFACE_VERSION", - abi = "UPGRADE_INTERFACE_VERSION()" - )] - pub struct UpgradeInterfaceVersionCall; - /// Container type for all input parameters for the `getDenomAddress` function with signature `getDenomAddress(string,string)` and selector `0x3a74ce26` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getDenomAddress", abi = "getDenomAddress(string,string)")] - pub struct GetDenomAddressCall { - pub source_channel: ::std::string::String, - pub denom: ::std::string::String, - } - /// Container type for all input parameters for the `getOutstanding` function with signature `getOutstanding(string,address)` and selector `0x2b66b116` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "getOutstanding", abi = "getOutstanding(string,address)")] - pub struct GetOutstandingCall { - pub source_channel: ::std::string::String, - pub token: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `ibcAddress` function with signature `ibcAddress()` and selector `0x696a9bf4` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "ibcAddress", abi = "ibcAddress()")] - pub struct IbcAddressCall; - /// Container type for all input parameters for the `initialize` function with signature `initialize(address,address)` and selector `0x485cc955` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "initialize", abi = "initialize(address,address)")] - pub struct InitializeCall { - pub ibc_handler: ::ethers::core::types::Address, - pub admin: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `onAcknowledgementPacket` function with signature `onAcknowledgementPacket((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,address)` and selector `0xfb8b532e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "onAcknowledgementPacket", - abi = "onAcknowledgementPacket((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),bytes,address)" - )] - pub struct OnAcknowledgementPacketCall { - pub ibc_packet: IbcCoreChannelV1PacketData, - pub acknowledgement: ::ethers::core::types::Bytes, - pub p2: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `onChanCloseConfirm` function with signature `onChanCloseConfirm(string,string,address)` and selector `0x3f41c9ea` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "onChanCloseConfirm", - abi = "onChanCloseConfirm(string,string,address)" - )] - pub struct OnChanCloseConfirmCall( - pub ::std::string::String, - pub ::std::string::String, - pub ::ethers::core::types::Address, - ); - /// Container type for all input parameters for the `onChanCloseInit` function with signature `onChanCloseInit(string,string,address)` and selector `0x7538ed68` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "onChanCloseInit", - abi = "onChanCloseInit(string,string,address)" - )] - pub struct OnChanCloseInitCall( - pub ::std::string::String, - pub ::std::string::String, - pub ::ethers::core::types::Address, - ); - /// Container type for all input parameters for the `onChanOpenAck` function with signature `onChanOpenAck(string,string,string,string,address)` and selector `0x60ca56eb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "onChanOpenAck", - abi = "onChanOpenAck(string,string,string,string,address)" - )] - pub struct OnChanOpenAckCall { - pub p0: ::std::string::String, - pub p1: ::std::string::String, - pub p2: ::std::string::String, - pub counterparty_version: ::std::string::String, - pub relayer: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `onChanOpenConfirm` function with signature `onChanOpenConfirm(string,string,address)` and selector `0xf8288cc6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "onChanOpenConfirm", - abi = "onChanOpenConfirm(string,string,address)" - )] - pub struct OnChanOpenConfirmCall( - pub ::std::string::String, - pub ::std::string::String, - pub ::ethers::core::types::Address, - ); - /// Container type for all input parameters for the `onChanOpenInit` function with signature `onChanOpenInit(uint8,string[],string,string,(string,string),string,address)` and selector `0xf2f83f7a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "onChanOpenInit", - abi = "onChanOpenInit(uint8,string[],string,string,(string,string),string,address)" - )] - pub struct OnChanOpenInitCall { - pub order: u8, - pub p1: ::std::vec::Vec<::std::string::String>, - pub p2: ::std::string::String, - pub p3: ::std::string::String, - pub p4: IbcCoreChannelV1CounterpartyData, - pub version: ::std::string::String, - pub relayer: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `onChanOpenTry` function with signature `onChanOpenTry(uint8,string[],string,string,(string,string),string,string,address)` and selector `0x218d1e3e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "onChanOpenTry", - abi = "onChanOpenTry(uint8,string[],string,string,(string,string),string,string,address)" - )] - pub struct OnChanOpenTryCall { - pub order: u8, - pub p1: ::std::vec::Vec<::std::string::String>, - pub p2: ::std::string::String, - pub p3: ::std::string::String, - pub p4: IbcCoreChannelV1CounterpartyData, - pub version: ::std::string::String, - pub counterparty_version: ::std::string::String, - pub relayer: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `onRecvPacket` function with signature `onRecvPacket((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),address)` and selector `0x2301c6f5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "onRecvPacket", - abi = "onRecvPacket((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),address)" - )] - pub struct OnRecvPacketCall { - pub ibc_packet: IbcCoreChannelV1PacketData, - pub relayer: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `onRecvPacketProcessing` function with signature `onRecvPacketProcessing((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),address)` and selector `0xbd950f89` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "onRecvPacketProcessing", - abi = "onRecvPacketProcessing((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),address)" - )] - pub struct OnRecvPacketProcessingCall { - pub ibc_packet: IbcCoreChannelV1PacketData, - pub p1: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `onTimeoutPacket` function with signature `onTimeoutPacket((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),address)` and selector `0x52c7157d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "onTimeoutPacket", - abi = "onTimeoutPacket((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),address)" - )] - pub struct OnTimeoutPacketCall { - pub ibc_packet: IbcCoreChannelV1PacketData, - pub p1: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `owner` function with signature `owner()` and selector `0x8da5cb5b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "owner", abi = "owner()")] - pub struct OwnerCall; - /// Container type for all input parameters for the `paused` function with signature `paused()` and selector `0x5c975abb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "paused", abi = "paused()")] - pub struct PausedCall; - /// Container type for all input parameters for the `proxiableUUID` function with signature `proxiableUUID()` and selector `0x52d1902d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "proxiableUUID", abi = "proxiableUUID()")] - pub struct ProxiableUUIDCall; - /// Container type for all input parameters for the `renounceOwnership` function with signature `renounceOwnership()` and selector `0x715018a6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "renounceOwnership", abi = "renounceOwnership()")] - pub struct RenounceOwnershipCall; - /// Container type for all input parameters for the `send` function with signature `send(string,bytes,(address,uint128)[],string,(uint64,uint64),uint64)` and selector `0xa5b7e178` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "send", - abi = "send(string,bytes,(address,uint128)[],string,(uint64,uint64),uint64)" - )] - pub struct SendCall { - pub source_channel: ::std::string::String, - pub receiver: ::ethers::core::types::Bytes, - pub tokens: ::std::vec::Vec, - pub extension: ::std::string::String, - pub timeout_height: IbcCoreClientV1HeightData, - pub timeout_timestamp: u64, - } - /// Container type for all input parameters for the `transferOwnership` function with signature `transferOwnership(address)` and selector `0xf2fde38b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "transferOwnership", abi = "transferOwnership(address)")] - pub struct TransferOwnershipCall { - pub new_owner: ::ethers::core::types::Address, - } - /// Container type for all input parameters for the `updateMetadata` function with signature `updateMetadata(address,string,string,uint8)` and selector `0xec1bd897` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall( - name = "updateMetadata", - abi = "updateMetadata(address,string,string,uint8)" - )] - pub struct UpdateMetadataCall { - pub denom: ::ethers::core::types::Address, - pub new_name: ::std::string::String, - pub new_symbol: ::std::string::String, - pub new_decimals: u8, - } - /// Container type for all input parameters for the `upgradeToAndCall` function with signature `upgradeToAndCall(address,bytes)` and selector `0x4f1ef286` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - #[ethcall(name = "upgradeToAndCall", abi = "upgradeToAndCall(address,bytes)")] - pub struct UpgradeToAndCallCall { - pub new_implementation: ::ethers::core::types::Address, - pub data: ::ethers::core::types::Bytes, - } - /// Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum UCS01RelayCalls { - UpgradeInterfaceVersion(UpgradeInterfaceVersionCall), - GetDenomAddress(GetDenomAddressCall), - GetOutstanding(GetOutstandingCall), - IbcAddress(IbcAddressCall), - Initialize(InitializeCall), - OnAcknowledgementPacket(OnAcknowledgementPacketCall), - OnChanCloseConfirm(OnChanCloseConfirmCall), - OnChanCloseInit(OnChanCloseInitCall), - OnChanOpenAck(OnChanOpenAckCall), - OnChanOpenConfirm(OnChanOpenConfirmCall), - OnChanOpenInit(OnChanOpenInitCall), - OnChanOpenTry(OnChanOpenTryCall), - OnRecvPacket(OnRecvPacketCall), - OnRecvPacketProcessing(OnRecvPacketProcessingCall), - OnTimeoutPacket(OnTimeoutPacketCall), - Owner(OwnerCall), - Paused(PausedCall), - ProxiableUUID(ProxiableUUIDCall), - RenounceOwnership(RenounceOwnershipCall), - Send(SendCall), - TransferOwnership(TransferOwnershipCall), - UpdateMetadata(UpdateMetadataCall), - UpgradeToAndCall(UpgradeToAndCallCall), - } - impl ::ethers::core::abi::AbiDecode for UCS01RelayCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UpgradeInterfaceVersion(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetDenomAddress(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::GetOutstanding(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::IbcAddress(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Initialize(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OnAcknowledgementPacket(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OnChanCloseConfirm(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OnChanCloseInit(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::OnChanOpenAck(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OnChanOpenConfirm(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OnChanOpenInit(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::OnChanOpenTry(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::OnRecvPacket(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OnRecvPacketProcessing(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::OnTimeoutPacket(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Owner(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Paused(decoded)); - } - if let Ok(decoded) = ::decode(data) - { - return Ok(Self::ProxiableUUID(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::RenounceOwnership(decoded)); - } - if let Ok(decoded) = ::decode(data) { - return Ok(Self::Send(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::TransferOwnership(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UpdateMetadata(decoded)); - } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::UpgradeToAndCall(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for UCS01RelayCalls { - fn encode(self) -> Vec { - match self { - Self::UpgradeInterfaceVersion(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetDenomAddress(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::GetOutstanding(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::IbcAddress(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Initialize(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OnAcknowledgementPacket(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnChanCloseConfirm(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnChanCloseInit(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OnChanOpenAck(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OnChanOpenConfirm(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OnChanOpenInit(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OnChanOpenTry(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OnRecvPacket(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OnRecvPacketProcessing(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnTimeoutPacket(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Owner(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Paused(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ProxiableUUID(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::RenounceOwnership(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Send(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TransferOwnership(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::UpdateMetadata(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::UpgradeToAndCall(element) => ::ethers::core::abi::AbiEncode::encode(element), - } - } - } - impl ::core::fmt::Display for UCS01RelayCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::UpgradeInterfaceVersion(element) => ::core::fmt::Display::fmt(element, f), - Self::GetDenomAddress(element) => ::core::fmt::Display::fmt(element, f), - Self::GetOutstanding(element) => ::core::fmt::Display::fmt(element, f), - Self::IbcAddress(element) => ::core::fmt::Display::fmt(element, f), - Self::Initialize(element) => ::core::fmt::Display::fmt(element, f), - Self::OnAcknowledgementPacket(element) => ::core::fmt::Display::fmt(element, f), - Self::OnChanCloseConfirm(element) => ::core::fmt::Display::fmt(element, f), - Self::OnChanCloseInit(element) => ::core::fmt::Display::fmt(element, f), - Self::OnChanOpenAck(element) => ::core::fmt::Display::fmt(element, f), - Self::OnChanOpenConfirm(element) => ::core::fmt::Display::fmt(element, f), - Self::OnChanOpenInit(element) => ::core::fmt::Display::fmt(element, f), - Self::OnChanOpenTry(element) => ::core::fmt::Display::fmt(element, f), - Self::OnRecvPacket(element) => ::core::fmt::Display::fmt(element, f), - Self::OnRecvPacketProcessing(element) => ::core::fmt::Display::fmt(element, f), - Self::OnTimeoutPacket(element) => ::core::fmt::Display::fmt(element, f), - Self::Owner(element) => ::core::fmt::Display::fmt(element, f), - Self::Paused(element) => ::core::fmt::Display::fmt(element, f), - Self::ProxiableUUID(element) => ::core::fmt::Display::fmt(element, f), - Self::RenounceOwnership(element) => ::core::fmt::Display::fmt(element, f), - Self::Send(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferOwnership(element) => ::core::fmt::Display::fmt(element, f), - Self::UpdateMetadata(element) => ::core::fmt::Display::fmt(element, f), - Self::UpgradeToAndCall(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: UpgradeInterfaceVersionCall) -> Self { - Self::UpgradeInterfaceVersion(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: GetDenomAddressCall) -> Self { - Self::GetDenomAddress(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: GetOutstandingCall) -> Self { - Self::GetOutstanding(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: IbcAddressCall) -> Self { - Self::IbcAddress(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: InitializeCall) -> Self { - Self::Initialize(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OnAcknowledgementPacketCall) -> Self { - Self::OnAcknowledgementPacket(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OnChanCloseConfirmCall) -> Self { - Self::OnChanCloseConfirm(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OnChanCloseInitCall) -> Self { - Self::OnChanCloseInit(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OnChanOpenAckCall) -> Self { - Self::OnChanOpenAck(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OnChanOpenConfirmCall) -> Self { - Self::OnChanOpenConfirm(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OnChanOpenInitCall) -> Self { - Self::OnChanOpenInit(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OnChanOpenTryCall) -> Self { - Self::OnChanOpenTry(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OnRecvPacketCall) -> Self { - Self::OnRecvPacket(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OnRecvPacketProcessingCall) -> Self { - Self::OnRecvPacketProcessing(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OnTimeoutPacketCall) -> Self { - Self::OnTimeoutPacket(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: OwnerCall) -> Self { - Self::Owner(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: PausedCall) -> Self { - Self::Paused(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: ProxiableUUIDCall) -> Self { - Self::ProxiableUUID(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: RenounceOwnershipCall) -> Self { - Self::RenounceOwnership(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: SendCall) -> Self { - Self::Send(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: TransferOwnershipCall) -> Self { - Self::TransferOwnership(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: UpdateMetadataCall) -> Self { - Self::UpdateMetadata(value) - } - } - impl ::core::convert::From for UCS01RelayCalls { - fn from(value: UpgradeToAndCallCall) -> Self { - Self::UpgradeToAndCall(value) - } - } - /// Container type for all return fields from the `UPGRADE_INTERFACE_VERSION` function with signature `UPGRADE_INTERFACE_VERSION()` and selector `0xad3cb1cc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct UpgradeInterfaceVersionReturn(pub ::std::string::String); - /// Container type for all return fields from the `getDenomAddress` function with signature `getDenomAddress(string,string)` and selector `0x3a74ce26` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetDenomAddressReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `getOutstanding` function with signature `getOutstanding(string,address)` and selector `0x2b66b116` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct GetOutstandingReturn(pub ::ethers::core::types::U256); - /// Container type for all return fields from the `ibcAddress` function with signature `ibcAddress()` and selector `0x696a9bf4` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct IbcAddressReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `onRecvPacket` function with signature `onRecvPacket((uint64,string,string,string,string,bytes,(uint64,uint64),uint64),address)` and selector `0x2301c6f5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct OnRecvPacketReturn(pub ::ethers::core::types::Bytes); - /// Container type for all return fields from the `owner` function with signature `owner()` and selector `0x8da5cb5b` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct OwnerReturn(pub ::ethers::core::types::Address); - /// Container type for all return fields from the `paused` function with signature `paused()` and selector `0x5c975abb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct PausedReturn(pub bool); - /// Container type for all return fields from the `proxiableUUID` function with signature `proxiableUUID()` and selector `0x52d1902d` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct ProxiableUUIDReturn(pub [u8; 32]); - /// `LocalToken(address,uint128)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash, - )] - pub struct LocalToken { - pub denom: ::ethers::core::types::Address, - pub amount: u128, - } -} diff --git a/generated/rust/protos/Cargo.toml b/generated/rust/protos/Cargo.toml index cd87cafd8b..f8b7002baa 100644 --- a/generated/rust/protos/Cargo.toml +++ b/generated/rust/protos/Cargo.toml @@ -2,10 +2,6 @@ [dependencies.chrono] features = ["alloc"] workspace = true -[dependencies.ethers] -features = ["rustls"] -optional = true -workspace = true [dependencies.pbjson-types] git = "https://github.com/recoord/pbjson" rev = "2b7a8e4c2c83a40d04beed46aa26ab97a39a81fe" @@ -342,7 +338,7 @@ proto_full = [ ## @@protoc_insertion_point(features) client = ["tonic"] default = ["proto_full", "std"] -eth-abi = ["ethers", "std"] +eth-abi = ["std"] json-schema = ["schemars"] std = ["prost/std", "serde/std"] diff --git a/generated/rust/protos/src/cosmos.auth.v1beta1.rs b/generated/rust/protos/src/cosmos.auth.v1beta1.rs index e16a024ee1..321a805e54 100644 --- a/generated/rust/protos/src/cosmos.auth.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.auth.v1beta1.rs @@ -105,6 +105,44 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) } } +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/auth parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + } +} /// QueryAccountsRequest is the request type for the Query/Accounts RPC method. /// /// Since: cosmos-sdk 0.43 @@ -445,43 +483,5 @@ impl ::prost::Name for QueryAccountInfoResponse { ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) } } -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/auth parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} include!("cosmos.auth.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.auth.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.auth.v1beta1.tonic.rs index c121cb1825..6b4d204d59 100644 --- a/generated/rust/protos/src/cosmos.auth.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.auth.v1beta1.tonic.rs @@ -1,6 +1,108 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::{http::Uri, *}; + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.auth.v1beta1.Msg/UpdateParams"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.auth.v1beta1.Msg", "UpdateParams")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated client implementations. +#[cfg(feature = "client")] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; @@ -290,105 +392,3 @@ pub mod query_client { } } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::{http::Uri, *}; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - >>::Error: - Into + Send + Sync, - { - MsgClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn update_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.auth.v1beta1.Msg/UpdateParams"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.auth.v1beta1.Msg", "UpdateParams")); - self.inner.unary(req, path, codec).await - } - } -} diff --git a/generated/rust/protos/src/cosmos.authz.v1beta1.rs b/generated/rust/protos/src/cosmos.authz.v1beta1.rs index 70ec9fc76b..df8eebf92b 100644 --- a/generated/rust/protos/src/cosmos.authz.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.authz.v1beta1.rs @@ -71,57 +71,110 @@ impl ::prost::Name for GrantQueueItem { ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) } } -/// EventGrant is emitted on Msg/Grant +/// GenesisState defines the authz module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventGrant { - /// Msg type URL for which an autorization is granted - #[prost(string, tag = "2")] - pub msg_type_url: ::prost::alloc::string::String, - /// Granter account address - #[prost(string, tag = "3")] +pub struct GenesisState { + #[prost(message, repeated, tag = "1")] + pub authorization: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; + const PACKAGE: &'static str = "cosmos.authz.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) + } +} +/// MsgGrant is a request type for Grant method. It declares authorization to the grantee +/// on behalf of the granter with the provided expiration time. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgGrant { + #[prost(string, tag = "1")] pub granter: ::prost::alloc::string::String, - /// Grantee account address - #[prost(string, tag = "4")] + #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub grant: ::core::option::Option, } -impl ::prost::Name for EventGrant { - const NAME: &'static str = "EventGrant"; +impl ::prost::Name for MsgGrant { + const NAME: &'static str = "MsgGrant"; const PACKAGE: &'static str = "cosmos.authz.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) } } -/// EventRevoke is emitted on Msg/Revoke +/// MsgGrantResponse defines the Msg/MsgGrant response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventRevoke { - /// Msg type URL for which an autorization is revoked - #[prost(string, tag = "2")] - pub msg_type_url: ::prost::alloc::string::String, - /// Granter account address - #[prost(string, tag = "3")] - pub granter: ::prost::alloc::string::String, - /// Grantee account address - #[prost(string, tag = "4")] +pub struct MsgGrantResponse {} +impl ::prost::Name for MsgGrantResponse { + const NAME: &'static str = "MsgGrantResponse"; + const PACKAGE: &'static str = "cosmos.authz.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) + } +} +/// MsgExec attempts to execute the provided messages using +/// authorizations granted to the grantee. Each message should have only +/// one signer corresponding to the granter of the authorization. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgExec { + #[prost(string, tag = "1")] pub grantee: ::prost::alloc::string::String, + /// Execute Msg. + /// The x/authz will try to find a grant matching (msg.signers\[0\], grantee, MsgTypeURL(msg)) + /// triple and validate it. + #[prost(message, repeated, tag = "2")] + pub msgs: ::prost::alloc::vec::Vec<::pbjson_types::Any>, } -impl ::prost::Name for EventRevoke { - const NAME: &'static str = "EventRevoke"; +impl ::prost::Name for MsgExec { + const NAME: &'static str = "MsgExec"; const PACKAGE: &'static str = "cosmos.authz.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) } } -/// GenesisState defines the authz module's genesis state. +/// MsgExecResponse defines the Msg/MsgExecResponse response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(message, repeated, tag = "1")] - pub authorization: ::prost::alloc::vec::Vec, +pub struct MsgExecResponse { + #[prost(bytes = "vec", repeated, tag = "1")] + pub results: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; +impl ::prost::Name for MsgExecResponse { + const NAME: &'static str = "MsgExecResponse"; + const PACKAGE: &'static str = "cosmos.authz.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) + } +} +/// MsgRevoke revokes any authorization with the provided sdk.Msg type on the +/// granter's account with that has been granted to the grantee. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRevoke { + #[prost(string, tag = "1")] + pub granter: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub grantee: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub msg_type_url: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgRevoke { + const NAME: &'static str = "MsgRevoke"; + const PACKAGE: &'static str = "cosmos.authz.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) + } +} +/// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRevokeResponse {} +impl ::prost::Name for MsgRevokeResponse { + const NAME: &'static str = "MsgRevokeResponse"; const PACKAGE: &'static str = "cosmos.authz.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) @@ -237,96 +290,43 @@ impl ::prost::Name for QueryGranteeGrantsResponse { ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) } } -/// MsgGrant is a request type for Grant method. It declares authorization to the grantee -/// on behalf of the granter with the provided expiration time. +/// EventGrant is emitted on Msg/Grant #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgGrant { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, +pub struct EventGrant { + /// Msg type URL for which an autorization is granted #[prost(string, tag = "2")] + pub msg_type_url: ::prost::alloc::string::String, + /// Granter account address + #[prost(string, tag = "3")] + pub granter: ::prost::alloc::string::String, + /// Grantee account address + #[prost(string, tag = "4")] pub grantee: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub grant: ::core::option::Option, -} -impl ::prost::Name for MsgGrant { - const NAME: &'static str = "MsgGrant"; - const PACKAGE: &'static str = "cosmos.authz.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) - } -} -/// MsgGrantResponse defines the Msg/MsgGrant response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgGrantResponse {} -impl ::prost::Name for MsgGrantResponse { - const NAME: &'static str = "MsgGrantResponse"; - const PACKAGE: &'static str = "cosmos.authz.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) - } -} -/// MsgExec attempts to execute the provided messages using -/// authorizations granted to the grantee. Each message should have only -/// one signer corresponding to the granter of the authorization. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExec { - #[prost(string, tag = "1")] - pub grantee: ::prost::alloc::string::String, - /// Execute Msg. - /// The x/authz will try to find a grant matching (msg.signers\[0\], grantee, MsgTypeURL(msg)) - /// triple and validate it. - #[prost(message, repeated, tag = "2")] - pub msgs: ::prost::alloc::vec::Vec<::pbjson_types::Any>, -} -impl ::prost::Name for MsgExec { - const NAME: &'static str = "MsgExec"; - const PACKAGE: &'static str = "cosmos.authz.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) - } -} -/// MsgExecResponse defines the Msg/MsgExecResponse response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecResponse { - #[prost(bytes = "vec", repeated, tag = "1")] - pub results: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } -impl ::prost::Name for MsgExecResponse { - const NAME: &'static str = "MsgExecResponse"; +impl ::prost::Name for EventGrant { + const NAME: &'static str = "EventGrant"; const PACKAGE: &'static str = "cosmos.authz.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) } } -/// MsgRevoke revokes any authorization with the provided sdk.Msg type on the -/// granter's account with that has been granted to the grantee. +/// EventRevoke is emitted on Msg/Revoke #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRevoke { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, +pub struct EventRevoke { + /// Msg type URL for which an autorization is revoked #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - #[prost(string, tag = "3")] pub msg_type_url: ::prost::alloc::string::String, + /// Granter account address + #[prost(string, tag = "3")] + pub granter: ::prost::alloc::string::String, + /// Grantee account address + #[prost(string, tag = "4")] + pub grantee: ::prost::alloc::string::String, } -impl ::prost::Name for MsgRevoke { - const NAME: &'static str = "MsgRevoke"; - const PACKAGE: &'static str = "cosmos.authz.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) - } -} -/// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRevokeResponse {} -impl ::prost::Name for MsgRevokeResponse { - const NAME: &'static str = "MsgRevokeResponse"; +impl ::prost::Name for EventRevoke { + const NAME: &'static str = "EventRevoke"; const PACKAGE: &'static str = "cosmos.authz.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.authz.v1beta1.{}", Self::NAME) diff --git a/generated/rust/protos/src/cosmos.authz.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.authz.v1beta1.tonic.rs index ed599d84b7..90ab0bd630 100644 --- a/generated/rust/protos/src/cosmos.authz.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.authz.v1beta1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,11 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn grants( + pub async fn grant( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -95,17 +91,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Query/Grants"); + let path = http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Msg/Grant"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.authz.v1beta1.Query", "Grants")); + .insert(GrpcMethod::new("cosmos.authz.v1beta1.Msg", "Grant")); self.inner.unary(req, path, codec).await } - pub async fn granter_grants( + pub async fn exec( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -113,20 +108,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Query/GranterGrants"); + let path = http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Msg/Exec"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.authz.v1beta1.Query", - "GranterGrants", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.authz.v1beta1.Msg", "Exec")); self.inner.unary(req, path, codec).await } - pub async fn grantee_grants( + pub async fn revoke( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -134,27 +125,24 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Query/GranteeGrants"); + let path = http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Msg/Revoke"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.authz.v1beta1.Query", - "GranteeGrants", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.authz.v1beta1.Msg", "Revoke")); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -165,7 +153,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -180,7 +168,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -193,7 +184,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -226,10 +217,11 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn grant( + pub async fn grants( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -237,16 +229,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Msg/Grant"); + let path = http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Query/Grants"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.authz.v1beta1.Msg", "Grant")); + .insert(GrpcMethod::new("cosmos.authz.v1beta1.Query", "Grants")); self.inner.unary(req, path, codec).await } - pub async fn exec( + pub async fn granter_grants( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -254,16 +247,20 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Msg/Exec"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Query/GranterGrants"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.authz.v1beta1.Msg", "Exec")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.authz.v1beta1.Query", + "GranterGrants", + )); self.inner.unary(req, path, codec).await } - pub async fn revoke( + pub async fn grantee_grants( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -271,10 +268,13 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Msg/Revoke"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.authz.v1beta1.Query/GranteeGrants"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.authz.v1beta1.Msg", "Revoke")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.authz.v1beta1.Query", + "GranteeGrants", + )); self.inner.unary(req, path, codec).await } } diff --git a/generated/rust/protos/src/cosmos.bank.v1beta1.rs b/generated/rust/protos/src/cosmos.bank.v1beta1.rs index 3cadd86b3f..73619c98b0 100644 --- a/generated/rust/protos/src/cosmos.bank.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.bank.v1beta1.rs @@ -1,28 +1,4 @@ // @generated -/// SendAuthorization allows the grantee to spend up to spend_limit coins from -/// the granter's account. -/// -/// Since: cosmos-sdk 0.43 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SendAuthorization { - #[prost(message, repeated, tag = "1")] - pub spend_limit: ::prost::alloc::vec::Vec, - /// allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the - /// granter. If omitted, any recipient is allowed. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, repeated, tag = "2")] - pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for SendAuthorization { - const NAME: &'static str = "SendAuthorization"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} /// Params defines the parameters for the bank module. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -190,6 +166,30 @@ impl ::prost::Name for Metadata { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } +/// SendAuthorization allows the grantee to spend up to spend_limit coins from +/// the granter's account. +/// +/// Since: cosmos-sdk 0.43 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendAuthorization { + #[prost(message, repeated, tag = "1")] + pub spend_limit: ::prost::alloc::vec::Vec, + /// allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the + /// granter. If omitted, any recipient is allowed. + /// + /// Since: cosmos-sdk 0.47 + #[prost(string, repeated, tag = "2")] + pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for SendAuthorization { + const NAME: &'static str = "SendAuthorization"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} /// GenesisState defines the bank module's genesis state. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -241,6 +241,151 @@ impl ::prost::Name for Balance { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } +/// MsgSend represents a message to send coins from one account to another. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSend { + #[prost(string, tag = "1")] + pub from_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub to_address: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub amount: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgSend { + const NAME: &'static str = "MsgSend"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgSendResponse defines the Msg/Send response type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSendResponse {} +impl ::prost::Name for MsgSendResponse { + const NAME: &'static str = "MsgSendResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgMultiSend represents an arbitrary multi-in, multi-out send message. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgMultiSend { + /// Inputs, despite being `repeated`, only allows one sender input. This is + /// checked in MsgMultiSend's ValidateBasic. + #[prost(message, repeated, tag = "1")] + pub inputs: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "2")] + pub outputs: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgMultiSend { + const NAME: &'static str = "MsgMultiSend"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgMultiSendResponse defines the Msg/MultiSend response type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgMultiSendResponse {} +impl ::prost::Name for MsgMultiSendResponse { + const NAME: &'static str = "MsgMultiSendResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/bank parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgSetSendEnabled is the Msg/SetSendEnabled request type. +/// +/// Only entries to add/update/delete need to be included. +/// Existing SendEnabled entries that are not included in this +/// message are left unchanged. +/// +/// Since: cosmos-sdk 0.47 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSetSendEnabled { + /// authority is the address that controls the module. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// send_enabled is the list of entries to add or update. + #[prost(message, repeated, tag = "2")] + pub send_enabled: ::prost::alloc::vec::Vec, + /// use_default_for is a list of denoms that should use the params.default_send_enabled value. + /// Denoms listed here will have their SendEnabled entries deleted. + /// If a denom is included that doesn't have a SendEnabled entry, + /// it will be ignored. + #[prost(string, repeated, tag = "3")] + pub use_default_for: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for MsgSetSendEnabled { + const NAME: &'static str = "MsgSetSendEnabled"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. +/// +/// Since: cosmos-sdk 0.47 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSetSendEnabledResponse {} +impl ::prost::Name for MsgSetSendEnabledResponse { + const NAME: &'static str = "MsgSetSendEnabledResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} /// QueryBalanceRequest is the request type for the Query/Balance RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -759,150 +904,5 @@ impl ::prost::Name for QuerySendEnabledResponse { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// MsgSend represents a message to send coins from one account to another. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSend { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub to_address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgSend { - const NAME: &'static str = "MsgSend"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgSendResponse defines the Msg/Send response type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSendResponse {} -impl ::prost::Name for MsgSendResponse { - const NAME: &'static str = "MsgSendResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgMultiSend represents an arbitrary multi-in, multi-out send message. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMultiSend { - /// Inputs, despite being `repeated`, only allows one sender input. This is - /// checked in MsgMultiSend's ValidateBasic. - #[prost(message, repeated, tag = "1")] - pub inputs: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub outputs: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgMultiSend { - const NAME: &'static str = "MsgMultiSend"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgMultiSendResponse defines the Msg/MultiSend response type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMultiSendResponse {} -impl ::prost::Name for MsgMultiSendResponse { - const NAME: &'static str = "MsgMultiSendResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/bank parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgSetSendEnabled is the Msg/SetSendEnabled request type. -/// -/// Only entries to add/update/delete need to be included. -/// Existing SendEnabled entries that are not included in this -/// message are left unchanged. -/// -/// Since: cosmos-sdk 0.47 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSetSendEnabled { - /// authority is the address that controls the module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// send_enabled is the list of entries to add or update. - #[prost(message, repeated, tag = "2")] - pub send_enabled: ::prost::alloc::vec::Vec, - /// use_default_for is a list of denoms that should use the params.default_send_enabled value. - /// Denoms listed here will have their SendEnabled entries deleted. - /// If a denom is included that doesn't have a SendEnabled entry, - /// it will be ignored. - #[prost(string, repeated, tag = "3")] - pub use_default_for: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for MsgSetSendEnabled { - const NAME: &'static str = "MsgSetSendEnabled"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. -/// -/// Since: cosmos-sdk 0.47 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSetSendEnabledResponse {} -impl ::prost::Name for MsgSetSendEnabledResponse { - const NAME: &'static str = "MsgSetSendEnabledResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} include!("cosmos.bank.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.bank.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.bank.v1beta1.tonic.rs index ca4e419335..a6d4f81c00 100644 --- a/generated/rust/protos/src/cosmos.bank.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.bank.v1beta1.tonic.rs @@ -1,6 +1,162 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::{http::Uri, *}; + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn send( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cosmos.bank.v1beta1.Msg/Send"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "Send")); + self.inner.unary(req, path, codec).await + } + pub async fn multi_send( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cosmos.bank.v1beta1.Msg/MultiSend"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "MultiSend")); + self.inner.unary(req, path, codec).await + } + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.bank.v1beta1.Msg/UpdateParams"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "UpdateParams")); + self.inner.unary(req, path, codec).await + } + pub async fn set_send_enabled( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.bank.v1beta1.Msg/SetSendEnabled"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "SetSendEnabled")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated client implementations. +#[cfg(feature = "client")] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; @@ -353,159 +509,3 @@ pub mod query_client { } } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::{http::Uri, *}; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - >>::Error: - Into + Send + Sync, - { - MsgClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn send( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.bank.v1beta1.Msg/Send"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "Send")); - self.inner.unary(req, path, codec).await - } - pub async fn multi_send( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.bank.v1beta1.Msg/MultiSend"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "MultiSend")); - self.inner.unary(req, path, codec).await - } - pub async fn update_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.bank.v1beta1.Msg/UpdateParams"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "UpdateParams")); - self.inner.unary(req, path, codec).await - } - pub async fn set_send_enabled( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.bank.v1beta1.Msg/SetSendEnabled"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "SetSendEnabled")); - self.inner.unary(req, path, codec).await - } - } -} diff --git a/generated/rust/protos/src/cosmos.base.abci.v1beta1.rs b/generated/rust/protos/src/cosmos.base.abci.v1beta1.rs index 6479f2747f..3a1ddeced1 100644 --- a/generated/rust/protos/src/cosmos.base.abci.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.base.abci.v1beta1.rs @@ -145,10 +145,10 @@ pub struct Result { /// Log contains the log information from message or handler execution. #[prost(string, tag = "2")] pub log: ::prost::alloc::string::String, - // /// Events contains a slice of Event objects that were emitted during message - // /// or handler execution. - // #[prost(message, repeated, tag = "3")] - // pub events: ::prost::alloc::vec::Vec, + /// Events contains a slice of Event objects that were emitted during message + /// or handler execution. + #[prost(message, repeated, tag = "3")] + pub events: ::prost::alloc::vec::Vec, /// msg_responses contains the Msg handler responses type packed in Anys. /// /// Since: cosmos-sdk 0.46 diff --git a/generated/rust/protos/src/cosmos.circuit.v1.rs b/generated/rust/protos/src/cosmos.circuit.v1.rs index 8b3f3e9f52..0ab09578f2 100644 --- a/generated/rust/protos/src/cosmos.circuit.v1.rs +++ b/generated/rust/protos/src/cosmos.circuit.v1.rs @@ -98,91 +98,6 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) } } -/// QueryAccountRequest is the request type for the Query/Account RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountRequest { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryAccountRequest { - const NAME: &'static str = "QueryAccountRequest"; - const PACKAGE: &'static str = "cosmos.circuit.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) - } -} -/// AccountResponse is the response type for the Query/Account RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccountResponse { - #[prost(message, optional, tag = "1")] - pub permission: ::core::option::Option, -} -impl ::prost::Name for AccountResponse { - const NAME: &'static str = "AccountResponse"; - const PACKAGE: &'static str = "cosmos.circuit.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) - } -} -/// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryAccountsRequest { - const NAME: &'static str = "QueryAccountsRequest"; - const PACKAGE: &'static str = "cosmos.circuit.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) - } -} -/// AccountsResponse is the response type for the Query/Accounts RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccountsResponse { - #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for AccountsResponse { - const NAME: &'static str = "AccountsResponse"; - const PACKAGE: &'static str = "cosmos.circuit.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) - } -} -/// QueryDisableListRequest is the request type for the Query/DisabledList RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDisabledListRequest {} -impl ::prost::Name for QueryDisabledListRequest { - const NAME: &'static str = "QueryDisabledListRequest"; - const PACKAGE: &'static str = "cosmos.circuit.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) - } -} -/// DisabledListResponse is the response type for the Query/DisabledList RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DisabledListResponse { - #[prost(string, repeated, tag = "1")] - pub disabled_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for DisabledListResponse { - const NAME: &'static str = "DisabledListResponse"; - const PACKAGE: &'static str = "cosmos.circuit.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) - } -} /// MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -291,5 +206,90 @@ impl ::prost::Name for MsgResetCircuitBreakerResponse { ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) } } +/// QueryAccountRequest is the request type for the Query/Account RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAccountRequest { + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryAccountRequest { + const NAME: &'static str = "QueryAccountRequest"; + const PACKAGE: &'static str = "cosmos.circuit.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) + } +} +/// AccountResponse is the response type for the Query/Account RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AccountResponse { + #[prost(message, optional, tag = "1")] + pub permission: ::core::option::Option, +} +impl ::prost::Name for AccountResponse { + const NAME: &'static str = "AccountResponse"; + const PACKAGE: &'static str = "cosmos.circuit.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) + } +} +/// QueryAccountsRequest is the request type for the Query/Accounts RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAccountsRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryAccountsRequest { + const NAME: &'static str = "QueryAccountsRequest"; + const PACKAGE: &'static str = "cosmos.circuit.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) + } +} +/// AccountsResponse is the response type for the Query/Accounts RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AccountsResponse { + #[prost(message, repeated, tag = "1")] + pub accounts: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for AccountsResponse { + const NAME: &'static str = "AccountsResponse"; + const PACKAGE: &'static str = "cosmos.circuit.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) + } +} +/// QueryDisableListRequest is the request type for the Query/DisabledList RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDisabledListRequest {} +impl ::prost::Name for QueryDisabledListRequest { + const NAME: &'static str = "QueryDisabledListRequest"; + const PACKAGE: &'static str = "cosmos.circuit.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) + } +} +/// DisabledListResponse is the response type for the Query/DisabledList RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisabledListResponse { + #[prost(string, repeated, tag = "1")] + pub disabled_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for DisabledListResponse { + const NAME: &'static str = "DisabledListResponse"; + const PACKAGE: &'static str = "cosmos.circuit.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.circuit.v1.{}", Self::NAME) + } +} include!("cosmos.circuit.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.circuit.v1.tonic.rs b/generated/rust/protos/src/cosmos.circuit.v1.tonic.rs index 307b158df3..da7deb1b74 100644 --- a/generated/rust/protos/src/cosmos.circuit.v1.tonic.rs +++ b/generated/rust/protos/src/cosmos.circuit.v1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,10 +80,13 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn account( + pub async fn authorize_circuit_breaker( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -94,16 +94,21 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.circuit.v1.Query/Account"); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.circuit.v1.Msg/AuthorizeCircuitBreaker", + ); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.circuit.v1.Query", "Account")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.circuit.v1.Msg", + "AuthorizeCircuitBreaker", + )); self.inner.unary(req, path, codec).await } - pub async fn accounts( + pub async fn trip_circuit_breaker( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -111,17 +116,22 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.circuit.v1.Query/Accounts"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.circuit.v1.Msg/TripCircuitBreaker"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.circuit.v1.Query", "Accounts")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.circuit.v1.Msg", + "TripCircuitBreaker", + )); self.inner.unary(req, path, codec).await } - pub async fn disabled_list( + pub async fn reset_circuit_breaker( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -130,24 +140,26 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.circuit.v1.Query/DisabledList"); + http::uri::PathAndQuery::from_static("/cosmos.circuit.v1.Msg/ResetCircuitBreaker"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.circuit.v1.Query", "DisabledList")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.circuit.v1.Msg", + "ResetCircuitBreaker", + )); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -158,7 +170,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -173,7 +185,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -186,7 +201,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -219,13 +234,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn authorize_circuit_breaker( + pub async fn account( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -233,21 +245,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.circuit.v1.Msg/AuthorizeCircuitBreaker", - ); + let path = http::uri::PathAndQuery::from_static("/cosmos.circuit.v1.Query/Account"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.circuit.v1.Msg", - "AuthorizeCircuitBreaker", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.circuit.v1.Query", "Account")); self.inner.unary(req, path, codec).await } - pub async fn trip_circuit_breaker( + pub async fn accounts( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -255,22 +262,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.circuit.v1.Msg/TripCircuitBreaker"); + let path = http::uri::PathAndQuery::from_static("/cosmos.circuit.v1.Query/Accounts"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.circuit.v1.Msg", - "TripCircuitBreaker", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.circuit.v1.Query", "Accounts")); self.inner.unary(req, path, codec).await } - pub async fn reset_circuit_breaker( + pub async fn disabled_list( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -279,12 +281,10 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.circuit.v1.Msg/ResetCircuitBreaker"); + http::uri::PathAndQuery::from_static("/cosmos.circuit.v1.Query/DisabledList"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.circuit.v1.Msg", - "ResetCircuitBreaker", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.circuit.v1.Query", "DisabledList")); self.inner.unary(req, path, codec).await } } diff --git a/generated/rust/protos/src/cosmos.consensus.v1.rs b/generated/rust/protos/src/cosmos.consensus.v1.rs index 6b24987a66..0da9f77b1c 100644 --- a/generated/rust/protos/src/cosmos.consensus.v1.rs +++ b/generated/rust/protos/src/cosmos.consensus.v1.rs @@ -1,32 +1,4 @@ // @generated -/// QueryParamsRequest defines the request type for querying x/consensus parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; - const PACKAGE: &'static str = "cosmos.consensus.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.consensus.v1.{}", Self::NAME) - } -} -/// QueryParamsResponse defines the response type for querying x/consensus parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params are the tendermint consensus params stored in the consensus module. - /// Please note that `params.version` is not populated in this response, it is - /// tracked separately in the x/upgrade module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; - const PACKAGE: &'static str = "cosmos.consensus.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.consensus.v1.{}", Self::NAME) - } -} /// MsgUpdateParams is the Msg/UpdateParams request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -68,5 +40,33 @@ impl ::prost::Name for MsgUpdateParamsResponse { ::prost::alloc::format!("cosmos.consensus.v1.{}", Self::NAME) } } +/// QueryParamsRequest defines the request type for querying x/consensus parameters. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; + const PACKAGE: &'static str = "cosmos.consensus.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.consensus.v1.{}", Self::NAME) + } +} +/// QueryParamsResponse defines the response type for querying x/consensus parameters. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsResponse { + /// params are the tendermint consensus params stored in the consensus module. + /// Please note that `params.version` is not populated in this response, it is + /// tracked separately in the x/upgrade module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; + const PACKAGE: &'static str = "cosmos.consensus.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.consensus.v1.{}", Self::NAME) + } +} include!("cosmos.consensus.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.consensus.v1.tonic.rs b/generated/rust/protos/src/cosmos.consensus.v1.tonic.rs index 6c74a7e7dc..9dceb03783 100644 --- a/generated/rust/protos/src/cosmos.consensus.v1.tonic.rs +++ b/generated/rust/protos/src/cosmos.consensus.v1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,10 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn params( + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -95,24 +92,25 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.consensus.v1.Query/Params"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.consensus.v1.Msg/UpdateParams"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.consensus.v1.Query", "Params")); + .insert(GrpcMethod::new("cosmos.consensus.v1.Msg", "UpdateParams")); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -123,7 +121,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -138,7 +136,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -151,7 +152,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -184,10 +185,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn update_params( + pub async fn params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -196,11 +197,10 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.consensus.v1.Msg/UpdateParams"); + let path = http::uri::PathAndQuery::from_static("/cosmos.consensus.v1.Query/Params"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.consensus.v1.Msg", "UpdateParams")); + .insert(GrpcMethod::new("cosmos.consensus.v1.Query", "Params")); self.inner.unary(req, path, codec).await } } diff --git a/generated/rust/protos/src/cosmos.distribution.v1beta1.rs b/generated/rust/protos/src/cosmos.distribution.v1beta1.rs index 4a7160a38d..b4953b7687 100644 --- a/generated/rust/protos/src/cosmos.distribution.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.distribution.v1beta1.rs @@ -422,6 +422,235 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) } } +/// MsgSetWithdrawAddress sets the withdraw address for +/// a delegator (or validator self-delegation). +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSetWithdrawAddress { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub withdraw_address: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgSetWithdrawAddress { + const NAME: &'static str = "MsgSetWithdrawAddress"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response +/// type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSetWithdrawAddressResponse {} +impl ::prost::Name for MsgSetWithdrawAddressResponse { + const NAME: &'static str = "MsgSetWithdrawAddressResponse"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator +/// from a single validator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgWithdrawDelegatorReward { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgWithdrawDelegatorReward { + const NAME: &'static str = "MsgWithdrawDelegatorReward"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward +/// response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgWithdrawDelegatorRewardResponse { + /// Since: cosmos-sdk 0.46 + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgWithdrawDelegatorRewardResponse { + const NAME: &'static str = "MsgWithdrawDelegatorRewardResponse"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgWithdrawValidatorCommission withdraws the full commission to the validator +/// address. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgWithdrawValidatorCommission { + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgWithdrawValidatorCommission { + const NAME: &'static str = "MsgWithdrawValidatorCommission"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgWithdrawValidatorCommissionResponse defines the +/// Msg/WithdrawValidatorCommission response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgWithdrawValidatorCommissionResponse { + /// Since: cosmos-sdk 0.46 + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgWithdrawValidatorCommissionResponse { + const NAME: &'static str = "MsgWithdrawValidatorCommissionResponse"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgFundCommunityPool allows an account to directly +/// fund the community pool. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgFundCommunityPool { + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub depositor: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgFundCommunityPool { + const NAME: &'static str = "MsgFundCommunityPool"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgFundCommunityPoolResponse {} +impl ::prost::Name for MsgFundCommunityPoolResponse { + const NAME: &'static str = "MsgFundCommunityPoolResponse"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/distribution parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgCommunityPoolSpend defines a message for sending tokens from the community +/// pool to another account. This message is typically executed via a governance +/// proposal with the governance module being the executing authority. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgCommunityPoolSpend { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub recipient: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub amount: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgCommunityPoolSpend { + const NAME: &'static str = "MsgCommunityPoolSpend"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgCommunityPoolSpendResponse defines the response to executing a +/// MsgCommunityPoolSpend message. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgCommunityPoolSpendResponse {} +impl ::prost::Name for MsgCommunityPoolSpendResponse { + const NAME: &'static str = "MsgCommunityPoolSpendResponse"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// DepositValidatorRewardsPool defines the request structure to provide +/// additional rewards to delegators from a specific validator. +/// +/// Since: cosmos-sdk 0.50 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgDepositValidatorRewardsPool { + #[prost(string, tag = "1")] + pub depositor: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub amount: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgDepositValidatorRewardsPool { + const NAME: &'static str = "MsgDepositValidatorRewardsPool"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} +/// MsgDepositValidatorRewardsPoolResponse defines the response to executing a +/// MsgDepositValidatorRewardsPool message. +/// +/// Since: cosmos-sdk 0.50 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgDepositValidatorRewardsPoolResponse {} +impl ::prost::Name for MsgDepositValidatorRewardsPoolResponse { + const NAME: &'static str = "MsgDepositValidatorRewardsPoolResponse"; + const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) + } +} /// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -753,234 +982,5 @@ impl ::prost::Name for QueryCommunityPoolResponse { ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) } } -/// MsgSetWithdrawAddress sets the withdraw address for -/// a delegator (or validator self-delegation). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSetWithdrawAddress { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub withdraw_address: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgSetWithdrawAddress { - const NAME: &'static str = "MsgSetWithdrawAddress"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response -/// type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSetWithdrawAddressResponse {} -impl ::prost::Name for MsgSetWithdrawAddressResponse { - const NAME: &'static str = "MsgSetWithdrawAddressResponse"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator -/// from a single validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawDelegatorReward { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgWithdrawDelegatorReward { - const NAME: &'static str = "MsgWithdrawDelegatorReward"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward -/// response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawDelegatorRewardResponse { - /// Since: cosmos-sdk 0.46 - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgWithdrawDelegatorRewardResponse { - const NAME: &'static str = "MsgWithdrawDelegatorRewardResponse"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgWithdrawValidatorCommission withdraws the full commission to the validator -/// address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawValidatorCommission { - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgWithdrawValidatorCommission { - const NAME: &'static str = "MsgWithdrawValidatorCommission"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgWithdrawValidatorCommissionResponse defines the -/// Msg/WithdrawValidatorCommission response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawValidatorCommissionResponse { - /// Since: cosmos-sdk 0.46 - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgWithdrawValidatorCommissionResponse { - const NAME: &'static str = "MsgWithdrawValidatorCommissionResponse"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgFundCommunityPool allows an account to directly -/// fund the community pool. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgFundCommunityPool { - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgFundCommunityPool { - const NAME: &'static str = "MsgFundCommunityPool"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgFundCommunityPoolResponse {} -impl ::prost::Name for MsgFundCommunityPoolResponse { - const NAME: &'static str = "MsgFundCommunityPoolResponse"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/distribution parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgCommunityPoolSpend defines a message for sending tokens from the community -/// pool to another account. This message is typically executed via a governance -/// proposal with the governance module being the executing authority. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCommunityPoolSpend { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub recipient: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgCommunityPoolSpend { - const NAME: &'static str = "MsgCommunityPoolSpend"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgCommunityPoolSpendResponse defines the response to executing a -/// MsgCommunityPoolSpend message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCommunityPoolSpendResponse {} -impl ::prost::Name for MsgCommunityPoolSpendResponse { - const NAME: &'static str = "MsgCommunityPoolSpendResponse"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// DepositValidatorRewardsPool defines the request structure to provide -/// additional rewards to delegators from a specific validator. -/// -/// Since: cosmos-sdk 0.50 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDepositValidatorRewardsPool { - #[prost(string, tag = "1")] - pub depositor: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgDepositValidatorRewardsPool { - const NAME: &'static str = "MsgDepositValidatorRewardsPool"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} -/// MsgDepositValidatorRewardsPoolResponse defines the response to executing a -/// MsgDepositValidatorRewardsPool message. -/// -/// Since: cosmos-sdk 0.50 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDepositValidatorRewardsPoolResponse {} -impl ::prost::Name for MsgDepositValidatorRewardsPoolResponse { - const NAME: &'static str = "MsgDepositValidatorRewardsPoolResponse"; - const PACKAGE: &'static str = "cosmos.distribution.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.distribution.v1beta1.{}", Self::NAME) - } -} include!("cosmos.distribution.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.distribution.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.distribution.v1beta1.tonic.rs index a849195700..508597fba1 100644 --- a/generated/rust/protos/src/cosmos.distribution.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.distribution.v1beta1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,34 +80,11 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn params( + pub async fn set_withdraw_address( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.distribution.v1beta1.Query/Params"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Query", - "Params", - )); - self.inner.unary(req, path, codec).await - } - pub async fn validator_distribution_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -119,20 +93,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", + "/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Query", - "ValidatorDistributionInfo", + "cosmos.distribution.v1beta1.Msg", + "SetWithdrawAddress", )); self.inner.unary(req, path, codec).await } - pub async fn validator_outstanding_rewards( + pub async fn withdraw_delegator_reward( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -143,20 +117,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", + "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Query", - "ValidatorOutstandingRewards", + "cosmos.distribution.v1beta1.Msg", + "WithdrawDelegatorReward", )); self.inner.unary(req, path, codec).await } - pub async fn validator_commission( + pub async fn withdraw_validator_commission( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -167,19 +141,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Query/ValidatorCommission", + "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Query", - "ValidatorCommission", + "cosmos.distribution.v1beta1.Msg", + "WithdrawValidatorCommission", )); self.inner.unary(req, path, codec).await } - pub async fn validator_slashes( + pub async fn fund_community_pool( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -189,46 +163,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Query", - "ValidatorSlashes", - )); - self.inner.unary(req, path, codec).await - } - pub async fn delegation_rewards( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Query/DelegationRewards", + "/cosmos.distribution.v1beta1.Msg/FundCommunityPool", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Query", - "DelegationRewards", + "cosmos.distribution.v1beta1.Msg", + "FundCommunityPool", )); self.inner.unary(req, path, codec).await } - pub async fn delegation_total_rewards( + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -237,22 +185,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", + "/cosmos.distribution.v1beta1.Msg/UpdateParams", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Query", - "DelegationTotalRewards", + "cosmos.distribution.v1beta1.Msg", + "UpdateParams", )); self.inner.unary(req, path, codec).await } - pub async fn delegator_validators( + pub async fn community_pool_spend( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -261,20 +207,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Query/DelegatorValidators", + "/cosmos.distribution.v1beta1.Msg/CommunityPoolSpend", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Query", - "DelegatorValidators", + "cosmos.distribution.v1beta1.Msg", + "CommunityPoolSpend", )); self.inner.unary(req, path, codec).await } - pub async fn delegator_withdraw_address( + pub async fn deposit_validator_rewards_pool( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -285,34 +231,12 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Query", - "DelegatorWithdrawAddress", - )); - self.inner.unary(req, path, codec).await - } - pub async fn community_pool( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Query/CommunityPool", + "/cosmos.distribution.v1beta1.Msg/DepositValidatorRewardsPool", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Query", - "CommunityPool", + "cosmos.distribution.v1beta1.Msg", + "DepositValidatorRewardsPool", )); self.inner.unary(req, path, codec).await } @@ -320,14 +244,14 @@ pub mod query_client { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -338,7 +262,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -353,7 +277,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -366,7 +293,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -399,11 +326,34 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn set_withdraw_address( + pub async fn params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.distribution.v1beta1.Query/Params"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.distribution.v1beta1.Query", + "Params", + )); + self.inner.unary(req, path, codec).await + } + pub async fn validator_distribution_info( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -412,20 +362,20 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress", + "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Msg", - "SetWithdrawAddress", + "cosmos.distribution.v1beta1.Query", + "ValidatorDistributionInfo", )); self.inner.unary(req, path, codec).await } - pub async fn withdraw_delegator_reward( + pub async fn validator_outstanding_rewards( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -436,20 +386,20 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward", + "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Msg", - "WithdrawDelegatorReward", + "cosmos.distribution.v1beta1.Query", + "ValidatorOutstandingRewards", )); self.inner.unary(req, path, codec).await } - pub async fn withdraw_validator_commission( + pub async fn validator_commission( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -460,19 +410,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission", + "/cosmos.distribution.v1beta1.Query/ValidatorCommission", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Msg", - "WithdrawValidatorCommission", + "cosmos.distribution.v1beta1.Query", + "ValidatorCommission", )); self.inner.unary(req, path, codec).await } - pub async fn fund_community_pool( + pub async fn validator_slashes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -482,20 +432,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Msg/FundCommunityPool", + "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Msg", - "FundCommunityPool", + "cosmos.distribution.v1beta1.Query", + "ValidatorSlashes", )); self.inner.unary(req, path, codec).await } - pub async fn update_params( + pub async fn delegation_rewards( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -504,20 +456,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Msg/UpdateParams", + "/cosmos.distribution.v1beta1.Query/DelegationRewards", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Msg", - "UpdateParams", + "cosmos.distribution.v1beta1.Query", + "DelegationRewards", )); self.inner.unary(req, path, codec).await } - pub async fn community_pool_spend( + pub async fn delegation_total_rewards( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -526,20 +480,20 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Msg/CommunityPoolSpend", + "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Msg", - "CommunityPoolSpend", + "cosmos.distribution.v1beta1.Query", + "DelegationTotalRewards", )); self.inner.unary(req, path, codec).await } - pub async fn deposit_validator_rewards_pool( + pub async fn delegator_validators( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -550,12 +504,58 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.distribution.v1beta1.Msg/DepositValidatorRewardsPool", + "/cosmos.distribution.v1beta1.Query/DelegatorValidators", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.distribution.v1beta1.Msg", - "DepositValidatorRewardsPool", + "cosmos.distribution.v1beta1.Query", + "DelegatorValidators", + )); + self.inner.unary(req, path, codec).await + } + pub async fn delegator_withdraw_address( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.distribution.v1beta1.Query", + "DelegatorWithdrawAddress", + )); + self.inner.unary(req, path, codec).await + } + pub async fn community_pool( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.distribution.v1beta1.Query/CommunityPool", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.distribution.v1beta1.Query", + "CommunityPool", )); self.inner.unary(req, path, codec).await } diff --git a/generated/rust/protos/src/cosmos.evidence.v1beta1.rs b/generated/rust/protos/src/cosmos.evidence.v1beta1.rs index 419329ed37..286b89f88b 100644 --- a/generated/rust/protos/src/cosmos.evidence.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.evidence.v1beta1.rs @@ -39,6 +39,40 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("cosmos.evidence.v1beta1.{}", Self::NAME) } } +/// MsgSubmitEvidence represents a message that supports submitting arbitrary +/// Evidence of misbehavior such as equivocation or counterfactual signing. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSubmitEvidence { + /// submitter is the signer account address of evidence. + #[prost(string, tag = "1")] + pub submitter: ::prost::alloc::string::String, + /// evidence defines the evidence of misbehavior. + #[prost(message, optional, tag = "2")] + pub evidence: ::core::option::Option<::pbjson_types::Any>, +} +impl ::prost::Name for MsgSubmitEvidence { + const NAME: &'static str = "MsgSubmitEvidence"; + const PACKAGE: &'static str = "cosmos.evidence.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.evidence.v1beta1.{}", Self::NAME) + } +} +/// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSubmitEvidenceResponse { + /// hash defines the hash of the evidence. + #[prost(bytes = "vec", tag = "4")] + pub hash: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgSubmitEvidenceResponse { + const NAME: &'static str = "MsgSubmitEvidenceResponse"; + const PACKAGE: &'static str = "cosmos.evidence.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.evidence.v1beta1.{}", Self::NAME) + } +} /// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -111,39 +145,5 @@ impl ::prost::Name for QueryAllEvidenceResponse { ::prost::alloc::format!("cosmos.evidence.v1beta1.{}", Self::NAME) } } -/// MsgSubmitEvidence represents a message that supports submitting arbitrary -/// Evidence of misbehavior such as equivocation or counterfactual signing. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitEvidence { - /// submitter is the signer account address of evidence. - #[prost(string, tag = "1")] - pub submitter: ::prost::alloc::string::String, - /// evidence defines the evidence of misbehavior. - #[prost(message, optional, tag = "2")] - pub evidence: ::core::option::Option<::pbjson_types::Any>, -} -impl ::prost::Name for MsgSubmitEvidence { - const NAME: &'static str = "MsgSubmitEvidence"; - const PACKAGE: &'static str = "cosmos.evidence.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.evidence.v1beta1.{}", Self::NAME) - } -} -/// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitEvidenceResponse { - /// hash defines the hash of the evidence. - #[prost(bytes = "vec", tag = "4")] - pub hash: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgSubmitEvidenceResponse { - const NAME: &'static str = "MsgSubmitEvidenceResponse"; - const PACKAGE: &'static str = "cosmos.evidence.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.evidence.v1beta1.{}", Self::NAME) - } -} include!("cosmos.evidence.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.evidence.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.evidence.v1beta1.tonic.rs index 01f4bd4045..4db76bd506 100644 --- a/generated/rust/protos/src/cosmos.evidence.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.evidence.v1beta1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,29 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn evidence( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.evidence.v1beta1.Query/Evidence"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.evidence.v1beta1.Query", "Evidence")); - self.inner.unary(req, path, codec).await - } - pub async fn all_evidence( + pub async fn submit_evidence( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -115,11 +93,11 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.evidence.v1beta1.Query/AllEvidence"); + http::uri::PathAndQuery::from_static("/cosmos.evidence.v1beta1.Msg/SubmitEvidence"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.evidence.v1beta1.Query", - "AllEvidence", + "cosmos.evidence.v1beta1.Msg", + "SubmitEvidence", )); self.inner.unary(req, path, codec).await } @@ -127,14 +105,14 @@ pub mod query_client { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -145,7 +123,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -160,7 +138,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -173,7 +154,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -206,10 +187,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn submit_evidence( + pub async fn evidence( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -219,11 +200,30 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.evidence.v1beta1.Msg/SubmitEvidence"); + http::uri::PathAndQuery::from_static("/cosmos.evidence.v1beta1.Query/Evidence"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.evidence.v1beta1.Query", "Evidence")); + self.inner.unary(req, path, codec).await + } + pub async fn all_evidence( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.evidence.v1beta1.Query/AllEvidence"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.evidence.v1beta1.Msg", - "SubmitEvidence", + "cosmos.evidence.v1beta1.Query", + "AllEvidence", )); self.inner.unary(req, path, codec).await } diff --git a/generated/rust/protos/src/cosmos.feegrant.v1beta1.rs b/generated/rust/protos/src/cosmos.feegrant.v1beta1.rs index b427eb0f6e..e6da729645 100644 --- a/generated/rust/protos/src/cosmos.feegrant.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.feegrant.v1beta1.rs @@ -105,200 +105,200 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. +/// MsgGrantAllowance adds permission for Grantee to spend up to Allowance +/// of fees from the account of Granter. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowanceRequest { +pub struct MsgGrantAllowance { /// granter is the address of the user granting an allowance of their funds. #[prost(string, tag = "1")] pub granter: ::prost::alloc::string::String, /// grantee is the address of the user being granted an allowance of another user's funds. #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, + /// allowance can be any of basic, periodic, allowed fee allowance. + #[prost(message, optional, tag = "3")] + pub allowance: ::core::option::Option<::pbjson_types::Any>, } -impl ::prost::Name for QueryAllowanceRequest { - const NAME: &'static str = "QueryAllowanceRequest"; +impl ::prost::Name for MsgGrantAllowance { + const NAME: &'static str = "MsgGrantAllowance"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. +/// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowanceResponse { - /// allowance is a allowance granted for grantee by granter. - #[prost(message, optional, tag = "1")] - pub allowance: ::core::option::Option, -} -impl ::prost::Name for QueryAllowanceResponse { - const NAME: &'static str = "QueryAllowanceResponse"; +pub struct MsgGrantAllowanceResponse {} +impl ::prost::Name for MsgGrantAllowanceResponse { + const NAME: &'static str = "MsgGrantAllowanceResponse"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. +/// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowancesRequest { +pub struct MsgRevokeAllowance { + /// granter is the address of the user granting an allowance of their funds. #[prost(string, tag = "1")] + pub granter: ::prost::alloc::string::String, + /// grantee is the address of the user being granted an allowance of another user's funds. + #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, } -impl ::prost::Name for QueryAllowancesRequest { - const NAME: &'static str = "QueryAllowancesRequest"; +impl ::prost::Name for MsgRevokeAllowance { + const NAME: &'static str = "MsgRevokeAllowance"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. +/// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowancesResponse { - /// allowances are allowance's granted for grantee by granter. - #[prost(message, repeated, tag = "1")] - pub allowances: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryAllowancesResponse { - const NAME: &'static str = "QueryAllowancesResponse"; +pub struct MsgRevokeAllowanceResponse {} +impl ::prost::Name for MsgRevokeAllowanceResponse { + const NAME: &'static str = "MsgRevokeAllowanceResponse"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. +/// MsgPruneAllowances prunes expired fee allowances. /// -/// Since: cosmos-sdk 0.46 +/// Since cosmos-sdk 0.50 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowancesByGranterRequest { +pub struct MsgPruneAllowances { + /// pruner is the address of the user pruning expired allowances. #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, + pub pruner: ::prost::alloc::string::String, } -impl ::prost::Name for QueryAllowancesByGranterRequest { - const NAME: &'static str = "QueryAllowancesByGranterRequest"; +impl ::prost::Name for MsgPruneAllowances { + const NAME: &'static str = "MsgPruneAllowances"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. +/// MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. /// -/// Since: cosmos-sdk 0.46 +/// Since cosmos-sdk 0.50 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowancesByGranterResponse { - /// allowances that have been issued by the granter. - #[prost(message, repeated, tag = "1")] - pub allowances: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryAllowancesByGranterResponse { - const NAME: &'static str = "QueryAllowancesByGranterResponse"; +pub struct MsgPruneAllowancesResponse {} +impl ::prost::Name for MsgPruneAllowancesResponse { + const NAME: &'static str = "MsgPruneAllowancesResponse"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// MsgGrantAllowance adds permission for Grantee to spend up to Allowance -/// of fees from the account of Granter. +/// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgGrantAllowance { +pub struct QueryAllowanceRequest { /// granter is the address of the user granting an allowance of their funds. #[prost(string, tag = "1")] pub granter: ::prost::alloc::string::String, /// grantee is the address of the user being granted an allowance of another user's funds. #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, - /// allowance can be any of basic, periodic, allowed fee allowance. - #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option<::pbjson_types::Any>, } -impl ::prost::Name for MsgGrantAllowance { - const NAME: &'static str = "MsgGrantAllowance"; +impl ::prost::Name for QueryAllowanceRequest { + const NAME: &'static str = "QueryAllowanceRequest"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. +/// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgGrantAllowanceResponse {} -impl ::prost::Name for MsgGrantAllowanceResponse { - const NAME: &'static str = "MsgGrantAllowanceResponse"; +pub struct QueryAllowanceResponse { + /// allowance is a allowance granted for grantee by granter. + #[prost(message, optional, tag = "1")] + pub allowance: ::core::option::Option, +} +impl ::prost::Name for QueryAllowanceResponse { + const NAME: &'static str = "QueryAllowanceResponse"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. +/// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRevokeAllowance { - /// granter is the address of the user granting an allowance of their funds. +pub struct QueryAllowancesRequest { #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// grantee is the address of the user being granted an allowance of another user's funds. - #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, + /// pagination defines an pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgRevokeAllowance { - const NAME: &'static str = "MsgRevokeAllowance"; +impl ::prost::Name for QueryAllowancesRequest { + const NAME: &'static str = "QueryAllowancesRequest"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. +/// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRevokeAllowanceResponse {} -impl ::prost::Name for MsgRevokeAllowanceResponse { - const NAME: &'static str = "MsgRevokeAllowanceResponse"; +pub struct QueryAllowancesResponse { + /// allowances are allowance's granted for grantee by granter. + #[prost(message, repeated, tag = "1")] + pub allowances: ::prost::alloc::vec::Vec, + /// pagination defines an pagination for the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryAllowancesResponse { + const NAME: &'static str = "QueryAllowancesResponse"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// MsgPruneAllowances prunes expired fee allowances. +/// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. /// -/// Since cosmos-sdk 0.50 +/// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPruneAllowances { - /// pruner is the address of the user pruning expired allowances. +pub struct QueryAllowancesByGranterRequest { #[prost(string, tag = "1")] - pub pruner: ::prost::alloc::string::String, + pub granter: ::prost::alloc::string::String, + /// pagination defines an pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgPruneAllowances { - const NAME: &'static str = "MsgPruneAllowances"; +impl ::prost::Name for QueryAllowancesByGranterRequest { + const NAME: &'static str = "QueryAllowancesByGranterRequest"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) } } -/// MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. +/// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. /// -/// Since cosmos-sdk 0.50 +/// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPruneAllowancesResponse {} -impl ::prost::Name for MsgPruneAllowancesResponse { - const NAME: &'static str = "MsgPruneAllowancesResponse"; +pub struct QueryAllowancesByGranterResponse { + /// allowances that have been issued by the granter. + #[prost(message, repeated, tag = "1")] + pub allowances: ::prost::alloc::vec::Vec, + /// pagination defines an pagination for the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryAllowancesByGranterResponse { + const NAME: &'static str = "QueryAllowancesByGranterResponse"; const PACKAGE: &'static str = "cosmos.feegrant.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.feegrant.v1beta1.{}", Self::NAME) diff --git a/generated/rust/protos/src/cosmos.feegrant.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.feegrant.v1beta1.tonic.rs index 4c457aaed5..9d93670a55 100644 --- a/generated/rust/protos/src/cosmos.feegrant.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.feegrant.v1beta1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,10 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn allowance( + pub async fn grant_allowance( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -96,18 +93,18 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Query/Allowance"); + http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Msg/GrantAllowance"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.feegrant.v1beta1.Query", - "Allowance", + "cosmos.feegrant.v1beta1.Msg", + "GrantAllowance", )); self.inner.unary(req, path, codec).await } - pub async fn allowances( + pub async fn revoke_allowance( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -116,22 +113,21 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Query/Allowances"); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance", + ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.feegrant.v1beta1.Query", - "Allowances", + "cosmos.feegrant.v1beta1.Msg", + "RevokeAllowance", )); self.inner.unary(req, path, codec).await } - pub async fn allowances_by_granter( + pub async fn prune_allowances( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -140,12 +136,12 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter", + "/cosmos.feegrant.v1beta1.Msg/PruneAllowances", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.feegrant.v1beta1.Query", - "AllowancesByGranter", + "cosmos.feegrant.v1beta1.Msg", + "PruneAllowances", )); self.inner.unary(req, path, codec).await } @@ -153,14 +149,14 @@ pub mod query_client { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -171,7 +167,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -186,7 +182,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -199,7 +198,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -232,10 +231,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn grant_allowance( + pub async fn allowance( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -245,18 +244,18 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Msg/GrantAllowance"); + http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Query/Allowance"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.feegrant.v1beta1.Msg", - "GrantAllowance", + "cosmos.feegrant.v1beta1.Query", + "Allowance", )); self.inner.unary(req, path, codec).await } - pub async fn revoke_allowance( + pub async fn allowances( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -265,21 +264,22 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance", - ); + let path = + http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Query/Allowances"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.feegrant.v1beta1.Msg", - "RevokeAllowance", + "cosmos.feegrant.v1beta1.Query", + "Allowances", )); self.inner.unary(req, path, codec).await } - pub async fn prune_allowances( + pub async fn allowances_by_granter( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -288,12 +288,12 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.feegrant.v1beta1.Msg/PruneAllowances", + "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.feegrant.v1beta1.Msg", - "PruneAllowances", + "cosmos.feegrant.v1beta1.Query", + "AllowancesByGranter", )); self.inner.unary(req, path, codec).await } diff --git a/generated/rust/protos/src/cosmos.gov.v1.rs b/generated/rust/protos/src/cosmos.gov.v1.rs index 27467af8ff..a77153d123 100644 --- a/generated/rust/protos/src/cosmos.gov.v1.rs +++ b/generated/rust/protos/src/cosmos.gov.v1.rs @@ -438,582 +438,582 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryConstitutionRequest is the request type for the Query/Constitution RPC method +/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary +/// proposal Content. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConstitutionRequest {} -impl ::prost::Name for QueryConstitutionRequest { - const NAME: &'static str = "QueryConstitutionRequest"; +pub struct MsgSubmitProposal { + /// messages are the arbitrary messages to be executed if proposal passes. + #[prost(message, repeated, tag = "1")] + pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + /// initial_deposit is the deposit value that must be paid at proposal submission. + #[prost(message, repeated, tag = "2")] + pub initial_deposit: ::prost::alloc::vec::Vec, + /// proposer is the account address of the proposer. + #[prost(string, tag = "3")] + pub proposer: ::prost::alloc::string::String, + /// metadata is any arbitrary metadata attached to the proposal. + #[prost(string, tag = "4")] + pub metadata: ::prost::alloc::string::String, + /// title is the title of the proposal. + /// + /// Since: cosmos-sdk 0.47 + #[prost(string, tag = "5")] + pub title: ::prost::alloc::string::String, + /// summary is the summary of the proposal + /// + /// Since: cosmos-sdk 0.47 + #[prost(string, tag = "6")] + pub summary: ::prost::alloc::string::String, + /// expedited defines if the proposal is expedited or not + /// + /// Since: cosmos-sdk 0.50 + #[prost(bool, tag = "7")] + pub expedited: bool, +} +impl ::prost::Name for MsgSubmitProposal { + const NAME: &'static str = "MsgSubmitProposal"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryConstitutionResponse is the response type for the Query/Constitution RPC method +/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConstitutionResponse { - #[prost(string, tag = "1")] - pub constitution: ::prost::alloc::string::String, +pub struct MsgSubmitProposalResponse { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, } -impl ::prost::Name for QueryConstitutionResponse { - const NAME: &'static str = "QueryConstitutionResponse"; +impl ::prost::Name for MsgSubmitProposalResponse { + const NAME: &'static str = "MsgSubmitProposalResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryProposalRequest is the request type for the Query/Proposal RPC method. +/// MsgExecLegacyContent is used to wrap the legacy content field into a message. +/// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, +pub struct MsgExecLegacyContent { + /// content is the proposal's content. + #[prost(message, optional, tag = "1")] + pub content: ::core::option::Option<::pbjson_types::Any>, + /// authority must be the gov module address. + #[prost(string, tag = "2")] + pub authority: ::prost::alloc::string::String, } -impl ::prost::Name for QueryProposalRequest { - const NAME: &'static str = "QueryProposalRequest"; +impl ::prost::Name for MsgExecLegacyContent { + const NAME: &'static str = "MsgExecLegacyContent"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryProposalResponse is the response type for the Query/Proposal RPC method. +/// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalResponse { - /// proposal is the requested governance proposal. - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -impl ::prost::Name for QueryProposalResponse { - const NAME: &'static str = "QueryProposalResponse"; +pub struct MsgExecLegacyContentResponse {} +impl ::prost::Name for MsgExecLegacyContentResponse { + const NAME: &'static str = "MsgExecLegacyContentResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. +/// MsgVote defines a message to cast a vote. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsRequest { - /// proposal_status defines the status of the proposals. - #[prost(enumeration = "ProposalStatus", tag = "1")] - pub proposal_status: i32, - /// voter defines the voter address for the proposals. +pub struct MsgVote { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// voter is the voter address for the proposal. #[prost(string, tag = "2")] pub voter: ::prost::alloc::string::String, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "3")] - pub depositor: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option, + /// option defines the vote option. + #[prost(enumeration = "VoteOption", tag = "3")] + pub option: i32, + /// metadata is any arbitrary metadata attached to the Vote. + #[prost(string, tag = "4")] + pub metadata: ::prost::alloc::string::String, } -impl ::prost::Name for QueryProposalsRequest { - const NAME: &'static str = "QueryProposalsRequest"; +impl ::prost::Name for MsgVote { + const NAME: &'static str = "MsgVote"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryProposalsResponse is the response type for the Query/Proposals RPC -/// method. +/// MsgVoteResponse defines the Msg/Vote response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsResponse { - /// proposals defines all the requested governance proposals. - #[prost(message, repeated, tag = "1")] - pub proposals: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryProposalsResponse { - const NAME: &'static str = "QueryProposalsResponse"; +pub struct MsgVoteResponse {} +impl ::prost::Name for MsgVoteResponse { + const NAME: &'static str = "MsgVoteResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryVoteRequest is the request type for the Query/Vote RPC method. +/// MsgVoteWeighted defines a message to cast a vote. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteRequest { +pub struct MsgVoteWeighted { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// voter defines the voter address for the proposals. + /// voter is the voter address for the proposal. #[prost(string, tag = "2")] pub voter: ::prost::alloc::string::String, + /// options defines the weighted vote options. + #[prost(message, repeated, tag = "3")] + pub options: ::prost::alloc::vec::Vec, + /// metadata is any arbitrary metadata attached to the VoteWeighted. + #[prost(string, tag = "4")] + pub metadata: ::prost::alloc::string::String, } -impl ::prost::Name for QueryVoteRequest { - const NAME: &'static str = "QueryVoteRequest"; +impl ::prost::Name for MsgVoteWeighted { + const NAME: &'static str = "MsgVoteWeighted"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryVoteResponse is the response type for the Query/Vote RPC method. +/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteResponse { - /// vote defines the queried vote. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -impl ::prost::Name for QueryVoteResponse { - const NAME: &'static str = "QueryVoteResponse"; +pub struct MsgVoteWeightedResponse {} +impl ::prost::Name for MsgVoteWeightedResponse { + const NAME: &'static str = "MsgVoteWeightedResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryVotesRequest is the request type for the Query/Votes RPC method. +/// MsgDeposit defines a message to submit a deposit to an existing proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesRequest { +pub struct MsgDeposit { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, + /// depositor defines the deposit addresses from the proposals. + #[prost(string, tag = "2")] + pub depositor: ::prost::alloc::string::String, + /// amount to be deposited by depositor. + #[prost(message, repeated, tag = "3")] + pub amount: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryVotesRequest { - const NAME: &'static str = "QueryVotesRequest"; +impl ::prost::Name for MsgDeposit { + const NAME: &'static str = "MsgDeposit"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryVotesResponse is the response type for the Query/Votes RPC method. +/// MsgDepositResponse defines the Msg/Deposit response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesResponse { - /// votes defines the queried votes. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryVotesResponse { - const NAME: &'static str = "QueryVotesResponse"; +pub struct MsgDepositResponse {} +impl ::prost::Name for MsgDepositResponse { + const NAME: &'static str = "MsgDepositResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryParamsRequest is the request type for the Query/Params RPC method. +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest { - /// params_type defines which parameters to query for, can be one of "voting", - /// "tallying" or "deposit". +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). #[prost(string, tag = "1")] - pub params_type: ::prost::alloc::string::String, + pub authority: ::prost::alloc::string::String, + /// params defines the x/gov parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, } -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryParamsResponse is the response type for the Query/Params RPC method. +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// Deprecated: Prefer to use `params` instead. - /// voting_params defines the parameters related to voting. - #[deprecated] - #[prost(message, optional, tag = "1")] - pub voting_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// deposit_params defines the parameters related to deposit. - #[deprecated] - #[prost(message, optional, tag = "2")] - pub deposit_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// tally_params defines the parameters related to tally. - #[deprecated] - #[prost(message, optional, tag = "3")] - pub tally_params: ::core::option::Option, - /// params defines all the paramaters of x/gov module. - /// - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryDepositRequest is the request type for the Query/Deposit RPC method. +/// MsgCancelProposal is the Msg/CancelProposal request type. +/// +/// Since: cosmos-sdk 0.50 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositRequest { +pub struct MsgCancelProposal { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. + /// proposer is the account address of the proposer. #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, + pub proposer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryDepositRequest { - const NAME: &'static str = "QueryDepositRequest"; +impl ::prost::Name for MsgCancelProposal { + const NAME: &'static str = "MsgCancelProposal"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryDepositResponse is the response type for the Query/Deposit RPC method. +/// MsgCancelProposalResponse defines the response structure for executing a +/// MsgCancelProposal message. +/// +/// Since: cosmos-sdk 0.50 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositResponse { - /// deposit defines the requested deposit. - #[prost(message, optional, tag = "1")] - pub deposit: ::core::option::Option, +pub struct MsgCancelProposalResponse { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// canceled_time is the time when proposal is canceled. + #[prost(message, optional, tag = "2")] + pub canceled_time: ::core::option::Option<::pbjson_types::Timestamp>, + /// canceled_height defines the block height at which the proposal is canceled. + #[prost(uint64, tag = "3")] + pub canceled_height: u64, } -impl ::prost::Name for QueryDepositResponse { - const NAME: &'static str = "QueryDepositResponse"; +impl ::prost::Name for MsgCancelProposalResponse { + const NAME: &'static str = "MsgCancelProposalResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +/// QueryConstitutionRequest is the request type for the Query/Constitution RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryDepositsRequest { - const NAME: &'static str = "QueryDepositsRequest"; +pub struct QueryConstitutionRequest {} +impl ::prost::Name for QueryConstitutionRequest { + const NAME: &'static str = "QueryConstitutionRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +/// QueryConstitutionResponse is the response type for the Query/Constitution RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsResponse { - /// deposits defines the requested deposits. - #[prost(message, repeated, tag = "1")] - pub deposits: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, +pub struct QueryConstitutionResponse { + #[prost(string, tag = "1")] + pub constitution: ::prost::alloc::string::String, } -impl ::prost::Name for QueryDepositsResponse { - const NAME: &'static str = "QueryDepositsResponse"; +impl ::prost::Name for QueryConstitutionResponse { + const NAME: &'static str = "QueryConstitutionResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +/// QueryProposalRequest is the request type for the Query/Proposal RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultRequest { +pub struct QueryProposalRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, } -impl ::prost::Name for QueryTallyResultRequest { - const NAME: &'static str = "QueryTallyResultRequest"; +impl ::prost::Name for QueryProposalRequest { + const NAME: &'static str = "QueryProposalRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +/// QueryProposalResponse is the response type for the Query/Proposal RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. +pub struct QueryProposalResponse { + /// proposal is the requested governance proposal. #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, + pub proposal: ::core::option::Option, } -impl ::prost::Name for QueryTallyResultResponse { - const NAME: &'static str = "QueryTallyResultResponse"; +impl ::prost::Name for QueryProposalResponse { + const NAME: &'static str = "QueryProposalResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -/// proposal Content. +/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposal { - /// messages are the arbitrary messages to be executed if proposal passes. - #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, - /// initial_deposit is the deposit value that must be paid at proposal submission. - #[prost(message, repeated, tag = "2")] - pub initial_deposit: ::prost::alloc::vec::Vec, - /// proposer is the account address of the proposer. +pub struct QueryProposalsRequest { + /// proposal_status defines the status of the proposals. + #[prost(enumeration = "ProposalStatus", tag = "1")] + pub proposal_status: i32, + /// voter defines the voter address for the proposals. + #[prost(string, tag = "2")] + pub voter: ::prost::alloc::string::String, + /// depositor defines the deposit addresses from the proposals. #[prost(string, tag = "3")] - pub proposer: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata attached to the proposal. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// title is the title of the proposal. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "5")] - pub title: ::prost::alloc::string::String, - /// summary is the summary of the proposal - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "6")] - pub summary: ::prost::alloc::string::String, - /// expedited defines if the proposal is expedited or not - /// - /// Since: cosmos-sdk 0.50 - #[prost(bool, tag = "7")] - pub expedited: bool, + pub depositor: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "4")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgSubmitProposal { - const NAME: &'static str = "MsgSubmitProposal"; +impl ::prost::Name for QueryProposalsRequest { + const NAME: &'static str = "QueryProposalsRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +/// QueryProposalsResponse is the response type for the Query/Proposals RPC +/// method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposalResponse { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, +pub struct QueryProposalsResponse { + /// proposals defines all the requested governance proposals. + #[prost(message, repeated, tag = "1")] + pub proposals: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgSubmitProposalResponse { - const NAME: &'static str = "MsgSubmitProposalResponse"; +impl ::prost::Name for QueryProposalsResponse { + const NAME: &'static str = "QueryProposalsResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgExecLegacyContent is used to wrap the legacy content field into a message. -/// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. +/// QueryVoteRequest is the request type for the Query/Vote RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecLegacyContent { - /// content is the proposal's content. - #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option<::pbjson_types::Any>, - /// authority must be the gov module address. +pub struct QueryVoteRequest { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// voter defines the voter address for the proposals. #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, + pub voter: ::prost::alloc::string::String, } -impl ::prost::Name for MsgExecLegacyContent { - const NAME: &'static str = "MsgExecLegacyContent"; +impl ::prost::Name for QueryVoteRequest { + const NAME: &'static str = "QueryVoteRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. +/// QueryVoteResponse is the response type for the Query/Vote RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecLegacyContentResponse {} -impl ::prost::Name for MsgExecLegacyContentResponse { - const NAME: &'static str = "MsgExecLegacyContentResponse"; +pub struct QueryVoteResponse { + /// vote defines the queried vote. + #[prost(message, optional, tag = "1")] + pub vote: ::core::option::Option, +} +impl ::prost::Name for QueryVoteResponse { + const NAME: &'static str = "QueryVoteResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgVote defines a message to cast a vote. +/// QueryVotesRequest is the request type for the Query/Votes RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVote { +pub struct QueryVotesRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option defines the vote option. - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, - /// metadata is any arbitrary metadata attached to the Vote. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgVote { - const NAME: &'static str = "MsgVote"; +impl ::prost::Name for QueryVotesRequest { + const NAME: &'static str = "QueryVotesRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgVoteResponse defines the Msg/Vote response type. +/// QueryVotesResponse is the response type for the Query/Votes RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteResponse {} -impl ::prost::Name for MsgVoteResponse { - const NAME: &'static str = "MsgVoteResponse"; +pub struct QueryVotesResponse { + /// votes defines the queried votes. + #[prost(message, repeated, tag = "1")] + pub votes: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryVotesResponse { + const NAME: &'static str = "QueryVotesResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgVoteWeighted defines a message to cast a vote. +/// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeighted { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// options defines the weighted vote options. - #[prost(message, repeated, tag = "3")] - pub options: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata attached to the VoteWeighted. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, +pub struct QueryParamsRequest { + /// params_type defines which parameters to query for, can be one of "voting", + /// "tallying" or "deposit". + #[prost(string, tag = "1")] + pub params_type: ::prost::alloc::string::String, } -impl ::prost::Name for MsgVoteWeighted { - const NAME: &'static str = "MsgVoteWeighted"; +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. +/// QueryParamsResponse is the response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeightedResponse {} -impl ::prost::Name for MsgVoteWeightedResponse { - const NAME: &'static str = "MsgVoteWeightedResponse"; +pub struct QueryParamsResponse { + /// Deprecated: Prefer to use `params` instead. + /// voting_params defines the parameters related to voting. + #[deprecated] + #[prost(message, optional, tag = "1")] + pub voting_params: ::core::option::Option, + /// Deprecated: Prefer to use `params` instead. + /// deposit_params defines the parameters related to deposit. + #[deprecated] + #[prost(message, optional, tag = "2")] + pub deposit_params: ::core::option::Option, + /// Deprecated: Prefer to use `params` instead. + /// tally_params defines the parameters related to tally. + #[deprecated] + #[prost(message, optional, tag = "3")] + pub tally_params: ::core::option::Option, + /// params defines all the paramaters of x/gov module. + /// + /// Since: cosmos-sdk 0.47 + #[prost(message, optional, tag = "4")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgDeposit defines a message to submit a deposit to an existing proposal. +/// QueryDepositRequest is the request type for the Query/Deposit RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDeposit { +pub struct QueryDepositRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, /// depositor defines the deposit addresses from the proposals. #[prost(string, tag = "2")] pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgDeposit { - const NAME: &'static str = "MsgDeposit"; +impl ::prost::Name for QueryDepositRequest { + const NAME: &'static str = "QueryDepositRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgDepositResponse defines the Msg/Deposit response type. +/// QueryDepositResponse is the response type for the Query/Deposit RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDepositResponse {} -impl ::prost::Name for MsgDepositResponse { - const NAME: &'static str = "MsgDepositResponse"; +pub struct QueryDepositResponse { + /// deposit defines the requested deposit. + #[prost(message, optional, tag = "1")] + pub deposit: ::core::option::Option, +} +impl ::prost::Name for QueryDepositResponse { + const NAME: &'static str = "QueryDepositResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 +/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/gov parameters to update. - /// - /// NOTE: All parameters must be supplied. +pub struct QueryDepositsRequest { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +impl ::prost::Name for QueryDepositsRequest { + const NAME: &'static str = "QueryDepositsRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 +/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryDepositsResponse { + /// deposits defines the requested deposits. + #[prost(message, repeated, tag = "1")] + pub deposits: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryDepositsResponse { + const NAME: &'static str = "QueryDepositsResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgCancelProposal is the Msg/CancelProposal request type. -/// -/// Since: cosmos-sdk 0.50 +/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelProposal { +pub struct QueryTallyResultRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// proposer is the account address of the proposer. - #[prost(string, tag = "2")] - pub proposer: ::prost::alloc::string::String, } -impl ::prost::Name for MsgCancelProposal { - const NAME: &'static str = "MsgCancelProposal"; +impl ::prost::Name for QueryTallyResultRequest { + const NAME: &'static str = "QueryTallyResultRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgCancelProposalResponse defines the response structure for executing a -/// MsgCancelProposal message. -/// -/// Since: cosmos-sdk 0.50 +/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelProposalResponse { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// canceled_time is the time when proposal is canceled. - #[prost(message, optional, tag = "2")] - pub canceled_time: ::core::option::Option<::pbjson_types::Timestamp>, - /// canceled_height defines the block height at which the proposal is canceled. - #[prost(uint64, tag = "3")] - pub canceled_height: u64, +pub struct QueryTallyResultResponse { + /// tally defines the requested tally. + #[prost(message, optional, tag = "1")] + pub tally: ::core::option::Option, } -impl ::prost::Name for MsgCancelProposalResponse { - const NAME: &'static str = "MsgCancelProposalResponse"; +impl ::prost::Name for QueryTallyResultResponse { + const NAME: &'static str = "QueryTallyResultResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) diff --git a/generated/rust/protos/src/cosmos.gov.v1.tonic.rs b/generated/rust/protos/src/cosmos.gov.v1.tonic.rs index f7250a332d..1692f9c8b2 100644 --- a/generated/rust/protos/src/cosmos.gov.v1.tonic.rs +++ b/generated/rust/protos/src/cosmos.gov.v1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,28 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn constitution( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Constitution"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Constitution")); - self.inner.unary(req, path, codec).await - } - pub async fn proposal( + pub async fn submit_proposal( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -113,16 +92,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Proposal"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/SubmitProposal"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Proposal")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "SubmitProposal")); self.inner.unary(req, path, codec).await } - pub async fn proposals( + pub async fn exec_legacy_content( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -131,34 +110,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Proposals"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/ExecLegacyContent"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Proposals")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "ExecLegacyContent")); self.inner.unary(req, path, codec).await } pub async fn vote( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Vote"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Vote")); - self.inner.unary(req, path, codec).await - } - pub async fn votes( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -166,16 +127,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Votes"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/Vote"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Votes")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "Vote")); self.inner.unary(req, path, codec).await } - pub async fn params( + pub async fn vote_weighted( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -184,16 +145,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Params"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/VoteWeighted"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Params")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "VoteWeighted")); self.inner.unary(req, path, codec).await } pub async fn deposit( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -202,16 +163,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Deposit"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/Deposit"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Deposit")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "Deposit")); self.inner.unary(req, path, codec).await } - pub async fn deposits( + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -220,16 +181,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Deposits"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/UpdateParams"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Deposits")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "UpdateParams")); self.inner.unary(req, path, codec).await } - pub async fn tally_result( + pub async fn cancel_proposal( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -238,24 +199,24 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/TallyResult"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/CancelProposal"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "TallyResult")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "CancelProposal")); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -266,7 +227,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -281,7 +242,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -294,7 +258,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -327,10 +291,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn submit_proposal( + pub async fn constitution( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -339,16 +303,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/SubmitProposal"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Constitution"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "SubmitProposal")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Constitution")); self.inner.unary(req, path, codec).await } - pub async fn exec_legacy_content( + pub async fn proposal( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -357,16 +321,34 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/ExecLegacyContent"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Proposal"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "ExecLegacyContent")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Proposal")); + self.inner.unary(req, path, codec).await + } + pub async fn proposals( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Proposals"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Proposals")); self.inner.unary(req, path, codec).await } pub async fn vote( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -374,16 +356,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/Vote"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Vote"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "Vote")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Vote")); self.inner.unary(req, path, codec).await } - pub async fn vote_weighted( + pub async fn votes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -392,16 +374,34 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/VoteWeighted"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Votes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "VoteWeighted")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Votes")); + self.inner.unary(req, path, codec).await + } + pub async fn params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Params"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Params")); self.inner.unary(req, path, codec).await } pub async fn deposit( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -410,16 +410,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/Deposit"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Deposit"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "Deposit")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Deposit")); self.inner.unary(req, path, codec).await } - pub async fn update_params( + pub async fn deposits( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -428,16 +428,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/UpdateParams"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Deposits"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "UpdateParams")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Deposits")); self.inner.unary(req, path, codec).await } - pub async fn cancel_proposal( + pub async fn tally_result( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -446,10 +446,10 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/CancelProposal"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/TallyResult"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "CancelProposal")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "TallyResult")); self.inner.unary(req, path, codec).await } } diff --git a/generated/rust/protos/src/cosmos.gov.v1beta1.rs b/generated/rust/protos/src/cosmos.gov.v1beta1.rs index bbd9183bd1..119d89358f 100644 --- a/generated/rust/protos/src/cosmos.gov.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.gov.v1beta1.rs @@ -336,6 +336,143 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } +/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary +/// proposal Content. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSubmitProposal { + /// content is the proposal's content. + #[prost(message, optional, tag = "1")] + pub content: ::core::option::Option<::pbjson_types::Any>, + /// initial_deposit is the deposit value that must be paid at proposal submission. + #[prost(message, repeated, tag = "2")] + pub initial_deposit: ::prost::alloc::vec::Vec, + /// proposer is the account address of the proposer. + #[prost(string, tag = "3")] + pub proposer: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgSubmitProposal { + const NAME: &'static str = "MsgSubmitProposal"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSubmitProposalResponse { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, +} +impl ::prost::Name for MsgSubmitProposalResponse { + const NAME: &'static str = "MsgSubmitProposalResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// MsgVote defines a message to cast a vote. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgVote { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// voter is the voter address for the proposal. + #[prost(string, tag = "2")] + pub voter: ::prost::alloc::string::String, + /// option defines the vote option. + #[prost(enumeration = "VoteOption", tag = "3")] + pub option: i32, +} +impl ::prost::Name for MsgVote { + const NAME: &'static str = "MsgVote"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// MsgVoteResponse defines the Msg/Vote response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgVoteResponse {} +impl ::prost::Name for MsgVoteResponse { + const NAME: &'static str = "MsgVoteResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// MsgVoteWeighted defines a message to cast a vote. +/// +/// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgVoteWeighted { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// voter is the voter address for the proposal. + #[prost(string, tag = "2")] + pub voter: ::prost::alloc::string::String, + /// options defines the weighted vote options. + #[prost(message, repeated, tag = "3")] + pub options: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgVoteWeighted { + const NAME: &'static str = "MsgVoteWeighted"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. +/// +/// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgVoteWeightedResponse {} +impl ::prost::Name for MsgVoteWeightedResponse { + const NAME: &'static str = "MsgVoteWeightedResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// MsgDeposit defines a message to submit a deposit to an existing proposal. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgDeposit { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// depositor defines the deposit addresses from the proposals. + #[prost(string, tag = "2")] + pub depositor: ::prost::alloc::string::String, + /// amount to be deposited by depositor. + #[prost(message, repeated, tag = "3")] + pub amount: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgDeposit { + const NAME: &'static str = "MsgDeposit"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// MsgDepositResponse defines the Msg/Deposit response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgDepositResponse {} +impl ::prost::Name for MsgDepositResponse { + const NAME: &'static str = "MsgDepositResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} /// QueryProposalRequest is the request type for the Query/Proposal RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -613,142 +750,5 @@ impl ::prost::Name for QueryTallyResultResponse { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -/// proposal Content. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposal { - /// content is the proposal's content. - #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option<::pbjson_types::Any>, - /// initial_deposit is the deposit value that must be paid at proposal submission. - #[prost(message, repeated, tag = "2")] - pub initial_deposit: ::prost::alloc::vec::Vec, - /// proposer is the account address of the proposer. - #[prost(string, tag = "3")] - pub proposer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgSubmitProposal { - const NAME: &'static str = "MsgSubmitProposal"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposalResponse { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -impl ::prost::Name for MsgSubmitProposalResponse { - const NAME: &'static str = "MsgSubmitProposalResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgVote defines a message to cast a vote. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVote { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option defines the vote option. - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, -} -impl ::prost::Name for MsgVote { - const NAME: &'static str = "MsgVote"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgVoteResponse defines the Msg/Vote response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteResponse {} -impl ::prost::Name for MsgVoteResponse { - const NAME: &'static str = "MsgVoteResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgVoteWeighted defines a message to cast a vote. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeighted { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// options defines the weighted vote options. - #[prost(message, repeated, tag = "3")] - pub options: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgVoteWeighted { - const NAME: &'static str = "MsgVoteWeighted"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeightedResponse {} -impl ::prost::Name for MsgVoteWeightedResponse { - const NAME: &'static str = "MsgVoteWeightedResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgDeposit defines a message to submit a deposit to an existing proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDeposit { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgDeposit { - const NAME: &'static str = "MsgDeposit"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgDepositResponse defines the Msg/Deposit response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDepositResponse {} -impl ::prost::Name for MsgDepositResponse { - const NAME: &'static str = "MsgDepositResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} include!("cosmos.gov.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.gov.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.gov.v1beta1.tonic.rs index 21bcc0d1f6..075b381e85 100644 --- a/generated/rust/protos/src/cosmos.gov.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.gov.v1beta1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,28 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Proposal"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Proposal")); - self.inner.unary(req, path, codec).await - } - pub async fn proposals( + pub async fn submit_proposal( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -113,34 +92,17 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Proposals"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Msg/SubmitProposal"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Proposals")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "SubmitProposal")); self.inner.unary(req, path, codec).await } pub async fn vote( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Vote"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Vote")); - self.inner.unary(req, path, codec).await - } - pub async fn votes( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -148,16 +110,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Votes"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Msg/Vote"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Votes")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "Vote")); self.inner.unary(req, path, codec).await } - pub async fn params( + pub async fn vote_weighted( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -166,52 +128,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Params"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Msg/VoteWeighted"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Params")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "VoteWeighted")); self.inner.unary(req, path, codec).await } pub async fn deposit( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Deposit"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Deposit")); - self.inner.unary(req, path, codec).await - } - pub async fn deposits( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Deposits"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Deposits")); - self.inner.unary(req, path, codec).await - } - pub async fn tally_result( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -220,25 +146,24 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/TallyResult"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Msg/Deposit"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "TallyResult")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "Deposit")); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -249,7 +174,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -264,7 +189,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -277,7 +205,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -310,10 +238,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn submit_proposal( + pub async fn proposal( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -322,17 +250,34 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Msg/SubmitProposal"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Proposal"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "SubmitProposal")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Proposal")); + self.inner.unary(req, path, codec).await + } + pub async fn proposals( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Proposals"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Proposals")); self.inner.unary(req, path, codec).await } pub async fn vote( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -340,16 +285,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Msg/Vote"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Vote"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "Vote")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Vote")); self.inner.unary(req, path, codec).await } - pub async fn vote_weighted( + pub async fn votes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -358,16 +303,34 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Msg/VoteWeighted"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Votes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "VoteWeighted")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Votes")); + self.inner.unary(req, path, codec).await + } + pub async fn params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Params"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Params")); self.inner.unary(req, path, codec).await } pub async fn deposit( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -376,10 +339,47 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Msg/Deposit"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Deposit"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "Deposit")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Deposit")); + self.inner.unary(req, path, codec).await + } + pub async fn deposits( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/Deposits"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Deposits")); + self.inner.unary(req, path, codec).await + } + pub async fn tally_result( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.gov.v1beta1.Query/TallyResult"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "TallyResult")); self.inner.unary(req, path, codec).await } } diff --git a/generated/rust/protos/src/cosmos.group.v1.rs b/generated/rust/protos/src/cosmos.group.v1.rs index d63f58b288..bd7ca4318a 100644 --- a/generated/rust/protos/src/cosmos.group.v1.rs +++ b/generated/rust/protos/src/cosmos.group.v1.rs @@ -670,1018 +670,1018 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupInfoRequest is the Query/GroupInfo request type. +/// MsgCreateGroup is the Msg/CreateGroup request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupInfoRequest { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - pub group_id: u64, +pub struct MsgCreateGroup { + /// admin is the account address of the group admin. + #[prost(string, tag = "1")] + pub admin: ::prost::alloc::string::String, + /// members defines the group members. + #[prost(message, repeated, tag = "2")] + pub members: ::prost::alloc::vec::Vec, + /// metadata is any arbitrary metadata to attached to the group. + #[prost(string, tag = "3")] + pub metadata: ::prost::alloc::string::String, } -impl ::prost::Name for QueryGroupInfoRequest { - const NAME: &'static str = "QueryGroupInfoRequest"; +impl ::prost::Name for MsgCreateGroup { + const NAME: &'static str = "MsgCreateGroup"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupInfoResponse is the Query/GroupInfo response type. +/// MsgCreateGroupResponse is the Msg/CreateGroup response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupInfoResponse { - /// info is the GroupInfo of the group. - #[prost(message, optional, tag = "1")] - pub info: ::core::option::Option, +pub struct MsgCreateGroupResponse { + /// group_id is the unique ID of the newly created group. + #[prost(uint64, tag = "1")] + pub group_id: u64, } -impl ::prost::Name for QueryGroupInfoResponse { - const NAME: &'static str = "QueryGroupInfoResponse"; +impl ::prost::Name for MsgCreateGroupResponse { + const NAME: &'static str = "MsgCreateGroupResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. +/// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPolicyInfoRequest { - /// address is the account address of the group policy. +pub struct MsgUpdateGroupMembers { + /// admin is the account address of the group admin. #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, + pub admin: ::prost::alloc::string::String, + /// group_id is the unique ID of the group. + #[prost(uint64, tag = "2")] + pub group_id: u64, + /// member_updates is the list of members to update, + /// set weight to 0 to remove a member. + #[prost(message, repeated, tag = "3")] + pub member_updates: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryGroupPolicyInfoRequest { - const NAME: &'static str = "QueryGroupPolicyInfoRequest"; +impl ::prost::Name for MsgUpdateGroupMembers { + const NAME: &'static str = "MsgUpdateGroupMembers"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. +/// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPolicyInfoResponse { - /// info is the GroupPolicyInfo of the group policy. - #[prost(message, optional, tag = "1")] - pub info: ::core::option::Option, -} -impl ::prost::Name for QueryGroupPolicyInfoResponse { - const NAME: &'static str = "QueryGroupPolicyInfoResponse"; +pub struct MsgUpdateGroupMembersResponse {} +impl ::prost::Name for MsgUpdateGroupMembersResponse { + const NAME: &'static str = "MsgUpdateGroupMembersResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupMembersRequest is the Query/GroupMembers request type. +/// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupMembersRequest { +pub struct MsgUpdateGroupAdmin { + /// admin is the current account address of the group admin. + #[prost(string, tag = "1")] + pub admin: ::prost::alloc::string::String, /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] + #[prost(uint64, tag = "2")] pub group_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, + /// new_admin is the group new admin account address. + #[prost(string, tag = "3")] + pub new_admin: ::prost::alloc::string::String, } -impl ::prost::Name for QueryGroupMembersRequest { - const NAME: &'static str = "QueryGroupMembersRequest"; +impl ::prost::Name for MsgUpdateGroupAdmin { + const NAME: &'static str = "MsgUpdateGroupAdmin"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. +/// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupMembersResponse { - /// members are the members of the group with given group_id. - #[prost(message, repeated, tag = "1")] - pub members: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryGroupMembersResponse { - const NAME: &'static str = "QueryGroupMembersResponse"; +pub struct MsgUpdateGroupAdminResponse {} +impl ::prost::Name for MsgUpdateGroupAdminResponse { + const NAME: &'static str = "MsgUpdateGroupAdminResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. +/// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsByAdminRequest { - /// admin is the account address of a group's admin. +pub struct MsgUpdateGroupMetadata { + /// admin is the account address of the group admin. #[prost(string, tag = "1")] pub admin: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, + /// group_id is the unique ID of the group. + #[prost(uint64, tag = "2")] + pub group_id: u64, + /// metadata is the updated group's metadata. + #[prost(string, tag = "3")] + pub metadata: ::prost::alloc::string::String, } -impl ::prost::Name for QueryGroupsByAdminRequest { - const NAME: &'static str = "QueryGroupsByAdminRequest"; +impl ::prost::Name for MsgUpdateGroupMetadata { + const NAME: &'static str = "MsgUpdateGroupMetadata"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. +/// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsByAdminResponse { - /// groups are the groups info with the provided admin. - #[prost(message, repeated, tag = "1")] - pub groups: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryGroupsByAdminResponse { - const NAME: &'static str = "QueryGroupsByAdminResponse"; +pub struct MsgUpdateGroupMetadataResponse {} +impl ::prost::Name for MsgUpdateGroupMetadataResponse { + const NAME: &'static str = "MsgUpdateGroupMetadataResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. +/// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPoliciesByGroupRequest { - /// group_id is the unique ID of the group policy's group. - #[prost(uint64, tag = "1")] +pub struct MsgCreateGroupPolicy { + /// admin is the account address of the group admin. + #[prost(string, tag = "1")] + pub admin: ::prost::alloc::string::String, + /// group_id is the unique ID of the group. + #[prost(uint64, tag = "2")] pub group_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, + /// metadata is any arbitrary metadata attached to the group policy. + #[prost(string, tag = "3")] + pub metadata: ::prost::alloc::string::String, + /// decision_policy specifies the group policy's decision policy. + #[prost(message, optional, tag = "4")] + pub decision_policy: ::core::option::Option<::pbjson_types::Any>, } -impl ::prost::Name for QueryGroupPoliciesByGroupRequest { - const NAME: &'static str = "QueryGroupPoliciesByGroupRequest"; +impl ::prost::Name for MsgCreateGroupPolicy { + const NAME: &'static str = "MsgCreateGroupPolicy"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. +/// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPoliciesByGroupResponse { - /// group_policies are the group policies info associated with the provided group. - #[prost(message, repeated, tag = "1")] - pub group_policies: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, +pub struct MsgCreateGroupPolicyResponse { + /// address is the account address of the newly created group policy. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, } -impl ::prost::Name for QueryGroupPoliciesByGroupResponse { - const NAME: &'static str = "QueryGroupPoliciesByGroupResponse"; +impl ::prost::Name for MsgCreateGroupPolicyResponse { + const NAME: &'static str = "MsgCreateGroupPolicyResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. +/// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPoliciesByAdminRequest { - /// admin is the admin address of the group policy. +pub struct MsgUpdateGroupPolicyAdmin { + /// admin is the account address of the group admin. #[prost(string, tag = "1")] pub admin: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, + /// group_policy_address is the account address of the group policy. + #[prost(string, tag = "2")] + pub group_policy_address: ::prost::alloc::string::String, + /// new_admin is the new group policy admin. + #[prost(string, tag = "3")] + pub new_admin: ::prost::alloc::string::String, } -impl ::prost::Name for QueryGroupPoliciesByAdminRequest { - const NAME: &'static str = "QueryGroupPoliciesByAdminRequest"; +impl ::prost::Name for MsgUpdateGroupPolicyAdmin { + const NAME: &'static str = "MsgUpdateGroupPolicyAdmin"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. +/// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPoliciesByAdminResponse { - /// group_policies are the group policies info with provided admin. - #[prost(message, repeated, tag = "1")] - pub group_policies: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryGroupPoliciesByAdminResponse { - const NAME: &'static str = "QueryGroupPoliciesByAdminResponse"; +pub struct MsgUpdateGroupPolicyAdminResponse {} +impl ::prost::Name for MsgUpdateGroupPolicyAdminResponse { + const NAME: &'static str = "MsgUpdateGroupPolicyAdminResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryProposalRequest is the Query/Proposal request type. +/// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalRequest { - /// proposal_id is the unique ID of a proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, +pub struct MsgCreateGroupWithPolicy { + /// admin is the account address of the group and group policy admin. + #[prost(string, tag = "1")] + pub admin: ::prost::alloc::string::String, + /// members defines the group members. + #[prost(message, repeated, tag = "2")] + pub members: ::prost::alloc::vec::Vec, + /// group_metadata is any arbitrary metadata attached to the group. + #[prost(string, tag = "3")] + pub group_metadata: ::prost::alloc::string::String, + /// group_policy_metadata is any arbitrary metadata attached to the group policy. + #[prost(string, tag = "4")] + pub group_policy_metadata: ::prost::alloc::string::String, + /// group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group + /// and group policy admin. + #[prost(bool, tag = "5")] + pub group_policy_as_admin: bool, + /// decision_policy specifies the group policy's decision policy. + #[prost(message, optional, tag = "6")] + pub decision_policy: ::core::option::Option<::pbjson_types::Any>, } -impl ::prost::Name for QueryProposalRequest { - const NAME: &'static str = "QueryProposalRequest"; +impl ::prost::Name for MsgCreateGroupWithPolicy { + const NAME: &'static str = "MsgCreateGroupWithPolicy"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryProposalResponse is the Query/Proposal response type. +/// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalResponse { - /// proposal is the proposal info. - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, +pub struct MsgCreateGroupWithPolicyResponse { + /// group_id is the unique ID of the newly created group with policy. + #[prost(uint64, tag = "1")] + pub group_id: u64, + /// group_policy_address is the account address of the newly created group policy. + #[prost(string, tag = "2")] + pub group_policy_address: ::prost::alloc::string::String, } -impl ::prost::Name for QueryProposalResponse { - const NAME: &'static str = "QueryProposalResponse"; +impl ::prost::Name for MsgCreateGroupWithPolicyResponse { + const NAME: &'static str = "MsgCreateGroupWithPolicyResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. +/// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsByGroupPolicyRequest { - /// address is the account address of the group policy related to proposals. +pub struct MsgUpdateGroupPolicyDecisionPolicy { + /// admin is the account address of the group admin. #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, + pub admin: ::prost::alloc::string::String, + /// group_policy_address is the account address of group policy. + #[prost(string, tag = "2")] + pub group_policy_address: ::prost::alloc::string::String, + /// decision_policy is the updated group policy's decision policy. + #[prost(message, optional, tag = "3")] + pub decision_policy: ::core::option::Option<::pbjson_types::Any>, } -impl ::prost::Name for QueryProposalsByGroupPolicyRequest { - const NAME: &'static str = "QueryProposalsByGroupPolicyRequest"; +impl ::prost::Name for MsgUpdateGroupPolicyDecisionPolicy { + const NAME: &'static str = "MsgUpdateGroupPolicyDecisionPolicy"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. +/// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsByGroupPolicyResponse { - /// proposals are the proposals with given group policy. - #[prost(message, repeated, tag = "1")] - pub proposals: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryProposalsByGroupPolicyResponse { - const NAME: &'static str = "QueryProposalsByGroupPolicyResponse"; +pub struct MsgUpdateGroupPolicyDecisionPolicyResponse {} +impl ::prost::Name for MsgUpdateGroupPolicyDecisionPolicyResponse { + const NAME: &'static str = "MsgUpdateGroupPolicyDecisionPolicyResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. +/// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteByProposalVoterRequest { - /// proposal_id is the unique ID of a proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is a proposal voter account address. +pub struct MsgUpdateGroupPolicyMetadata { + /// admin is the account address of the group admin. + #[prost(string, tag = "1")] + pub admin: ::prost::alloc::string::String, + /// group_policy_address is the account address of group policy. #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, + pub group_policy_address: ::prost::alloc::string::String, + /// metadata is the group policy metadata to be updated. + #[prost(string, tag = "3")] + pub metadata: ::prost::alloc::string::String, } -impl ::prost::Name for QueryVoteByProposalVoterRequest { - const NAME: &'static str = "QueryVoteByProposalVoterRequest"; +impl ::prost::Name for MsgUpdateGroupPolicyMetadata { + const NAME: &'static str = "MsgUpdateGroupPolicyMetadata"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. +/// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteByProposalVoterResponse { - /// vote is the vote with given proposal_id and voter. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -impl ::prost::Name for QueryVoteByProposalVoterResponse { - const NAME: &'static str = "QueryVoteByProposalVoterResponse"; +pub struct MsgUpdateGroupPolicyMetadataResponse {} +impl ::prost::Name for MsgUpdateGroupPolicyMetadataResponse { + const NAME: &'static str = "MsgUpdateGroupPolicyMetadataResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryVotesByProposalRequest is the Query/VotesByProposal request type. +/// MsgSubmitProposal is the Msg/SubmitProposal request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesByProposalRequest { - /// proposal_id is the unique ID of a proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, +pub struct MsgSubmitProposal { + /// group_policy_address is the account address of group policy. + #[prost(string, tag = "1")] + pub group_policy_address: ::prost::alloc::string::String, + /// proposers are the account addresses of the proposers. + /// Proposers signatures will be counted as yes votes. + #[prost(string, repeated, tag = "2")] + pub proposers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// metadata is any arbitrary metadata attached to the proposal. + #[prost(string, tag = "3")] + pub metadata: ::prost::alloc::string::String, + /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + #[prost(message, repeated, tag = "4")] + pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + /// exec defines the mode of execution of the proposal, + /// whether it should be executed immediately on creation or not. + /// If so, proposers signatures are considered as Yes votes. + #[prost(enumeration = "Exec", tag = "5")] + pub exec: i32, + /// title is the title of the proposal. + /// + /// Since: cosmos-sdk 0.47 + #[prost(string, tag = "6")] + pub title: ::prost::alloc::string::String, + /// summary is the summary of the proposal. + /// + /// Since: cosmos-sdk 0.47 + #[prost(string, tag = "7")] + pub summary: ::prost::alloc::string::String, } -impl ::prost::Name for QueryVotesByProposalRequest { - const NAME: &'static str = "QueryVotesByProposalRequest"; +impl ::prost::Name for MsgSubmitProposal { + const NAME: &'static str = "MsgSubmitProposal"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryVotesByProposalResponse is the Query/VotesByProposal response type. +/// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesByProposalResponse { - /// votes are the list of votes for given proposal_id. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, +pub struct MsgSubmitProposalResponse { + /// proposal is the unique ID of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, } -impl ::prost::Name for QueryVotesByProposalResponse { - const NAME: &'static str = "QueryVotesByProposalResponse"; +impl ::prost::Name for MsgSubmitProposalResponse { + const NAME: &'static str = "MsgSubmitProposalResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryVotesByVoterRequest is the Query/VotesByVoter request type. +/// MsgWithdrawProposal is the Msg/WithdrawProposal request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesByVoterRequest { - /// voter is a proposal voter account address. - #[prost(string, tag = "1")] - pub voter: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, +pub struct MsgWithdrawProposal { + /// proposal is the unique ID of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// address is the admin of the group policy or one of the proposer of the proposal. + #[prost(string, tag = "2")] + pub address: ::prost::alloc::string::String, } -impl ::prost::Name for QueryVotesByVoterRequest { - const NAME: &'static str = "QueryVotesByVoterRequest"; +impl ::prost::Name for MsgWithdrawProposal { + const NAME: &'static str = "MsgWithdrawProposal"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryVotesByVoterResponse is the Query/VotesByVoter response type. +/// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesByVoterResponse { - /// votes are the list of votes by given voter. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryVotesByVoterResponse { - const NAME: &'static str = "QueryVotesByVoterResponse"; +pub struct MsgWithdrawProposalResponse {} +impl ::prost::Name for MsgWithdrawProposalResponse { + const NAME: &'static str = "MsgWithdrawProposalResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupsByMemberRequest is the Query/GroupsByMember request type. +/// MsgVote is the Msg/Vote request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsByMemberRequest { - /// address is the group member address. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, +pub struct MsgVote { + /// proposal is the unique ID of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// voter is the voter account address. + #[prost(string, tag = "2")] + pub voter: ::prost::alloc::string::String, + /// option is the voter's choice on the proposal. + #[prost(enumeration = "VoteOption", tag = "3")] + pub option: i32, + /// metadata is any arbitrary metadata attached to the vote. + #[prost(string, tag = "4")] + pub metadata: ::prost::alloc::string::String, + /// exec defines whether the proposal should be executed + /// immediately after voting or not. + #[prost(enumeration = "Exec", tag = "5")] + pub exec: i32, } -impl ::prost::Name for QueryGroupsByMemberRequest { - const NAME: &'static str = "QueryGroupsByMemberRequest"; +impl ::prost::Name for MsgVote { + const NAME: &'static str = "MsgVote"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupsByMemberResponse is the Query/GroupsByMember response type. +/// MsgVoteResponse is the Msg/Vote response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsByMemberResponse { - /// groups are the groups info with the provided group member. - #[prost(message, repeated, tag = "1")] - pub groups: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryGroupsByMemberResponse { - const NAME: &'static str = "QueryGroupsByMemberResponse"; +pub struct MsgVoteResponse {} +impl ::prost::Name for MsgVoteResponse { + const NAME: &'static str = "MsgVoteResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryTallyResultRequest is the Query/TallyResult request type. +/// MsgExec is the Msg/Exec request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultRequest { - /// proposal_id is the unique id of a proposal. +pub struct MsgExec { + /// proposal is the unique ID of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, + /// executor is the account address used to execute the proposal. + #[prost(string, tag = "2")] + pub executor: ::prost::alloc::string::String, } -impl ::prost::Name for QueryTallyResultRequest { - const NAME: &'static str = "QueryTallyResultRequest"; +impl ::prost::Name for MsgExec { + const NAME: &'static str = "MsgExec"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryTallyResultResponse is the Query/TallyResult response type. +/// MsgExecResponse is the Msg/Exec request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, +pub struct MsgExecResponse { + /// result is the final result of the proposal execution. + #[prost(enumeration = "ProposalExecutorResult", tag = "2")] + pub result: i32, } -impl ::prost::Name for QueryTallyResultResponse { - const NAME: &'static str = "QueryTallyResultResponse"; +impl ::prost::Name for MsgExecResponse { + const NAME: &'static str = "MsgExecResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupsRequest is the Query/Groups request type. -/// -/// Since: cosmos-sdk 0.47.1 +/// MsgLeaveGroup is the Msg/LeaveGroup request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, +pub struct MsgLeaveGroup { + /// address is the account address of the group member. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// group_id is the unique ID of the group. + #[prost(uint64, tag = "2")] + pub group_id: u64, } -impl ::prost::Name for QueryGroupsRequest { - const NAME: &'static str = "QueryGroupsRequest"; +impl ::prost::Name for MsgLeaveGroup { + const NAME: &'static str = "MsgLeaveGroup"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// QueryGroupsResponse is the Query/Groups response type. -/// -/// Since: cosmos-sdk 0.47.1 +/// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsResponse { - /// `groups` is all the groups present in state. - #[prost(message, repeated, tag = "1")] - pub groups: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryGroupsResponse { - const NAME: &'static str = "QueryGroupsResponse"; +pub struct MsgLeaveGroupResponse {} +impl ::prost::Name for MsgLeaveGroupResponse { + const NAME: &'static str = "MsgLeaveGroupResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgCreateGroup is the Msg/CreateGroup request type. +/// Exec defines modes of execution of a proposal on creation or on new vote. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Exec { + /// An empty value means that there should be a separate + /// MsgExec request for the proposal to execute. + Unspecified = 0, + /// Try to execute the proposal immediately. + /// If the proposal is not allowed per the DecisionPolicy, + /// the proposal will still be open and could + /// be executed at a later point. + Try = 1, +} +impl Exec { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Exec::Unspecified => "EXEC_UNSPECIFIED", + Exec::Try => "EXEC_TRY", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EXEC_UNSPECIFIED" => Some(Self::Unspecified), + "EXEC_TRY" => Some(Self::Try), + _ => None, + } + } +} +/// QueryGroupInfoRequest is the Query/GroupInfo request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroup { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// members defines the group members. - #[prost(message, repeated, tag = "2")] - pub members: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata to attached to the group. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, +pub struct QueryGroupInfoRequest { + /// group_id is the unique ID of the group. + #[prost(uint64, tag = "1")] + pub group_id: u64, } -impl ::prost::Name for MsgCreateGroup { - const NAME: &'static str = "MsgCreateGroup"; +impl ::prost::Name for QueryGroupInfoRequest { + const NAME: &'static str = "QueryGroupInfoRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgCreateGroupResponse is the Msg/CreateGroup response type. +/// QueryGroupInfoResponse is the Query/GroupInfo response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroupResponse { - /// group_id is the unique ID of the newly created group. - #[prost(uint64, tag = "1")] - pub group_id: u64, +pub struct QueryGroupInfoResponse { + /// info is the GroupInfo of the group. + #[prost(message, optional, tag = "1")] + pub info: ::core::option::Option, } -impl ::prost::Name for MsgCreateGroupResponse { - const NAME: &'static str = "MsgCreateGroupResponse"; +impl ::prost::Name for QueryGroupInfoResponse { + const NAME: &'static str = "QueryGroupInfoResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. +/// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupMembers { - /// admin is the account address of the group admin. +pub struct QueryGroupPolicyInfoRequest { + /// address is the account address of the group policy. #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - pub group_id: u64, - /// member_updates is the list of members to update, - /// set weight to 0 to remove a member. - #[prost(message, repeated, tag = "3")] - pub member_updates: ::prost::alloc::vec::Vec, + pub address: ::prost::alloc::string::String, } -impl ::prost::Name for MsgUpdateGroupMembers { - const NAME: &'static str = "MsgUpdateGroupMembers"; +impl ::prost::Name for QueryGroupPolicyInfoRequest { + const NAME: &'static str = "QueryGroupPolicyInfoRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. +/// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupMembersResponse {} -impl ::prost::Name for MsgUpdateGroupMembersResponse { - const NAME: &'static str = "MsgUpdateGroupMembersResponse"; +pub struct QueryGroupPolicyInfoResponse { + /// info is the GroupPolicyInfo of the group policy. + #[prost(message, optional, tag = "1")] + pub info: ::core::option::Option, +} +impl ::prost::Name for QueryGroupPolicyInfoResponse { + const NAME: &'static str = "QueryGroupPolicyInfoResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. +/// QueryGroupMembersRequest is the Query/GroupMembers request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupAdmin { - /// admin is the current account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, +pub struct QueryGroupMembersRequest { /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] + #[prost(uint64, tag = "1")] pub group_id: u64, - /// new_admin is the group new admin account address. - #[prost(string, tag = "3")] - pub new_admin: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgUpdateGroupAdmin { - const NAME: &'static str = "MsgUpdateGroupAdmin"; +impl ::prost::Name for QueryGroupMembersRequest { + const NAME: &'static str = "QueryGroupMembersRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. +/// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupAdminResponse {} -impl ::prost::Name for MsgUpdateGroupAdminResponse { - const NAME: &'static str = "MsgUpdateGroupAdminResponse"; +pub struct QueryGroupMembersResponse { + /// members are the members of the group with given group_id. + #[prost(message, repeated, tag = "1")] + pub members: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryGroupMembersResponse { + const NAME: &'static str = "QueryGroupMembersResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. +/// QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupMetadata { - /// admin is the account address of the group admin. +pub struct QueryGroupsByAdminRequest { + /// admin is the account address of a group's admin. #[prost(string, tag = "1")] pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - pub group_id: u64, - /// metadata is the updated group's metadata. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgUpdateGroupMetadata { - const NAME: &'static str = "MsgUpdateGroupMetadata"; +impl ::prost::Name for QueryGroupsByAdminRequest { + const NAME: &'static str = "QueryGroupsByAdminRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. +/// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupMetadataResponse {} -impl ::prost::Name for MsgUpdateGroupMetadataResponse { - const NAME: &'static str = "MsgUpdateGroupMetadataResponse"; +pub struct QueryGroupsByAdminResponse { + /// groups are the groups info with the provided admin. + #[prost(message, repeated, tag = "1")] + pub groups: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryGroupsByAdminResponse { + const NAME: &'static str = "QueryGroupsByAdminResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. +/// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroupPolicy { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] +pub struct QueryGroupPoliciesByGroupRequest { + /// group_id is the unique ID of the group policy's group. + #[prost(uint64, tag = "1")] pub group_id: u64, - /// metadata is any arbitrary metadata attached to the group policy. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// decision_policy specifies the group policy's decision policy. - #[prost(message, optional, tag = "4")] - pub decision_policy: ::core::option::Option<::pbjson_types::Any>, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgCreateGroupPolicy { - const NAME: &'static str = "MsgCreateGroupPolicy"; +impl ::prost::Name for QueryGroupPoliciesByGroupRequest { + const NAME: &'static str = "QueryGroupPoliciesByGroupRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. +/// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroupPolicyResponse { - /// address is the account address of the newly created group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, +pub struct QueryGroupPoliciesByGroupResponse { + /// group_policies are the group policies info associated with the provided group. + #[prost(message, repeated, tag = "1")] + pub group_policies: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgCreateGroupPolicyResponse { - const NAME: &'static str = "MsgCreateGroupPolicyResponse"; +impl ::prost::Name for QueryGroupPoliciesByGroupResponse { + const NAME: &'static str = "QueryGroupPoliciesByGroupResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. +/// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyAdmin { - /// admin is the account address of the group admin. +pub struct QueryGroupPoliciesByAdminRequest { + /// admin is the admin address of the group policy. #[prost(string, tag = "1")] pub admin: ::prost::alloc::string::String, - /// group_policy_address is the account address of the group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// new_admin is the new group policy admin. - #[prost(string, tag = "3")] - pub new_admin: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgUpdateGroupPolicyAdmin { - const NAME: &'static str = "MsgUpdateGroupPolicyAdmin"; +impl ::prost::Name for QueryGroupPoliciesByAdminRequest { + const NAME: &'static str = "QueryGroupPoliciesByAdminRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. +/// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyAdminResponse {} -impl ::prost::Name for MsgUpdateGroupPolicyAdminResponse { - const NAME: &'static str = "MsgUpdateGroupPolicyAdminResponse"; +pub struct QueryGroupPoliciesByAdminResponse { + /// group_policies are the group policies info with provided admin. + #[prost(message, repeated, tag = "1")] + pub group_policies: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryGroupPoliciesByAdminResponse { + const NAME: &'static str = "QueryGroupPoliciesByAdminResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. +/// QueryProposalRequest is the Query/Proposal request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroupWithPolicy { - /// admin is the account address of the group and group policy admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// members defines the group members. - #[prost(message, repeated, tag = "2")] - pub members: ::prost::alloc::vec::Vec, - /// group_metadata is any arbitrary metadata attached to the group. - #[prost(string, tag = "3")] - pub group_metadata: ::prost::alloc::string::String, - /// group_policy_metadata is any arbitrary metadata attached to the group policy. - #[prost(string, tag = "4")] - pub group_policy_metadata: ::prost::alloc::string::String, - /// group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group - /// and group policy admin. - #[prost(bool, tag = "5")] - pub group_policy_as_admin: bool, - /// decision_policy specifies the group policy's decision policy. - #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option<::pbjson_types::Any>, +pub struct QueryProposalRequest { + /// proposal_id is the unique ID of a proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, } -impl ::prost::Name for MsgCreateGroupWithPolicy { - const NAME: &'static str = "MsgCreateGroupWithPolicy"; +impl ::prost::Name for QueryProposalRequest { + const NAME: &'static str = "QueryProposalRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. +/// QueryProposalResponse is the Query/Proposal response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroupWithPolicyResponse { - /// group_id is the unique ID of the newly created group with policy. - #[prost(uint64, tag = "1")] - pub group_id: u64, - /// group_policy_address is the account address of the newly created group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, +pub struct QueryProposalResponse { + /// proposal is the proposal info. + #[prost(message, optional, tag = "1")] + pub proposal: ::core::option::Option, } -impl ::prost::Name for MsgCreateGroupWithPolicyResponse { - const NAME: &'static str = "MsgCreateGroupWithPolicyResponse"; +impl ::prost::Name for QueryProposalResponse { + const NAME: &'static str = "QueryProposalResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. +/// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyDecisionPolicy { - /// admin is the account address of the group admin. +pub struct QueryProposalsByGroupPolicyRequest { + /// address is the account address of the group policy related to proposals. #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_policy_address is the account address of group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// decision_policy is the updated group policy's decision policy. - #[prost(message, optional, tag = "3")] - pub decision_policy: ::core::option::Option<::pbjson_types::Any>, + pub address: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgUpdateGroupPolicyDecisionPolicy { - const NAME: &'static str = "MsgUpdateGroupPolicyDecisionPolicy"; +impl ::prost::Name for QueryProposalsByGroupPolicyRequest { + const NAME: &'static str = "QueryProposalsByGroupPolicyRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. +/// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyDecisionPolicyResponse {} -impl ::prost::Name for MsgUpdateGroupPolicyDecisionPolicyResponse { - const NAME: &'static str = "MsgUpdateGroupPolicyDecisionPolicyResponse"; +pub struct QueryProposalsByGroupPolicyResponse { + /// proposals are the proposals with given group policy. + #[prost(message, repeated, tag = "1")] + pub proposals: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryProposalsByGroupPolicyResponse { + const NAME: &'static str = "QueryProposalsByGroupPolicyResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. +/// QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyMetadata { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_policy_address is the account address of group policy. +pub struct QueryVoteByProposalVoterRequest { + /// proposal_id is the unique ID of a proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// voter is a proposal voter account address. #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// metadata is the group policy metadata to be updated. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, + pub voter: ::prost::alloc::string::String, } -impl ::prost::Name for MsgUpdateGroupPolicyMetadata { - const NAME: &'static str = "MsgUpdateGroupPolicyMetadata"; +impl ::prost::Name for QueryVoteByProposalVoterRequest { + const NAME: &'static str = "QueryVoteByProposalVoterRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. +/// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyMetadataResponse {} -impl ::prost::Name for MsgUpdateGroupPolicyMetadataResponse { - const NAME: &'static str = "MsgUpdateGroupPolicyMetadataResponse"; +pub struct QueryVoteByProposalVoterResponse { + /// vote is the vote with given proposal_id and voter. + #[prost(message, optional, tag = "1")] + pub vote: ::core::option::Option, +} +impl ::prost::Name for QueryVoteByProposalVoterResponse { + const NAME: &'static str = "QueryVoteByProposalVoterResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgSubmitProposal is the Msg/SubmitProposal request type. +/// QueryVotesByProposalRequest is the Query/VotesByProposal request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposal { - /// group_policy_address is the account address of group policy. - #[prost(string, tag = "1")] - pub group_policy_address: ::prost::alloc::string::String, - /// proposers are the account addresses of the proposers. - /// Proposers signatures will be counted as yes votes. - #[prost(string, repeated, tag = "2")] - pub proposers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// metadata is any arbitrary metadata attached to the proposal. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. - #[prost(message, repeated, tag = "4")] - pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, - /// exec defines the mode of execution of the proposal, - /// whether it should be executed immediately on creation or not. - /// If so, proposers signatures are considered as Yes votes. - #[prost(enumeration = "Exec", tag = "5")] - pub exec: i32, - /// title is the title of the proposal. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "6")] - pub title: ::prost::alloc::string::String, - /// summary is the summary of the proposal. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "7")] - pub summary: ::prost::alloc::string::String, +pub struct QueryVotesByProposalRequest { + /// proposal_id is the unique ID of a proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgSubmitProposal { - const NAME: &'static str = "MsgSubmitProposal"; +impl ::prost::Name for QueryVotesByProposalRequest { + const NAME: &'static str = "QueryVotesByProposalRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. +/// QueryVotesByProposalResponse is the Query/VotesByProposal response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposalResponse { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, +pub struct QueryVotesByProposalResponse { + /// votes are the list of votes for given proposal_id. + #[prost(message, repeated, tag = "1")] + pub votes: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgSubmitProposalResponse { - const NAME: &'static str = "MsgSubmitProposalResponse"; +impl ::prost::Name for QueryVotesByProposalResponse { + const NAME: &'static str = "QueryVotesByProposalResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgWithdrawProposal is the Msg/WithdrawProposal request type. +/// QueryVotesByVoterRequest is the Query/VotesByVoter request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawProposal { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// address is the admin of the group policy or one of the proposer of the proposal. - #[prost(string, tag = "2")] - pub address: ::prost::alloc::string::String, +pub struct QueryVotesByVoterRequest { + /// voter is a proposal voter account address. + #[prost(string, tag = "1")] + pub voter: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgWithdrawProposal { - const NAME: &'static str = "MsgWithdrawProposal"; +impl ::prost::Name for QueryVotesByVoterRequest { + const NAME: &'static str = "QueryVotesByVoterRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. +/// QueryVotesByVoterResponse is the Query/VotesByVoter response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawProposalResponse {} -impl ::prost::Name for MsgWithdrawProposalResponse { - const NAME: &'static str = "MsgWithdrawProposalResponse"; +pub struct QueryVotesByVoterResponse { + /// votes are the list of votes by given voter. + #[prost(message, repeated, tag = "1")] + pub votes: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryVotesByVoterResponse { + const NAME: &'static str = "QueryVotesByVoterResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgVote is the Msg/Vote request type. +/// QueryGroupsByMemberRequest is the Query/GroupsByMember request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVote { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter account address. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option is the voter's choice on the proposal. - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, - /// metadata is any arbitrary metadata attached to the vote. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// exec defines whether the proposal should be executed - /// immediately after voting or not. - #[prost(enumeration = "Exec", tag = "5")] - pub exec: i32, +pub struct QueryGroupsByMemberRequest { + /// address is the group member address. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgVote { - const NAME: &'static str = "MsgVote"; +impl ::prost::Name for QueryGroupsByMemberRequest { + const NAME: &'static str = "QueryGroupsByMemberRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgVoteResponse is the Msg/Vote response type. +/// QueryGroupsByMemberResponse is the Query/GroupsByMember response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteResponse {} -impl ::prost::Name for MsgVoteResponse { - const NAME: &'static str = "MsgVoteResponse"; +pub struct QueryGroupsByMemberResponse { + /// groups are the groups info with the provided group member. + #[prost(message, repeated, tag = "1")] + pub groups: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryGroupsByMemberResponse { + const NAME: &'static str = "QueryGroupsByMemberResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgExec is the Msg/Exec request type. +/// QueryTallyResultRequest is the Query/TallyResult request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExec { - /// proposal is the unique ID of the proposal. +pub struct QueryTallyResultRequest { + /// proposal_id is the unique id of a proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// executor is the account address used to execute the proposal. - #[prost(string, tag = "2")] - pub executor: ::prost::alloc::string::String, } -impl ::prost::Name for MsgExec { - const NAME: &'static str = "MsgExec"; +impl ::prost::Name for QueryTallyResultRequest { + const NAME: &'static str = "QueryTallyResultRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgExecResponse is the Msg/Exec request type. +/// QueryTallyResultResponse is the Query/TallyResult response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecResponse { - /// result is the final result of the proposal execution. - #[prost(enumeration = "ProposalExecutorResult", tag = "2")] - pub result: i32, +pub struct QueryTallyResultResponse { + /// tally defines the requested tally. + #[prost(message, optional, tag = "1")] + pub tally: ::core::option::Option, } -impl ::prost::Name for MsgExecResponse { - const NAME: &'static str = "MsgExecResponse"; +impl ::prost::Name for QueryTallyResultResponse { + const NAME: &'static str = "QueryTallyResultResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgLeaveGroup is the Msg/LeaveGroup request type. +/// QueryGroupsRequest is the Query/Groups request type. +/// +/// Since: cosmos-sdk 0.47.1 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgLeaveGroup { - /// address is the account address of the group member. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - pub group_id: u64, +pub struct QueryGroupsRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, } -impl ::prost::Name for MsgLeaveGroup { - const NAME: &'static str = "MsgLeaveGroup"; +impl ::prost::Name for QueryGroupsRequest { + const NAME: &'static str = "QueryGroupsRequest"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. +/// QueryGroupsResponse is the Query/Groups response type. +/// +/// Since: cosmos-sdk 0.47.1 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgLeaveGroupResponse {} -impl ::prost::Name for MsgLeaveGroupResponse { - const NAME: &'static str = "MsgLeaveGroupResponse"; +pub struct QueryGroupsResponse { + /// `groups` is all the groups present in state. + #[prost(message, repeated, tag = "1")] + pub groups: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryGroupsResponse { + const NAME: &'static str = "QueryGroupsResponse"; const PACKAGE: &'static str = "cosmos.group.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.group.v1.{}", Self::NAME) } } -/// Exec defines modes of execution of a proposal on creation or on new vote. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum Exec { - /// An empty value means that there should be a separate - /// MsgExec request for the proposal to execute. - Unspecified = 0, - /// Try to execute the proposal immediately. - /// If the proposal is not allowed per the DecisionPolicy, - /// the proposal will still be open and could - /// be executed at a later point. - Try = 1, -} -impl Exec { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Exec::Unspecified => "EXEC_UNSPECIFIED", - Exec::Try => "EXEC_TRY", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "EXEC_UNSPECIFIED" => Some(Self::Unspecified), - "EXEC_TRY" => Some(Self::Try), - _ => None, - } - } -} include!("cosmos.group.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.group.v1.tonic.rs b/generated/rust/protos/src/cosmos.group.v1.tonic.rs index fb7f100a9e..6e7b90341f 100644 --- a/generated/rust/protos/src/cosmos.group.v1.tonic.rs +++ b/generated/rust/protos/src/cosmos.group.v1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,10 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn group_info( + pub async fn create_group( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -95,16 +92,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupInfo"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/CreateGroup"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Query", "GroupInfo")); + .insert(GrpcMethod::new("cosmos.group.v1.Msg", "CreateGroup")); self.inner.unary(req, path, codec).await } - pub async fn group_policy_info( + pub async fn update_group_members( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -114,16 +111,16 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupPolicyInfo"); + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/UpdateGroupMembers"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Query", "GroupPolicyInfo")); + .insert(GrpcMethod::new("cosmos.group.v1.Msg", "UpdateGroupMembers")); self.inner.unary(req, path, codec).await } - pub async fn group_members( + pub async fn update_group_admin( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -132,17 +129,20 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupMembers"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/UpdateGroupAdmin"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Query", "GroupMembers")); + .insert(GrpcMethod::new("cosmos.group.v1.Msg", "UpdateGroupAdmin")); self.inner.unary(req, path, codec).await } - pub async fn groups_by_admin( + pub async fn update_group_metadata( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -150,19 +150,20 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupsByAdmin"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/UpdateGroupMetadata"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Query", "GroupsByAdmin")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.group.v1.Msg", + "UpdateGroupMetadata", + )); self.inner.unary(req, path, codec).await } - pub async fn group_policies_by_group( + pub async fn create_group_policy( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -171,19 +172,17 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupPoliciesByGroup"); + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/CreateGroupPolicy"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.group.v1.Query", - "GroupPoliciesByGroup", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.group.v1.Msg", "CreateGroupPolicy")); self.inner.unary(req, path, codec).await } - pub async fn group_policies_by_admin( + pub async fn create_group_with_policy( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -194,19 +193,21 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupPoliciesByAdmin"); + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/CreateGroupWithPolicy"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.group.v1.Query", - "GroupPoliciesByAdmin", + "cosmos.group.v1.Msg", + "CreateGroupWithPolicy", )); self.inner.unary(req, path, codec).await } - pub async fn proposal( + pub async fn update_group_policy_admin( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -214,17 +215,20 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/Proposal"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/UpdateGroupPolicyAdmin"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Query", "Proposal")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.group.v1.Msg", + "UpdateGroupPolicyAdmin", + )); self.inner.unary(req, path, codec).await } - pub async fn proposals_by_group_policy( + pub async fn update_group_policy_decision_policy( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -235,20 +239,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.group.v1.Query/ProposalsByGroupPolicy", + "/cosmos.group.v1.Msg/UpdateGroupPolicyDecisionPolicy", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.group.v1.Query", - "ProposalsByGroupPolicy", + "cosmos.group.v1.Msg", + "UpdateGroupPolicyDecisionPolicy", )); self.inner.unary(req, path, codec).await } - pub async fn vote_by_proposal_voter( + pub async fn update_group_policy_metadata( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -258,19 +262,20 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/VoteByProposalVoter"); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.group.v1.Msg/UpdateGroupPolicyMetadata", + ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.group.v1.Query", - "VoteByProposalVoter", + "cosmos.group.v1.Msg", + "UpdateGroupPolicyMetadata", )); self.inner.unary(req, path, codec).await } - pub async fn votes_by_proposal( + pub async fn submit_proposal( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -279,17 +284,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/VotesByProposal"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/SubmitProposal"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Query", "VotesByProposal")); + .insert(GrpcMethod::new("cosmos.group.v1.Msg", "SubmitProposal")); self.inner.unary(req, path, codec).await } - pub async fn votes_by_voter( + pub async fn withdraw_proposal( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -298,17 +302,17 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/VotesByVoter"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/WithdrawProposal"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Query", "VotesByVoter")); + .insert(GrpcMethod::new("cosmos.group.v1.Msg", "WithdrawProposal")); self.inner.unary(req, path, codec).await } - pub async fn groups_by_member( + pub async fn vote( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -316,18 +320,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupsByMember"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/Vote"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Query", "GroupsByMember")); + .insert(GrpcMethod::new("cosmos.group.v1.Msg", "Vote")); self.inner.unary(req, path, codec).await } - pub async fn tally_result( + pub async fn exec( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -335,16 +337,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/TallyResult"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/Exec"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Query", "TallyResult")); + .insert(GrpcMethod::new("cosmos.group.v1.Msg", "Exec")); self.inner.unary(req, path, codec).await } - pub async fn groups( + pub async fn leave_group( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -353,24 +355,24 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/Groups"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/LeaveGroup"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Query", "Groups")); + .insert(GrpcMethod::new("cosmos.group.v1.Msg", "LeaveGroup")); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -381,7 +383,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -396,7 +398,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -409,7 +414,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -442,10 +447,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn create_group( + pub async fn group_info( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -454,16 +459,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/CreateGroup"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupInfo"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Msg", "CreateGroup")); + .insert(GrpcMethod::new("cosmos.group.v1.Query", "GroupInfo")); self.inner.unary(req, path, codec).await } - pub async fn update_group_members( + pub async fn group_policy_info( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -473,16 +478,16 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/UpdateGroupMembers"); + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupPolicyInfo"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Msg", "UpdateGroupMembers")); + .insert(GrpcMethod::new("cosmos.group.v1.Query", "GroupPolicyInfo")); self.inner.unary(req, path, codec).await } - pub async fn update_group_admin( + pub async fn group_members( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -491,20 +496,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/UpdateGroupAdmin"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupMembers"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Msg", "UpdateGroupAdmin")); + .insert(GrpcMethod::new("cosmos.group.v1.Query", "GroupMembers")); self.inner.unary(req, path, codec).await } - pub async fn update_group_metadata( + pub async fn groups_by_admin( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -512,20 +514,19 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/UpdateGroupMetadata"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupsByAdmin"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.group.v1.Msg", - "UpdateGroupMetadata", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.group.v1.Query", "GroupsByAdmin")); self.inner.unary(req, path, codec).await } - pub async fn create_group_policy( + pub async fn group_policies_by_group( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -534,17 +535,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/CreateGroupPolicy"); + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupPoliciesByGroup"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Msg", "CreateGroupPolicy")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.group.v1.Query", + "GroupPoliciesByGroup", + )); self.inner.unary(req, path, codec).await } - pub async fn create_group_with_policy( + pub async fn group_policies_by_admin( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -555,21 +558,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/CreateGroupWithPolicy"); + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupPoliciesByAdmin"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.group.v1.Msg", - "CreateGroupWithPolicy", + "cosmos.group.v1.Query", + "GroupPoliciesByAdmin", )); self.inner.unary(req, path, codec).await } - pub async fn update_group_policy_admin( + pub async fn proposal( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -577,20 +578,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/UpdateGroupPolicyAdmin"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/Proposal"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.group.v1.Msg", - "UpdateGroupPolicyAdmin", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.group.v1.Query", "Proposal")); self.inner.unary(req, path, codec).await } - pub async fn update_group_policy_decision_policy( + pub async fn proposals_by_group_policy( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -601,20 +599,20 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.group.v1.Msg/UpdateGroupPolicyDecisionPolicy", + "/cosmos.group.v1.Query/ProposalsByGroupPolicy", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.group.v1.Msg", - "UpdateGroupPolicyDecisionPolicy", + "cosmos.group.v1.Query", + "ProposalsByGroupPolicy", )); self.inner.unary(req, path, codec).await } - pub async fn update_group_policy_metadata( + pub async fn vote_by_proposal_voter( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -624,20 +622,19 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.group.v1.Msg/UpdateGroupPolicyMetadata", - ); + let path = + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/VoteByProposalVoter"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.group.v1.Msg", - "UpdateGroupPolicyMetadata", + "cosmos.group.v1.Query", + "VoteByProposalVoter", )); self.inner.unary(req, path, codec).await } - pub async fn submit_proposal( + pub async fn votes_by_proposal( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -646,16 +643,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/SubmitProposal"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/VotesByProposal"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Msg", "SubmitProposal")); + .insert(GrpcMethod::new("cosmos.group.v1.Query", "VotesByProposal")); self.inner.unary(req, path, codec).await } - pub async fn withdraw_proposal( + pub async fn votes_by_voter( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -664,17 +662,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/WithdrawProposal"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/VotesByVoter"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Msg", "WithdrawProposal")); + .insert(GrpcMethod::new("cosmos.group.v1.Query", "VotesByVoter")); self.inner.unary(req, path, codec).await } - pub async fn vote( + pub async fn groups_by_member( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -682,16 +680,18 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/Vote"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/GroupsByMember"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Msg", "Vote")); + .insert(GrpcMethod::new("cosmos.group.v1.Query", "GroupsByMember")); self.inner.unary(req, path, codec).await } - pub async fn exec( + pub async fn tally_result( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -699,16 +699,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/Exec"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/TallyResult"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Msg", "Exec")); + .insert(GrpcMethod::new("cosmos.group.v1.Query", "TallyResult")); self.inner.unary(req, path, codec).await } - pub async fn leave_group( + pub async fn groups( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -717,10 +717,10 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Msg/LeaveGroup"); + let path = http::uri::PathAndQuery::from_static("/cosmos.group.v1.Query/Groups"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.group.v1.Msg", "LeaveGroup")); + .insert(GrpcMethod::new("cosmos.group.v1.Query", "Groups")); self.inner.unary(req, path, codec).await } } diff --git a/generated/rust/protos/src/cosmos.mint.v1beta1.rs b/generated/rust/protos/src/cosmos.mint.v1beta1.rs index bc472f6e0d..dc456a68ce 100644 --- a/generated/rust/protos/src/cosmos.mint.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.mint.v1beta1.rs @@ -65,6 +65,42 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("cosmos.mint.v1beta1.{}", Self::NAME) } } +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/mint parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "cosmos.mint.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.mint.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "cosmos.mint.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.mint.v1beta1.{}", Self::NAME) + } +} /// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -146,41 +182,5 @@ impl ::prost::Name for QueryAnnualProvisionsResponse { ::prost::alloc::format!("cosmos.mint.v1beta1.{}", Self::NAME) } } -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/mint parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.mint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.mint.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.mint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.mint.v1beta1.{}", Self::NAME) - } -} include!("cosmos.mint.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.mint.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.mint.v1beta1.tonic.rs index ac6281e78c..6ec31122d3 100644 --- a/generated/rust/protos/src/cosmos.mint.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.mint.v1beta1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,46 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.mint.v1beta1.Query/Params"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.mint.v1beta1.Query", "Params")); - self.inner.unary(req, path, codec).await - } - pub async fn inflation( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.mint.v1beta1.Query/Inflation"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.mint.v1beta1.Query", "Inflation")); - self.inner.unary(req, path, codec).await - } - pub async fn annual_provisions( + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -132,26 +93,24 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.mint.v1beta1.Query/AnnualProvisions"); + http::uri::PathAndQuery::from_static("/cosmos.mint.v1beta1.Msg/UpdateParams"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.mint.v1beta1.Query", - "AnnualProvisions", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.mint.v1beta1.Msg", "UpdateParams")); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -162,7 +121,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -177,7 +136,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -190,7 +152,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -223,10 +185,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn update_params( + pub async fn params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -235,11 +197,49 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.mint.v1beta1.Msg/UpdateParams"); + let path = http::uri::PathAndQuery::from_static("/cosmos.mint.v1beta1.Query/Params"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.mint.v1beta1.Msg", "UpdateParams")); + .insert(GrpcMethod::new("cosmos.mint.v1beta1.Query", "Params")); + self.inner.unary(req, path, codec).await + } + pub async fn inflation( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cosmos.mint.v1beta1.Query/Inflation"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.mint.v1beta1.Query", "Inflation")); + self.inner.unary(req, path, codec).await + } + pub async fn annual_provisions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.mint.v1beta1.Query/AnnualProvisions"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.mint.v1beta1.Query", + "AnnualProvisions", + )); self.inner.unary(req, path, codec).await } } diff --git a/generated/rust/protos/src/cosmos.nft.v1beta1.rs b/generated/rust/protos/src/cosmos.nft.v1beta1.rs index 89fc0347f8..b7a22049be 100644 --- a/generated/rust/protos/src/cosmos.nft.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.nft.v1beta1.rs @@ -1,70 +1,4 @@ // @generated -/// EventSend is emitted on Msg/Send -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventSend { - /// class_id associated with the nft - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - /// id is a unique identifier of the nft - #[prost(string, tag = "2")] - pub id: ::prost::alloc::string::String, - /// sender is the address of the owner of nft - #[prost(string, tag = "3")] - pub sender: ::prost::alloc::string::String, - /// receiver is the receiver address of nft - #[prost(string, tag = "4")] - pub receiver: ::prost::alloc::string::String, -} -impl ::prost::Name for EventSend { - const NAME: &'static str = "EventSend"; - const PACKAGE: &'static str = "cosmos.nft.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.nft.v1beta1.{}", Self::NAME) - } -} -/// EventMint is emitted on Mint -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventMint { - /// class_id associated with the nft - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - /// id is a unique identifier of the nft - #[prost(string, tag = "2")] - pub id: ::prost::alloc::string::String, - /// owner is the owner address of the nft - #[prost(string, tag = "3")] - pub owner: ::prost::alloc::string::String, -} -impl ::prost::Name for EventMint { - const NAME: &'static str = "EventMint"; - const PACKAGE: &'static str = "cosmos.nft.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.nft.v1beta1.{}", Self::NAME) - } -} -/// EventBurn is emitted on Burn -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventBurn { - /// class_id associated with the nft - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - /// id is a unique identifier of the nft - #[prost(string, tag = "2")] - pub id: ::prost::alloc::string::String, - /// owner is the owner address of the nft - #[prost(string, tag = "3")] - pub owner: ::prost::alloc::string::String, -} -impl ::prost::Name for EventBurn { - const NAME: &'static str = "EventBurn"; - const PACKAGE: &'static str = "cosmos.nft.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.nft.v1beta1.{}", Self::NAME) - } -} /// Class defines the class of the nft type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -161,6 +95,41 @@ impl ::prost::Name for Entry { ::prost::alloc::format!("cosmos.nft.v1beta1.{}", Self::NAME) } } +/// MsgSend represents a message to send a nft from one account to another account. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSend { + /// class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 + #[prost(string, tag = "1")] + pub class_id: ::prost::alloc::string::String, + /// id defines the unique identification of nft + #[prost(string, tag = "2")] + pub id: ::prost::alloc::string::String, + /// sender is the address of the owner of nft + #[prost(string, tag = "3")] + pub sender: ::prost::alloc::string::String, + /// receiver is the receiver address of nft + #[prost(string, tag = "4")] + pub receiver: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgSend { + const NAME: &'static str = "MsgSend"; + const PACKAGE: &'static str = "cosmos.nft.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.nft.v1beta1.{}", Self::NAME) + } +} +/// MsgSendResponse defines the Msg/Send response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSendResponse {} +impl ::prost::Name for MsgSendResponse { + const NAME: &'static str = "MsgSendResponse"; + const PACKAGE: &'static str = "cosmos.nft.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.nft.v1beta1.{}", Self::NAME) + } +} /// QueryBalanceRequest is the request type for the Query/Balance RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -392,14 +361,14 @@ impl ::prost::Name for QueryClassesResponse { ::prost::alloc::format!("cosmos.nft.v1beta1.{}", Self::NAME) } } -/// MsgSend represents a message to send a nft from one account to another account. +/// EventSend is emitted on Msg/Send #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSend { - /// class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 +pub struct EventSend { + /// class_id associated with the nft #[prost(string, tag = "1")] pub class_id: ::prost::alloc::string::String, - /// id defines the unique identification of nft + /// id is a unique identifier of the nft #[prost(string, tag = "2")] pub id: ::prost::alloc::string::String, /// sender is the address of the owner of nft @@ -409,19 +378,50 @@ pub struct MsgSend { #[prost(string, tag = "4")] pub receiver: ::prost::alloc::string::String, } -impl ::prost::Name for MsgSend { - const NAME: &'static str = "MsgSend"; +impl ::prost::Name for EventSend { + const NAME: &'static str = "EventSend"; const PACKAGE: &'static str = "cosmos.nft.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.nft.v1beta1.{}", Self::NAME) } } -/// MsgSendResponse defines the Msg/Send response type. +/// EventMint is emitted on Mint #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSendResponse {} -impl ::prost::Name for MsgSendResponse { - const NAME: &'static str = "MsgSendResponse"; +pub struct EventMint { + /// class_id associated with the nft + #[prost(string, tag = "1")] + pub class_id: ::prost::alloc::string::String, + /// id is a unique identifier of the nft + #[prost(string, tag = "2")] + pub id: ::prost::alloc::string::String, + /// owner is the owner address of the nft + #[prost(string, tag = "3")] + pub owner: ::prost::alloc::string::String, +} +impl ::prost::Name for EventMint { + const NAME: &'static str = "EventMint"; + const PACKAGE: &'static str = "cosmos.nft.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.nft.v1beta1.{}", Self::NAME) + } +} +/// EventBurn is emitted on Burn +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventBurn { + /// class_id associated with the nft + #[prost(string, tag = "1")] + pub class_id: ::prost::alloc::string::String, + /// id is a unique identifier of the nft + #[prost(string, tag = "2")] + pub id: ::prost::alloc::string::String, + /// owner is the owner address of the nft + #[prost(string, tag = "3")] + pub owner: ::prost::alloc::string::String, +} +impl ::prost::Name for EventBurn { + const NAME: &'static str = "EventBurn"; const PACKAGE: &'static str = "cosmos.nft.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.nft.v1beta1.{}", Self::NAME) diff --git a/generated/rust/protos/src/cosmos.nft.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.nft.v1beta1.tonic.rs index a2c8b63b50..f174309e16 100644 --- a/generated/rust/protos/src/cosmos.nft.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.nft.v1beta1.tonic.rs @@ -1,6 +1,106 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::{http::Uri, *}; + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn send( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cosmos.nft.v1beta1.Msg/Send"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.nft.v1beta1.Msg", "Send")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated client implementations. +#[cfg(feature = "client")] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; @@ -209,103 +309,3 @@ pub mod query_client { } } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::{http::Uri, *}; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - >>::Error: - Into + Send + Sync, - { - MsgClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn send( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.nft.v1beta1.Msg/Send"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.nft.v1beta1.Msg", "Send")); - self.inner.unary(req, path, codec).await - } - } -} diff --git a/generated/rust/protos/src/cosmos.slashing.v1beta1.rs b/generated/rust/protos/src/cosmos.slashing.v1beta1.rs index 8312ca6495..5d97348dd2 100644 --- a/generated/rust/protos/src/cosmos.slashing.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.slashing.v1beta1.rs @@ -134,6 +134,67 @@ impl ::prost::Name for MissedBlock { ::prost::alloc::format!("cosmos.slashing.v1beta1.{}", Self::NAME) } } +/// MsgUnjail defines the Msg/Unjail request type +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUnjail { + #[prost(string, tag = "1")] + pub validator_addr: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgUnjail { + const NAME: &'static str = "MsgUnjail"; + const PACKAGE: &'static str = "cosmos.slashing.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.slashing.v1beta1.{}", Self::NAME) + } +} +/// MsgUnjailResponse defines the Msg/Unjail response type +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUnjailResponse {} +impl ::prost::Name for MsgUnjailResponse { + const NAME: &'static str = "MsgUnjailResponse"; + const PACKAGE: &'static str = "cosmos.slashing.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.slashing.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/slashing parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "cosmos.slashing.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.slashing.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "cosmos.slashing.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.slashing.v1beta1.{}", Self::NAME) + } +} /// QueryParamsRequest is the request type for the Query/Params RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -224,66 +285,5 @@ impl ::prost::Name for QuerySigningInfosResponse { ::prost::alloc::format!("cosmos.slashing.v1beta1.{}", Self::NAME) } } -/// MsgUnjail defines the Msg/Unjail request type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUnjail { - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgUnjail { - const NAME: &'static str = "MsgUnjail"; - const PACKAGE: &'static str = "cosmos.slashing.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.slashing.v1beta1.{}", Self::NAME) - } -} -/// MsgUnjailResponse defines the Msg/Unjail response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUnjailResponse {} -impl ::prost::Name for MsgUnjailResponse { - const NAME: &'static str = "MsgUnjailResponse"; - const PACKAGE: &'static str = "cosmos.slashing.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.slashing.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/slashing parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.slashing.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.slashing.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.slashing.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.slashing.v1beta1.{}", Self::NAME) - } -} include!("cosmos.slashing.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.slashing.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.slashing.v1beta1.tonic.rs index 23fc40b25c..1b3fd6b094 100644 --- a/generated/rust/protos/src/cosmos.slashing.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.slashing.v1beta1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,11 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn params( + pub async fn unjail( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -95,38 +91,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.slashing.v1beta1.Query/Params"); + let path = http::uri::PathAndQuery::from_static("/cosmos.slashing.v1beta1.Msg/Unjail"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.slashing.v1beta1.Query", "Params")); - self.inner.unary(req, path, codec).await - } - pub async fn signing_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.slashing.v1beta1.Query/SigningInfo"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.slashing.v1beta1.Query", - "SigningInfo", - )); + .insert(GrpcMethod::new("cosmos.slashing.v1beta1.Msg", "Unjail")); self.inner.unary(req, path, codec).await } - pub async fn signing_infos( + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -136,11 +110,11 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.slashing.v1beta1.Query/SigningInfos"); + http::uri::PathAndQuery::from_static("/cosmos.slashing.v1beta1.Msg/UpdateParams"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.slashing.v1beta1.Query", - "SigningInfos", + "cosmos.slashing.v1beta1.Msg", + "UpdateParams", )); self.inner.unary(req, path, codec).await } @@ -148,14 +122,14 @@ pub mod query_client { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -166,7 +140,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -181,7 +155,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -194,7 +171,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -227,10 +204,11 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn unjail( + pub async fn params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -238,16 +216,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.slashing.v1beta1.Msg/Unjail"); + let path = + http::uri::PathAndQuery::from_static("/cosmos.slashing.v1beta1.Query/Params"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.slashing.v1beta1.Msg", "Unjail")); + .insert(GrpcMethod::new("cosmos.slashing.v1beta1.Query", "Params")); self.inner.unary(req, path, codec).await } - pub async fn update_params( + pub async fn signing_info( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -257,11 +236,32 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.slashing.v1beta1.Msg/UpdateParams"); + http::uri::PathAndQuery::from_static("/cosmos.slashing.v1beta1.Query/SigningInfo"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.slashing.v1beta1.Msg", - "UpdateParams", + "cosmos.slashing.v1beta1.Query", + "SigningInfo", + )); + self.inner.unary(req, path, codec).await + } + pub async fn signing_infos( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.slashing.v1beta1.Query/SigningInfos"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.slashing.v1beta1.Query", + "SigningInfos", )); self.inner.unary(req, path, codec).await } diff --git a/generated/rust/protos/src/cosmos.staking.v1beta1.rs b/generated/rust/protos/src/cosmos.staking.v1beta1.rs index 9d85a92257..9f64af4f3f 100644 --- a/generated/rust/protos/src/cosmos.staking.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.staking.v1beta1.rs @@ -1,104 +1,4 @@ // @generated -/// StakeAuthorization defines authorization for delegate/undelegate/redelegate. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StakeAuthorization { - /// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - /// empty, there is no spend limit and any amount of coins can be delegated. - #[prost(message, optional, tag = "1")] - pub max_tokens: ::core::option::Option, - /// authorization_type defines one of AuthorizationType. - #[prost(enumeration = "AuthorizationType", tag = "4")] - pub authorization_type: i32, - /// validators is the oneof that represents either allow_list or deny_list - #[prost(oneof = "stake_authorization::Validators", tags = "2, 3")] - pub validators: ::core::option::Option, -} -/// Nested message and enum types in `StakeAuthorization`. -pub mod stake_authorization { - /// Validators defines list of validator addresses. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ValidatorsList { - #[prost(string, repeated, tag = "1")] - pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - } - impl ::prost::Name for ValidatorsList { - const NAME: &'static str = "Validators"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.StakeAuthorization.{}", Self::NAME) - } - } - /// validators is the oneof that represents either allow_list or deny_list - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Validators { - /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - /// account. - #[prost(message, tag = "2")] - AllowList(ValidatorsList), - /// deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - #[prost(message, tag = "3")] - DenyList(ValidatorsList), - } -} -impl ::prost::Name for StakeAuthorization { - const NAME: &'static str = "StakeAuthorization"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// AuthorizationType defines the type of staking module authorization type -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum AuthorizationType { - /// AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type - Unspecified = 0, - /// AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate - Delegate = 1, - /// AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate - Undelegate = 2, - /// AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate - Redelegate = 3, - /// AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation - CancelUnbondingDelegation = 4, -} -impl AuthorizationType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - AuthorizationType::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED", - AuthorizationType::Delegate => "AUTHORIZATION_TYPE_DELEGATE", - AuthorizationType::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE", - AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", - AuthorizationType::CancelUnbondingDelegation => { - "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" - } - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "AUTHORIZATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate), - "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate), - "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate), - "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" => { - Some(Self::CancelUnbondingDelegation) - } - _ => None, - } - } -} /// HistoricalInfo contains header and validator information for a given block. /// It is stored as part of staking module's state, which persists the `n` most /// recent HistoricalInfo @@ -651,6 +551,106 @@ impl Infraction { } } } +/// StakeAuthorization defines authorization for delegate/undelegate/redelegate. +/// +/// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StakeAuthorization { + /// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + /// empty, there is no spend limit and any amount of coins can be delegated. + #[prost(message, optional, tag = "1")] + pub max_tokens: ::core::option::Option, + /// authorization_type defines one of AuthorizationType. + #[prost(enumeration = "AuthorizationType", tag = "4")] + pub authorization_type: i32, + /// validators is the oneof that represents either allow_list or deny_list + #[prost(oneof = "stake_authorization::Validators", tags = "2, 3")] + pub validators: ::core::option::Option, +} +/// Nested message and enum types in `StakeAuthorization`. +pub mod stake_authorization { + /// Validators defines list of validator addresses. + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ValidatorsList { + #[prost(string, repeated, tag = "1")] + pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for ValidatorsList { + const NAME: &'static str = "Validators"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.StakeAuthorization.{}", Self::NAME) + } + } + /// validators is the oneof that represents either allow_list or deny_list + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Validators { + /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + /// account. + #[prost(message, tag = "2")] + AllowList(ValidatorsList), + /// deny_list specifies list of validator addresses to whom grantee can not delegate tokens. + #[prost(message, tag = "3")] + DenyList(ValidatorsList), + } +} +impl ::prost::Name for StakeAuthorization { + const NAME: &'static str = "StakeAuthorization"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// AuthorizationType defines the type of staking module authorization type +/// +/// Since: cosmos-sdk 0.43 +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AuthorizationType { + /// AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type + Unspecified = 0, + /// AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate + Delegate = 1, + /// AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate + Undelegate = 2, + /// AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate + Redelegate = 3, + /// AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation + CancelUnbondingDelegation = 4, +} +impl AuthorizationType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AuthorizationType::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED", + AuthorizationType::Delegate => "AUTHORIZATION_TYPE_DELEGATE", + AuthorizationType::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE", + AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", + AuthorizationType::CancelUnbondingDelegation => { + "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" + } + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTHORIZATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate), + "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate), + "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate), + "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" => { + Some(Self::CancelUnbondingDelegation) + } + _ => None, + } + } +} /// GenesisState defines the staking module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -707,54 +707,306 @@ impl ::prost::Name for LastValidatorPower { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// QueryValidatorsRequest is request type for Query/Validators RPC method. +/// MsgCreateValidator defines a SDK message for creating a new validator. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorsRequest { - /// status enables to query for validators matching a given status. - #[prost(string, tag = "1")] - pub status: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. +pub struct MsgCreateValidator { + #[prost(message, optional, tag = "1")] + pub description: ::core::option::Option, #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, + pub commission: ::core::option::Option, + #[prost(string, tag = "3")] + pub min_self_delegation: ::prost::alloc::string::String, + /// Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. + /// The validator address bytes and delegator address bytes refer to the same account while creating validator (defer + /// only in bech32 notation). + #[deprecated] + #[prost(string, tag = "4")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "5")] + pub validator_address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "6")] + pub pubkey: ::core::option::Option<::pbjson_types::Any>, + #[prost(message, optional, tag = "7")] + pub value: ::core::option::Option, } -impl ::prost::Name for QueryValidatorsRequest { - const NAME: &'static str = "QueryValidatorsRequest"; +impl ::prost::Name for MsgCreateValidator { + const NAME: &'static str = "MsgCreateValidator"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// QueryValidatorsResponse is response type for the Query/Validators RPC method +/// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorsResponse { - /// validators contains all the queried validators. - #[prost(message, repeated, tag = "1")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for QueryValidatorsResponse { - const NAME: &'static str = "QueryValidatorsResponse"; +pub struct MsgCreateValidatorResponse {} +impl ::prost::Name for MsgCreateValidatorResponse { + const NAME: &'static str = "MsgCreateValidatorResponse"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// QueryValidatorRequest is response type for the Query/Validator RPC method +/// MsgEditValidator defines a SDK message for editing an existing validator. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorRequest { - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryValidatorRequest { - const NAME: &'static str = "QueryValidatorRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { +pub struct MsgEditValidator { + #[prost(message, optional, tag = "1")] + pub description: ::core::option::Option, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, + /// We pass a reference to the new commission rate and min self delegation as + /// it's not mandatory to update. If not updated, the deserialized rate will be + /// zero with no way to distinguish if an update was intended. + /// REF: #2373 + #[prost(string, tag = "3")] + pub commission_rate: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub min_self_delegation: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgEditValidator { + const NAME: &'static str = "MsgEditValidator"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgEditValidatorResponse defines the Msg/EditValidator response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgEditValidatorResponse {} +impl ::prost::Name for MsgEditValidatorResponse { + const NAME: &'static str = "MsgEditValidatorResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgDelegate defines a SDK message for performing a delegation of coins +/// from a delegator to a validator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgDelegate { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub amount: ::core::option::Option, +} +impl ::prost::Name for MsgDelegate { + const NAME: &'static str = "MsgDelegate"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgDelegateResponse defines the Msg/Delegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgDelegateResponse {} +impl ::prost::Name for MsgDelegateResponse { + const NAME: &'static str = "MsgDelegateResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgBeginRedelegate defines a SDK message for performing a redelegation +/// of coins from a delegator and source validator to a destination validator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgBeginRedelegate { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_src_address: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub validator_dst_address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "4")] + pub amount: ::core::option::Option, +} +impl ::prost::Name for MsgBeginRedelegate { + const NAME: &'static str = "MsgBeginRedelegate"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgBeginRedelegateResponse { + #[prost(message, optional, tag = "1")] + pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, +} +impl ::prost::Name for MsgBeginRedelegateResponse { + const NAME: &'static str = "MsgBeginRedelegateResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgUndelegate defines a SDK message for performing an undelegation from a +/// delegate and a validator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUndelegate { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub amount: ::core::option::Option, +} +impl ::prost::Name for MsgUndelegate { + const NAME: &'static str = "MsgUndelegate"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgUndelegateResponse defines the Msg/Undelegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUndelegateResponse { + #[prost(message, optional, tag = "1")] + pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, + /// amount returns the amount of undelegated coins + /// + /// Since: cosmos-sdk 0.50 + #[prost(message, optional, tag = "2")] + pub amount: ::core::option::Option, +} +impl ::prost::Name for MsgUndelegateResponse { + const NAME: &'static str = "MsgUndelegateResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgCancelUnbondingDelegation { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, + /// amount is always less than or equal to unbonding delegation entry balance + #[prost(message, optional, tag = "3")] + pub amount: ::core::option::Option, + /// creation_height is the height which the unbonding took place. + #[prost(int64, tag = "4")] + pub creation_height: i64, +} +impl ::prost::Name for MsgCancelUnbondingDelegation { + const NAME: &'static str = "MsgCancelUnbondingDelegation"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgCancelUnbondingDelegationResponse +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgCancelUnbondingDelegationResponse {} +impl ::prost::Name for MsgCancelUnbondingDelegationResponse { + const NAME: &'static str = "MsgCancelUnbondingDelegationResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/staking parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryValidatorsRequest is request type for Query/Validators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryValidatorsRequest { + /// status enables to query for validators matching a given status. + #[prost(string, tag = "1")] + pub status: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryValidatorsRequest { + const NAME: &'static str = "QueryValidatorsRequest"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryValidatorsResponse is response type for the Query/Validators RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryValidatorsResponse { + /// validators contains all the queried validators. + #[prost(message, repeated, tag = "1")] + pub validators: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +impl ::prost::Name for QueryValidatorsResponse { + const NAME: &'static str = "QueryValidatorsResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryValidatorRequest is response type for the Query/Validator RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryValidatorRequest { + /// validator_addr defines the validator address to query for. + #[prost(string, tag = "1")] + pub validator_addr: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryValidatorRequest { + const NAME: &'static str = "QueryValidatorRequest"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } @@ -1190,257 +1442,5 @@ impl ::prost::Name for QueryParamsResponse { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgCreateValidator defines a SDK message for creating a new validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateValidator { - #[prost(message, optional, tag = "1")] - pub description: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub commission: ::core::option::Option, - #[prost(string, tag = "3")] - pub min_self_delegation: ::prost::alloc::string::String, - /// Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. - /// The validator address bytes and delegator address bytes refer to the same account while creating validator (defer - /// only in bech32 notation). - #[deprecated] - #[prost(string, tag = "4")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "6")] - pub pubkey: ::core::option::Option<::pbjson_types::Any>, - #[prost(message, optional, tag = "7")] - pub value: ::core::option::Option, -} -impl ::prost::Name for MsgCreateValidator { - const NAME: &'static str = "MsgCreateValidator"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateValidatorResponse {} -impl ::prost::Name for MsgCreateValidatorResponse { - const NAME: &'static str = "MsgCreateValidatorResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgEditValidator defines a SDK message for editing an existing validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgEditValidator { - #[prost(message, optional, tag = "1")] - pub description: ::core::option::Option, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// We pass a reference to the new commission rate and min self delegation as - /// it's not mandatory to update. If not updated, the deserialized rate will be - /// zero with no way to distinguish if an update was intended. - /// REF: #2373 - #[prost(string, tag = "3")] - pub commission_rate: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub min_self_delegation: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgEditValidator { - const NAME: &'static str = "MsgEditValidator"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgEditValidatorResponse defines the Msg/EditValidator response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgEditValidatorResponse {} -impl ::prost::Name for MsgEditValidatorResponse { - const NAME: &'static str = "MsgEditValidatorResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgDelegate defines a SDK message for performing a delegation of coins -/// from a delegator to a validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDelegate { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, -} -impl ::prost::Name for MsgDelegate { - const NAME: &'static str = "MsgDelegate"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgDelegateResponse defines the Msg/Delegate response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDelegateResponse {} -impl ::prost::Name for MsgDelegateResponse { - const NAME: &'static str = "MsgDelegateResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgBeginRedelegate defines a SDK message for performing a redelegation -/// of coins from a delegator and source validator to a destination validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgBeginRedelegate { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_src_address: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub validator_dst_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "4")] - pub amount: ::core::option::Option, -} -impl ::prost::Name for MsgBeginRedelegate { - const NAME: &'static str = "MsgBeginRedelegate"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgBeginRedelegateResponse { - #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, -} -impl ::prost::Name for MsgBeginRedelegateResponse { - const NAME: &'static str = "MsgBeginRedelegateResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgUndelegate defines a SDK message for performing an undelegation from a -/// delegate and a validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUndelegate { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, -} -impl ::prost::Name for MsgUndelegate { - const NAME: &'static str = "MsgUndelegate"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgUndelegateResponse defines the Msg/Undelegate response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUndelegateResponse { - #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, - /// amount returns the amount of undelegated coins - /// - /// Since: cosmos-sdk 0.50 - #[prost(message, optional, tag = "2")] - pub amount: ::core::option::Option, -} -impl ::prost::Name for MsgUndelegateResponse { - const NAME: &'static str = "MsgUndelegateResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUnbondingDelegation { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// amount is always less than or equal to unbonding delegation entry balance - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, - /// creation_height is the height which the unbonding took place. - #[prost(int64, tag = "4")] - pub creation_height: i64, -} -impl ::prost::Name for MsgCancelUnbondingDelegation { - const NAME: &'static str = "MsgCancelUnbondingDelegation"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgCancelUnbondingDelegationResponse -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUnbondingDelegationResponse {} -impl ::prost::Name for MsgCancelUnbondingDelegationResponse { - const NAME: &'static str = "MsgCancelUnbondingDelegationResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/staking parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} include!("cosmos.staking.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.staking.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.staking.v1beta1.tonic.rs index 8a83ed01d2..6cb55a9f1e 100644 --- a/generated/rust/protos/src/cosmos.staking.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.staking.v1beta1.tonic.rs @@ -1,6 +1,234 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::{http::Uri, *}; + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn create_validator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/CreateValidator"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.staking.v1beta1.Msg", + "CreateValidator", + )); + self.inner.unary(req, path, codec).await + } + pub async fn edit_validator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/EditValidator"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.staking.v1beta1.Msg", + "EditValidator", + )); + self.inner.unary(req, path, codec).await + } + pub async fn delegate( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/Delegate"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Delegate")); + self.inner.unary(req, path, codec).await + } + pub async fn begin_redelegate( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/BeginRedelegate"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.staking.v1beta1.Msg", + "BeginRedelegate", + )); + self.inner.unary(req, path, codec).await + } + pub async fn undelegate( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/Undelegate"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Undelegate")); + self.inner.unary(req, path, codec).await + } + pub async fn cancel_unbonding_delegation( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.staking.v1beta1.Msg", + "CancelUnbondingDelegation", + )); + self.inner.unary(req, path, codec).await + } + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/UpdateParams"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.staking.v1beta1.Msg", + "UpdateParams", + )); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated client implementations. +#[cfg(feature = "client")] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; @@ -392,231 +620,3 @@ pub mod query_client { } } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::{http::Uri, *}; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - >>::Error: - Into + Send + Sync, - { - MsgClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn create_validator( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/CreateValidator"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.staking.v1beta1.Msg", - "CreateValidator", - )); - self.inner.unary(req, path, codec).await - } - pub async fn edit_validator( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/EditValidator"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.staking.v1beta1.Msg", - "EditValidator", - )); - self.inner.unary(req, path, codec).await - } - pub async fn delegate( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/Delegate"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Delegate")); - self.inner.unary(req, path, codec).await - } - pub async fn begin_redelegate( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/BeginRedelegate"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.staking.v1beta1.Msg", - "BeginRedelegate", - )); - self.inner.unary(req, path, codec).await - } - pub async fn undelegate( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/Undelegate"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Undelegate")); - self.inner.unary(req, path, codec).await - } - pub async fn cancel_unbonding_delegation( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.staking.v1beta1.Msg", - "CancelUnbondingDelegation", - )); - self.inner.unary(req, path, codec).await - } - pub async fn update_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.staking.v1beta1.Msg/UpdateParams"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.staking.v1beta1.Msg", - "UpdateParams", - )); - self.inner.unary(req, path, codec).await - } - } -} diff --git a/generated/rust/protos/src/cosmos.upgrade.v1beta1.rs b/generated/rust/protos/src/cosmos.upgrade.v1beta1.rs index 89579e046b..62a0fdf58c 100644 --- a/generated/rust/protos/src/cosmos.upgrade.v1beta1.rs +++ b/generated/rust/protos/src/cosmos.upgrade.v1beta1.rs @@ -108,6 +108,73 @@ impl ::prost::Name for ModuleVersion { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) } } +/// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. +/// +/// Since: cosmos-sdk 0.46 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSoftwareUpgrade { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// plan is the upgrade plan. + #[prost(message, optional, tag = "2")] + pub plan: ::core::option::Option, +} +impl ::prost::Name for MsgSoftwareUpgrade { + const NAME: &'static str = "MsgSoftwareUpgrade"; + const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + } +} +/// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. +/// +/// Since: cosmos-sdk 0.46 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSoftwareUpgradeResponse {} +impl ::prost::Name for MsgSoftwareUpgradeResponse { + const NAME: &'static str = "MsgSoftwareUpgradeResponse"; + const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + } +} +/// MsgCancelUpgrade is the Msg/CancelUpgrade request type. +/// +/// Since: cosmos-sdk 0.46 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgCancelUpgrade { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgCancelUpgrade { + const NAME: &'static str = "MsgCancelUpgrade"; + const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + } +} +/// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. +/// +/// Since: cosmos-sdk 0.46 +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgCancelUpgradeResponse {} +impl ::prost::Name for MsgCancelUpgradeResponse { + const NAME: &'static str = "MsgCancelUpgradeResponse"; + const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + } +} /// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC /// method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] @@ -278,72 +345,5 @@ impl ::prost::Name for QueryAuthorityResponse { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) } } -/// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. -/// -/// Since: cosmos-sdk 0.46 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSoftwareUpgrade { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// plan is the upgrade plan. - #[prost(message, optional, tag = "2")] - pub plan: ::core::option::Option, -} -impl ::prost::Name for MsgSoftwareUpgrade { - const NAME: &'static str = "MsgSoftwareUpgrade"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. -/// -/// Since: cosmos-sdk 0.46 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSoftwareUpgradeResponse {} -impl ::prost::Name for MsgSoftwareUpgradeResponse { - const NAME: &'static str = "MsgSoftwareUpgradeResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// MsgCancelUpgrade is the Msg/CancelUpgrade request type. -/// -/// Since: cosmos-sdk 0.46 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUpgrade { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgCancelUpgrade { - const NAME: &'static str = "MsgCancelUpgrade"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. -/// -/// Since: cosmos-sdk 0.46 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUpgradeResponse {} -impl ::prost::Name for MsgCancelUpgradeResponse { - const NAME: &'static str = "MsgCancelUpgradeResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} include!("cosmos.upgrade.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/cosmos.upgrade.v1beta1.tonic.rs b/generated/rust/protos/src/cosmos.upgrade.v1beta1.tonic.rs index 06577809f6..bd7ea1db91 100644 --- a/generated/rust/protos/src/cosmos.upgrade.v1beta1.tonic.rs +++ b/generated/rust/protos/src/cosmos.upgrade.v1beta1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,10 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn current_plan( + pub async fn software_upgrade( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -96,18 +93,18 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.upgrade.v1beta1.Query/CurrentPlan"); + http::uri::PathAndQuery::from_static("/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.upgrade.v1beta1.Query", - "CurrentPlan", + "cosmos.upgrade.v1beta1.Msg", + "SoftwareUpgrade", )); self.inner.unary(req, path, codec).await } - pub async fn applied_plan( + pub async fn cancel_upgrade( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -117,91 +114,26 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.upgrade.v1beta1.Query/AppliedPlan"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.upgrade.v1beta1.Query", - "AppliedPlan", - )); - self.inner.unary(req, path, codec).await - } - pub async fn upgraded_consensus_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmos.upgrade.v1beta1.Query", - "UpgradedConsensusState", - )); - self.inner.unary(req, path, codec).await - } - pub async fn module_versions( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.upgrade.v1beta1.Query/ModuleVersions", - ); + http::uri::PathAndQuery::from_static("/cosmos.upgrade.v1beta1.Msg/CancelUpgrade"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.upgrade.v1beta1.Query", - "ModuleVersions", + "cosmos.upgrade.v1beta1.Msg", + "CancelUpgrade", )); self.inner.unary(req, path, codec).await } - pub async fn authority( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmos.upgrade.v1beta1.Query/Authority"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "Authority")); - self.inner.unary(req, path, codec).await - } } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -212,7 +144,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -227,7 +159,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -240,7 +175,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -273,10 +208,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn software_upgrade( + pub async fn current_plan( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -286,18 +221,18 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade"); + http::uri::PathAndQuery::from_static("/cosmos.upgrade.v1beta1.Query/CurrentPlan"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.upgrade.v1beta1.Msg", - "SoftwareUpgrade", + "cosmos.upgrade.v1beta1.Query", + "CurrentPlan", )); self.inner.unary(req, path, codec).await } - pub async fn cancel_upgrade( + pub async fn applied_plan( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -307,13 +242,78 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmos.upgrade.v1beta1.Msg/CancelUpgrade"); + http::uri::PathAndQuery::from_static("/cosmos.upgrade.v1beta1.Query/AppliedPlan"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmos.upgrade.v1beta1.Msg", - "CancelUpgrade", + "cosmos.upgrade.v1beta1.Query", + "AppliedPlan", + )); + self.inner.unary(req, path, codec).await + } + pub async fn upgraded_consensus_state( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.upgrade.v1beta1.Query", + "UpgradedConsensusState", + )); + self.inner.unary(req, path, codec).await + } + pub async fn module_versions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.upgrade.v1beta1.Query/ModuleVersions", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmos.upgrade.v1beta1.Query", + "ModuleVersions", )); self.inner.unary(req, path, codec).await } + pub async fn authority( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmos.upgrade.v1beta1.Query/Authority"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "Authority")); + self.inner.unary(req, path, codec).await + } } } diff --git a/generated/rust/protos/src/cosmwasm.wasm.v1.rs b/generated/rust/protos/src/cosmwasm.wasm.v1.rs index 85ce565d3a..755f7253ac 100644 --- a/generated/rust/protos/src/cosmwasm.wasm.v1.rs +++ b/generated/rust/protos/src/cosmwasm.wasm.v1.rs @@ -1,4 +1,60 @@ // @generated +/// MsgIBCSend +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgIbcSend { + /// the channel by which the packet will be sent + #[prost(string, tag = "2")] + pub channel: ::prost::alloc::string::String, + /// Timeout height relative to the current block height. + /// The timeout is disabled when set to 0. + #[prost(uint64, tag = "4")] + pub timeout_height: u64, + /// Timeout timestamp (in nanoseconds) relative to the current block timestamp. + /// The timeout is disabled when set to 0. + #[prost(uint64, tag = "5")] + pub timeout_timestamp: u64, + /// Data is the payload to transfer. We must not make assumption what format or + /// content is in here. + #[prost(bytes = "vec", tag = "6")] + pub data: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgIbcSend { + const NAME: &'static str = "MsgIBCSend"; + const PACKAGE: &'static str = "cosmwasm.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) + } +} +/// MsgIBCSendResponse +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgIbcSendResponse { + /// Sequence number of the IBC packet sent + #[prost(uint64, tag = "1")] + pub sequence: u64, +} +impl ::prost::Name for MsgIbcSendResponse { + const NAME: &'static str = "MsgIBCSendResponse"; + const PACKAGE: &'static str = "cosmwasm.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) + } +} +/// MsgIBCCloseChannel port and channel need to be owned by the contract +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgIbcCloseChannel { + #[prost(string, tag = "2")] + pub channel: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgIbcCloseChannel { + const NAME: &'static str = "MsgIBCCloseChannel"; + const PACKAGE: &'static str = "cosmwasm.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) + } +} /// AccessTypeParam #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -509,62 +565,6 @@ impl ::prost::Name for Sequence { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgIBCSend -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcSend { - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub channel: ::prost::alloc::string::String, - /// Timeout height relative to the current block height. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "4")] - pub timeout_height: u64, - /// Timeout timestamp (in nanoseconds) relative to the current block timestamp. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "5")] - pub timeout_timestamp: u64, - /// Data is the payload to transfer. We must not make assumption what format or - /// content is in here. - #[prost(bytes = "vec", tag = "6")] - pub data: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgIbcSend { - const NAME: &'static str = "MsgIBCSend"; - const PACKAGE: &'static str = "cosmwasm.wasm.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) - } -} -/// MsgIBCSendResponse -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcSendResponse { - /// Sequence number of the IBC packet sent - #[prost(uint64, tag = "1")] - pub sequence: u64, -} -impl ::prost::Name for MsgIbcSendResponse { - const NAME: &'static str = "MsgIBCSendResponse"; - const PACKAGE: &'static str = "cosmwasm.wasm.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) - } -} -/// MsgIBCCloseChannel port and channel need to be owned by the contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcCloseChannel { - #[prost(string, tag = "2")] - pub channel: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgIbcCloseChannel { - const NAME: &'static str = "MsgIBCCloseChannel"; - const PACKAGE: &'static str = "cosmwasm.wasm.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) - } -} /// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for /// an explicit StoreCodeProposal. To submit WASM code to the system, /// a simple MsgStoreCode can be invoked from the x/gov module via @@ -985,1133 +985,1133 @@ impl ::prost::Name for StoreAndInstantiateContractProposal { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC -/// method +/// MsgStoreCode submit Wasm code to the system #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractInfoRequest { - /// address is the address of the contract to query +pub struct MsgStoreCode { + /// Sender is the actor that signed the messages #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, + pub sender: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "2")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission access control to apply on contract creation, + /// optional + #[prost(message, optional, tag = "5")] + pub instantiate_permission: ::core::option::Option, } -impl ::prost::Name for QueryContractInfoRequest { - const NAME: &'static str = "QueryContractInfoRequest"; +impl ::prost::Name for MsgStoreCode { + const NAME: &'static str = "MsgStoreCode"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC -/// method +/// MsgStoreCodeResponse returns store result data. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractInfoResponse { - /// address is the address of the contract - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub contract_info: ::core::option::Option, +pub struct MsgStoreCodeResponse { + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "1")] + pub code_id: u64, + /// Checksum is the sha256 hash of the stored code + #[prost(bytes = "vec", tag = "2")] + pub checksum: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryContractInfoResponse { - const NAME: &'static str = "QueryContractInfoResponse"; +impl ::prost::Name for MsgStoreCodeResponse { + const NAME: &'static str = "MsgStoreCodeResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryContractHistoryRequest is the request type for the Query/ContractHistory -/// RPC method +/// MsgInstantiateContract create a new smart contract instance for the given +/// code id. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractHistoryRequest { - /// address is the address of the contract to query +pub struct MsgInstantiateContract { + /// Sender is the that actor that signed the messages #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, + pub sender: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "2")] + pub admin: ::prost::alloc::string::String, + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "3")] + pub code_id: u64, + /// Label is optional metadata to be stored with a contract instance. + #[prost(string, tag = "4")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "5")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "6")] + pub funds: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryContractHistoryRequest { - const NAME: &'static str = "QueryContractHistoryRequest"; +impl ::prost::Name for MsgInstantiateContract { + const NAME: &'static str = "MsgInstantiateContract"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryContractHistoryResponse is the response type for the -/// Query/ContractHistory RPC method +/// MsgInstantiateContractResponse return instantiation result data #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractHistoryResponse { - #[prost(message, repeated, tag = "1")] - pub entries: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, +pub struct MsgInstantiateContractResponse { + /// Address is the bech32 address of the new contract instance. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryContractHistoryResponse { - const NAME: &'static str = "QueryContractHistoryResponse"; +impl ::prost::Name for MsgInstantiateContractResponse { + const NAME: &'static str = "MsgInstantiateContractResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryContractsByCodeRequest is the request type for the Query/ContractsByCode -/// RPC method +/// MsgInstantiateContract2 create a new smart contract instance for the given +/// code id with a predicable address. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractsByCodeRequest { - /// grpc-gateway_out does not support Go style CodID - #[prost(uint64, tag = "1")] +pub struct MsgInstantiateContract2 { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "2")] + pub admin: ::prost::alloc::string::String, + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "3")] pub code_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, + /// Label is optional metadata to be stored with a contract instance. + #[prost(string, tag = "4")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "5")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "6")] + pub funds: ::prost::alloc::vec::Vec, + /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. + #[prost(bytes = "vec", tag = "7")] + pub salt: ::prost::alloc::vec::Vec, + /// FixMsg include the msg value into the hash for the predictable address. + /// Default is false + #[prost(bool, tag = "8")] + pub fix_msg: bool, } -impl ::prost::Name for QueryContractsByCodeRequest { - const NAME: &'static str = "QueryContractsByCodeRequest"; +impl ::prost::Name for MsgInstantiateContract2 { + const NAME: &'static str = "MsgInstantiateContract2"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryContractsByCodeResponse is the response type for the -/// Query/ContractsByCode RPC method +/// MsgInstantiateContract2Response return instantiation result data #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractsByCodeResponse { - /// contracts are a set of contract addresses - #[prost(string, repeated, tag = "1")] - pub contracts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, +pub struct MsgInstantiateContract2Response { + /// Address is the bech32 address of the new contract instance. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryContractsByCodeResponse { - const NAME: &'static str = "QueryContractsByCodeResponse"; +impl ::prost::Name for MsgInstantiateContract2Response { + const NAME: &'static str = "MsgInstantiateContract2Response"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryAllContractStateRequest is the request type for the -/// Query/AllContractState RPC method +/// MsgExecuteContract submits the given message data to a smart contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllContractStateRequest { - /// address is the address of the contract +pub struct MsgExecuteContract { + /// Sender is the that actor that signed the messages #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + pub contract: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract + #[prost(bytes = "vec", tag = "3")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on execution + #[prost(message, repeated, tag = "5")] + pub funds: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryAllContractStateRequest { - const NAME: &'static str = "QueryAllContractStateRequest"; +impl ::prost::Name for MsgExecuteContract { + const NAME: &'static str = "MsgExecuteContract"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryAllContractStateResponse is the response type for the -/// Query/AllContractState RPC method +/// MsgExecuteContractResponse returns execution result data. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllContractStateResponse { - #[prost(message, repeated, tag = "1")] - pub models: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, +pub struct MsgExecuteContractResponse { + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryAllContractStateResponse { - const NAME: &'static str = "QueryAllContractStateResponse"; +impl ::prost::Name for MsgExecuteContractResponse { + const NAME: &'static str = "MsgExecuteContractResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryRawContractStateRequest is the request type for the -/// Query/RawContractState RPC method +/// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryRawContractStateRequest { - /// address is the address of the contract +pub struct MsgMigrateContract { + /// Sender is the that actor that signed the messages #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - pub query_data: ::prost::alloc::vec::Vec, + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + pub contract: ::prost::alloc::string::String, + /// CodeID references the new WASM code + #[prost(uint64, tag = "3")] + pub code_id: u64, + /// Msg json encoded message to be passed to the contract on migration + #[prost(bytes = "vec", tag = "4")] + pub msg: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryRawContractStateRequest { - const NAME: &'static str = "QueryRawContractStateRequest"; +impl ::prost::Name for MsgMigrateContract { + const NAME: &'static str = "MsgMigrateContract"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryRawContractStateResponse is the response type for the -/// Query/RawContractState RPC method +/// MsgMigrateContractResponse returns contract migration result data. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryRawContractStateResponse { - /// Data contains the raw store data +pub struct MsgMigrateContractResponse { + /// Data contains same raw bytes returned as data from the wasm contract. + /// (May be empty) #[prost(bytes = "vec", tag = "1")] pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryRawContractStateResponse { - const NAME: &'static str = "QueryRawContractStateResponse"; +impl ::prost::Name for MsgMigrateContractResponse { + const NAME: &'static str = "MsgMigrateContractResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QuerySmartContractStateRequest is the request type for the -/// Query/SmartContractState RPC method +/// MsgUpdateAdmin sets a new admin for a smart contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySmartContractStateRequest { - /// address is the address of the contract +pub struct MsgUpdateAdmin { + /// Sender is the that actor that signed the messages #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// QueryData contains the query data passed to the contract - #[prost(bytes = "vec", tag = "2")] - pub query_data: ::prost::alloc::vec::Vec, + pub sender: ::prost::alloc::string::String, + /// NewAdmin address to be set + #[prost(string, tag = "2")] + pub new_admin: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, } -impl ::prost::Name for QuerySmartContractStateRequest { - const NAME: &'static str = "QuerySmartContractStateRequest"; +impl ::prost::Name for MsgUpdateAdmin { + const NAME: &'static str = "MsgUpdateAdmin"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QuerySmartContractStateResponse is the response type for the -/// Query/SmartContractState RPC method +/// MsgUpdateAdminResponse returns empty data #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySmartContractStateResponse { - /// Data contains the json data returned from the smart contract - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for QuerySmartContractStateResponse { - const NAME: &'static str = "QuerySmartContractStateResponse"; +pub struct MsgUpdateAdminResponse {} +impl ::prost::Name for MsgUpdateAdminResponse { + const NAME: &'static str = "MsgUpdateAdminResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryCodeRequest is the request type for the Query/Code RPC method +/// MsgClearAdmin removes any admin stored for a smart contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodeRequest { - /// grpc-gateway_out does not support Go style CodID - #[prost(uint64, tag = "1")] - pub code_id: u64, +pub struct MsgClearAdmin { + /// Sender is the actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, } -impl ::prost::Name for QueryCodeRequest { - const NAME: &'static str = "QueryCodeRequest"; +impl ::prost::Name for MsgClearAdmin { + const NAME: &'static str = "MsgClearAdmin"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// CodeInfoResponse contains code meta data from CodeInfo +/// MsgClearAdminResponse returns empty data #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CodeInfoResponse { - /// id for legacy support - #[prost(uint64, tag = "1")] - pub code_id: u64, - #[prost(string, tag = "2")] - pub creator: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - pub data_hash: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub instantiate_permission: ::core::option::Option, -} -impl ::prost::Name for CodeInfoResponse { - const NAME: &'static str = "CodeInfoResponse"; +pub struct MsgClearAdminResponse {} +impl ::prost::Name for MsgClearAdminResponse { + const NAME: &'static str = "MsgClearAdminResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryCodeResponse is the response type for the Query/Code RPC method +/// MsgUpdateInstantiateConfig updates instantiate config for a smart contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodeResponse { - #[prost(message, optional, tag = "1")] - pub code_info: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, +pub struct MsgUpdateInstantiateConfig { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// CodeID references the stored WASM code + #[prost(uint64, tag = "2")] + pub code_id: u64, + /// NewInstantiatePermission is the new access control + #[prost(message, optional, tag = "3")] + pub new_instantiate_permission: ::core::option::Option, } -impl ::prost::Name for QueryCodeResponse { - const NAME: &'static str = "QueryCodeResponse"; +impl ::prost::Name for MsgUpdateInstantiateConfig { + const NAME: &'static str = "MsgUpdateInstantiateConfig"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryCodesRequest is the request type for the Query/Codes RPC method +/// MsgUpdateInstantiateConfigResponse returns empty data #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: - ::core::option::Option, -} -impl ::prost::Name for QueryCodesRequest { - const NAME: &'static str = "QueryCodesRequest"; +pub struct MsgUpdateInstantiateConfigResponse {} +impl ::prost::Name for MsgUpdateInstantiateConfigResponse { + const NAME: &'static str = "MsgUpdateInstantiateConfigResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryCodesResponse is the response type for the Query/Codes RPC method +/// MsgUpdateParams is the MsgUpdateParams request type. +/// +/// Since: 0.40 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodesResponse { - #[prost(message, repeated, tag = "1")] - pub code_infos: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. +pub struct MsgUpdateParams { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/wasm parameters to update. + /// + /// NOTE: All parameters must be supplied. #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, + pub params: ::core::option::Option, } -impl ::prost::Name for QueryCodesResponse { - const NAME: &'static str = "QueryCodesResponse"; +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes -/// RPC method +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: 0.40 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPinnedCodesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -impl ::prost::Name for QueryPinnedCodesRequest { - const NAME: &'static str = "QueryPinnedCodesRequest"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryPinnedCodesResponse is the response type for the -/// Query/PinnedCodes RPC method +/// MsgSudoContract is the MsgSudoContract request type. +/// +/// Since: 0.40 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPinnedCodesResponse { - #[prost(uint64, repeated, packed = "false", tag = "1")] - pub code_ids: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -impl ::prost::Name for QueryPinnedCodesResponse { - const NAME: &'static str = "QueryPinnedCodesResponse"; - const PACKAGE: &'static str = "cosmwasm.wasm.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) - } -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; +pub struct MsgSudoContract { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + pub contract: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract as sudo + #[prost(bytes = "vec", tag = "3")] + pub msg: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgSudoContract { + const NAME: &'static str = "MsgSudoContract"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryParamsResponse is the response type for the Query/Params RPC method. +/// MsgSudoContractResponse defines the response structure for executing a +/// MsgSudoContract message. +/// +/// Since: 0.40 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, +pub struct MsgSudoContractResponse { + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; +impl ::prost::Name for MsgSudoContractResponse { + const NAME: &'static str = "MsgSudoContractResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryContractsByCreatorRequest is the request type for the -/// Query/ContractsByCreator RPC method. +/// MsgPinCodes is the MsgPinCodes request type. +/// +/// Since: 0.40 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractsByCreatorRequest { - /// CreatorAddress is the address of contract creator +pub struct MsgPinCodes { + /// Authority is the address of the governance account. #[prost(string, tag = "1")] - pub creator_address: ::prost::alloc::string::String, - /// Pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, + pub authority: ::prost::alloc::string::String, + /// CodeIDs references the new WASM codes + #[prost(uint64, repeated, packed = "false", tag = "2")] + pub code_ids: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryContractsByCreatorRequest { - const NAME: &'static str = "QueryContractsByCreatorRequest"; +impl ::prost::Name for MsgPinCodes { + const NAME: &'static str = "MsgPinCodes"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryContractsByCreatorResponse is the response type for the -/// Query/ContractsByCreator RPC method. +/// MsgPinCodesResponse defines the response structure for executing a +/// MsgPinCodes message. +/// +/// Since: 0.40 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractsByCreatorResponse { - /// ContractAddresses result set - #[prost(string, repeated, tag = "1")] - pub contract_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -impl ::prost::Name for QueryContractsByCreatorResponse { - const NAME: &'static str = "QueryContractsByCreatorResponse"; +pub struct MsgPinCodesResponse {} +impl ::prost::Name for MsgPinCodesResponse { + const NAME: &'static str = "MsgPinCodesResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryBuildAddressRequest is the request type for the Query/BuildAddress RPC -/// method. +/// MsgUnpinCodes is the MsgUnpinCodes request type. +/// +/// Since: 0.40 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryBuildAddressRequest { - /// CodeHash is the hash of the code +pub struct MsgUnpinCodes { + /// Authority is the address of the governance account. #[prost(string, tag = "1")] - pub code_hash: ::prost::alloc::string::String, - /// CreatorAddress is the address of the contract instantiator - #[prost(string, tag = "2")] - pub creator_address: ::prost::alloc::string::String, - /// Salt is a hex encoded salt - #[prost(string, tag = "3")] - pub salt: ::prost::alloc::string::String, - /// InitArgs are optional json encoded init args to be used in contract address - /// building if provided - #[prost(bytes = "vec", tag = "4")] - pub init_args: ::prost::alloc::vec::Vec, + pub authority: ::prost::alloc::string::String, + /// CodeIDs references the WASM codes + #[prost(uint64, repeated, packed = "false", tag = "2")] + pub code_ids: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryBuildAddressRequest { - const NAME: &'static str = "QueryBuildAddressRequest"; +impl ::prost::Name for MsgUnpinCodes { + const NAME: &'static str = "MsgUnpinCodes"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// QueryBuildAddressResponse is the response type for the Query/BuildAddress RPC -/// method. +/// MsgUnpinCodesResponse defines the response structure for executing a +/// MsgUnpinCodes message. +/// +/// Since: 0.40 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryBuildAddressResponse { - /// Address is the contract address - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryBuildAddressResponse { - const NAME: &'static str = "QueryBuildAddressResponse"; +pub struct MsgUnpinCodesResponse {} +impl ::prost::Name for MsgUnpinCodesResponse { + const NAME: &'static str = "MsgUnpinCodesResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgStoreCode submit Wasm code to the system +/// MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract +/// request type. +/// +/// Since: 0.40 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreCode { - /// Sender is the actor that signed the messages +pub struct MsgStoreAndInstantiateContract { + /// Authority is the address of the governance account. #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, + pub authority: ::prost::alloc::string::String, /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "2")] + #[prost(bytes = "vec", tag = "3")] pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission access control to apply on contract creation, - /// optional - #[prost(message, optional, tag = "5")] + /// InstantiatePermission to apply on contract creation, optional + #[prost(message, optional, tag = "4")] pub instantiate_permission: ::core::option::Option, + /// UnpinCode code on upload, optional. As default the uploaded contract is + /// pinned to cache. + #[prost(bool, tag = "5")] + pub unpin_code: bool, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "6")] + pub admin: ::prost::alloc::string::String, + /// Label is optional metadata to be stored with a constract instance. + #[prost(string, tag = "7")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "8")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred from the authority account to the contract + /// on instantiation + #[prost(message, repeated, tag = "9")] + pub funds: ::prost::alloc::vec::Vec, + /// Source is the URL where the code is hosted + #[prost(string, tag = "10")] + pub source: ::prost::alloc::string::String, + /// Builder is the docker image used to build the code deterministically, used + /// for smart contract verification + #[prost(string, tag = "11")] + pub builder: ::prost::alloc::string::String, + /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart + /// contract verification + #[prost(bytes = "vec", tag = "12")] + pub code_hash: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgStoreCode { - const NAME: &'static str = "MsgStoreCode"; +impl ::prost::Name for MsgStoreAndInstantiateContract { + const NAME: &'static str = "MsgStoreAndInstantiateContract"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgStoreCodeResponse returns store result data. +/// MsgStoreAndInstantiateContractResponse defines the response structure +/// for executing a MsgStoreAndInstantiateContract message. +/// +/// Since: 0.40 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreCodeResponse { - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "1")] - pub code_id: u64, - /// Checksum is the sha256 hash of the stored code +pub struct MsgStoreAndInstantiateContractResponse { + /// Address is the bech32 address of the new contract instance. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract #[prost(bytes = "vec", tag = "2")] - pub checksum: ::prost::alloc::vec::Vec, + pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgStoreCodeResponse { - const NAME: &'static str = "MsgStoreCodeResponse"; +impl ::prost::Name for MsgStoreAndInstantiateContractResponse { + const NAME: &'static str = "MsgStoreAndInstantiateContractResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgInstantiateContract create a new smart contract instance for the given -/// code id. +/// MsgAddCodeUploadParamsAddresses is the +/// MsgAddCodeUploadParamsAddresses request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract { - /// Sender is the that actor that signed the messages +pub struct MsgAddCodeUploadParamsAddresses { + /// Authority is the address of the governance account. #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, + pub authority: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "2")] + pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -impl ::prost::Name for MsgInstantiateContract { - const NAME: &'static str = "MsgInstantiateContract"; +impl ::prost::Name for MsgAddCodeUploadParamsAddresses { + const NAME: &'static str = "MsgAddCodeUploadParamsAddresses"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgInstantiateContractResponse return instantiation result data +/// MsgAddCodeUploadParamsAddressesResponse defines the response +/// structure for executing a MsgAddCodeUploadParamsAddresses message. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContractResponse { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgInstantiateContractResponse { - const NAME: &'static str = "MsgInstantiateContractResponse"; +pub struct MsgAddCodeUploadParamsAddressesResponse {} +impl ::prost::Name for MsgAddCodeUploadParamsAddressesResponse { + const NAME: &'static str = "MsgAddCodeUploadParamsAddressesResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgInstantiateContract2 create a new smart contract instance for the given -/// code id with a predicable address. +/// MsgRemoveCodeUploadParamsAddresses is the +/// MsgRemoveCodeUploadParamsAddresses request type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract2 { - /// Sender is the that actor that signed the messages +pub struct MsgRemoveCodeUploadParamsAddresses { + /// Authority is the address of the governance account. #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, - /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. - #[prost(bytes = "vec", tag = "7")] - pub salt: ::prost::alloc::vec::Vec, - /// FixMsg include the msg value into the hash for the predictable address. - /// Default is false - #[prost(bool, tag = "8")] - pub fix_msg: bool, + pub authority: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "2")] + pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -impl ::prost::Name for MsgInstantiateContract2 { - const NAME: &'static str = "MsgInstantiateContract2"; +impl ::prost::Name for MsgRemoveCodeUploadParamsAddresses { + const NAME: &'static str = "MsgRemoveCodeUploadParamsAddresses"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgInstantiateContract2Response return instantiation result data +/// MsgRemoveCodeUploadParamsAddressesResponse defines the response +/// structure for executing a MsgRemoveCodeUploadParamsAddresses message. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract2Response { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgInstantiateContract2Response { - const NAME: &'static str = "MsgInstantiateContract2Response"; +pub struct MsgRemoveCodeUploadParamsAddressesResponse {} +impl ::prost::Name for MsgRemoveCodeUploadParamsAddressesResponse { + const NAME: &'static str = "MsgRemoveCodeUploadParamsAddressesResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgExecuteContract submits the given message data to a smart contract +/// MsgStoreAndMigrateContract is the MsgStoreAndMigrateContract +/// request type. +/// +/// Since: 0.42 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecuteContract { - /// Sender is the that actor that signed the messages +pub struct MsgStoreAndMigrateContract { + /// Authority is the address of the governance account. #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, + pub authority: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "2")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission to apply on contract creation, optional + #[prost(message, optional, tag = "3")] + pub instantiate_permission: ::core::option::Option, /// Contract is the address of the smart contract - #[prost(string, tag = "2")] + #[prost(string, tag = "4")] pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract - #[prost(bytes = "vec", tag = "3")] + /// Msg json encoded message to be passed to the contract on migration + #[prost(bytes = "vec", tag = "5")] pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on execution - #[prost(message, repeated, tag = "5")] - pub funds: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgExecuteContract { - const NAME: &'static str = "MsgExecuteContract"; +impl ::prost::Name for MsgStoreAndMigrateContract { + const NAME: &'static str = "MsgStoreAndMigrateContract"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgExecuteContractResponse returns execution result data. +/// MsgStoreAndMigrateContractResponse defines the response structure +/// for executing a MsgStoreAndMigrateContract message. +/// +/// Since: 0.42 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecuteContractResponse { +pub struct MsgStoreAndMigrateContractResponse { + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "1")] + pub code_id: u64, + /// Checksum is the sha256 hash of the stored code + #[prost(bytes = "vec", tag = "2")] + pub checksum: ::prost::alloc::vec::Vec, /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "1")] + #[prost(bytes = "vec", tag = "3")] pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgExecuteContractResponse { - const NAME: &'static str = "MsgExecuteContractResponse"; +impl ::prost::Name for MsgStoreAndMigrateContractResponse { + const NAME: &'static str = "MsgStoreAndMigrateContractResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract +/// MsgUpdateContractLabel sets a new label for a smart contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMigrateContract { +pub struct MsgUpdateContractLabel { /// Sender is the that actor that signed the messages #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract + /// NewLabel string to be set #[prost(string, tag = "2")] + pub new_label: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] pub contract: ::prost::alloc::string::String, - /// CodeID references the new WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Msg json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "4")] - pub msg: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgMigrateContract { - const NAME: &'static str = "MsgMigrateContract"; +impl ::prost::Name for MsgUpdateContractLabel { + const NAME: &'static str = "MsgUpdateContractLabel"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgMigrateContractResponse returns contract migration result data. +/// MsgUpdateContractLabelResponse returns empty data #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMigrateContractResponse { - /// Data contains same raw bytes returned as data from the wasm contract. - /// (May be empty) - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgMigrateContractResponse { - const NAME: &'static str = "MsgMigrateContractResponse"; +pub struct MsgUpdateContractLabelResponse {} +impl ::prost::Name for MsgUpdateContractLabelResponse { + const NAME: &'static str = "MsgUpdateContractLabelResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgUpdateAdmin sets a new admin for a smart contract +/// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC +/// method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateAdmin { - /// Sender is the that actor that signed the messages +pub struct QueryContractInfoRequest { + /// address is the address of the contract to query #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// NewAdmin address to be set - #[prost(string, tag = "2")] - pub new_admin: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, + pub address: ::prost::alloc::string::String, } -impl ::prost::Name for MsgUpdateAdmin { - const NAME: &'static str = "MsgUpdateAdmin"; +impl ::prost::Name for QueryContractInfoRequest { + const NAME: &'static str = "QueryContractInfoRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgUpdateAdminResponse returns empty data +/// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC +/// method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateAdminResponse {} -impl ::prost::Name for MsgUpdateAdminResponse { - const NAME: &'static str = "MsgUpdateAdminResponse"; +pub struct QueryContractInfoResponse { + /// address is the address of the contract + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub contract_info: ::core::option::Option, +} +impl ::prost::Name for QueryContractInfoResponse { + const NAME: &'static str = "QueryContractInfoResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgClearAdmin removes any admin stored for a smart contract +/// QueryContractHistoryRequest is the request type for the Query/ContractHistory +/// RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgClearAdmin { - /// Sender is the actor that signed the messages +pub struct QueryContractHistoryRequest { + /// address is the address of the contract to query #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, + pub address: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, } -impl ::prost::Name for MsgClearAdmin { - const NAME: &'static str = "MsgClearAdmin"; +impl ::prost::Name for QueryContractHistoryRequest { + const NAME: &'static str = "QueryContractHistoryRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgClearAdminResponse returns empty data +/// QueryContractHistoryResponse is the response type for the +/// Query/ContractHistory RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgClearAdminResponse {} -impl ::prost::Name for MsgClearAdminResponse { - const NAME: &'static str = "MsgClearAdminResponse"; +pub struct QueryContractHistoryResponse { + #[prost(message, repeated, tag = "1")] + pub entries: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, +} +impl ::prost::Name for QueryContractHistoryResponse { + const NAME: &'static str = "QueryContractHistoryResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgUpdateInstantiateConfig updates instantiate config for a smart contract +/// QueryContractsByCodeRequest is the request type for the Query/ContractsByCode +/// RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateInstantiateConfig { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// CodeID references the stored WASM code - #[prost(uint64, tag = "2")] +pub struct QueryContractsByCodeRequest { + /// grpc-gateway_out does not support Go style CodID + #[prost(uint64, tag = "1")] pub code_id: u64, - /// NewInstantiatePermission is the new access control - #[prost(message, optional, tag = "3")] - pub new_instantiate_permission: ::core::option::Option, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, } -impl ::prost::Name for MsgUpdateInstantiateConfig { - const NAME: &'static str = "MsgUpdateInstantiateConfig"; +impl ::prost::Name for QueryContractsByCodeRequest { + const NAME: &'static str = "QueryContractsByCodeRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgUpdateInstantiateConfigResponse returns empty data +/// QueryContractsByCodeResponse is the response type for the +/// Query/ContractsByCode RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateInstantiateConfigResponse {} -impl ::prost::Name for MsgUpdateInstantiateConfigResponse { - const NAME: &'static str = "MsgUpdateInstantiateConfigResponse"; +pub struct QueryContractsByCodeResponse { + /// contracts are a set of contract addresses + #[prost(string, repeated, tag = "1")] + pub contracts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, +} +impl ::prost::Name for QueryContractsByCodeResponse { + const NAME: &'static str = "QueryContractsByCodeResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.40 +/// QueryAllContractStateRequest is the request type for the +/// Query/AllContractState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. +pub struct QueryAllContractStateRequest { + /// address is the address of the contract #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/wasm parameters to update. - /// - /// NOTE: All parameters must be supplied. + pub address: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, + pub pagination: + ::core::option::Option, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +impl ::prost::Name for QueryAllContractStateRequest { + const NAME: &'static str = "QueryAllContractStateRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.40 +/// QueryAllContractStateResponse is the response type for the +/// Query/AllContractState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryAllContractStateResponse { + #[prost(message, repeated, tag = "1")] + pub models: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, +} +impl ::prost::Name for QueryAllContractStateResponse { + const NAME: &'static str = "QueryAllContractStateResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgSudoContract is the MsgSudoContract request type. -/// -/// Since: 0.40 +/// QueryRawContractStateRequest is the request type for the +/// Query/RawContractState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSudoContract { - /// Authority is the address of the governance account. +pub struct QueryRawContractStateRequest { + /// address is the address of the contract #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract as sudo - #[prost(bytes = "vec", tag = "3")] - pub msg: ::prost::alloc::vec::Vec, + pub address: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "2")] + pub query_data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgSudoContract { - const NAME: &'static str = "MsgSudoContract"; +impl ::prost::Name for QueryRawContractStateRequest { + const NAME: &'static str = "QueryRawContractStateRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgSudoContractResponse defines the response structure for executing a -/// MsgSudoContract message. -/// -/// Since: 0.40 +/// QueryRawContractStateResponse is the response type for the +/// Query/RawContractState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSudoContractResponse { - /// Data contains bytes to returned from the contract +pub struct QueryRawContractStateResponse { + /// Data contains the raw store data #[prost(bytes = "vec", tag = "1")] pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgSudoContractResponse { - const NAME: &'static str = "MsgSudoContractResponse"; +impl ::prost::Name for QueryRawContractStateResponse { + const NAME: &'static str = "QueryRawContractStateResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgPinCodes is the MsgPinCodes request type. -/// -/// Since: 0.40 +/// QuerySmartContractStateRequest is the request type for the +/// Query/SmartContractState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPinCodes { - /// Authority is the address of the governance account. +pub struct QuerySmartContractStateRequest { + /// address is the address of the contract #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// CodeIDs references the new WASM codes - #[prost(uint64, repeated, packed = "false", tag = "2")] - pub code_ids: ::prost::alloc::vec::Vec, + pub address: ::prost::alloc::string::String, + /// QueryData contains the query data passed to the contract + #[prost(bytes = "vec", tag = "2")] + pub query_data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgPinCodes { - const NAME: &'static str = "MsgPinCodes"; +impl ::prost::Name for QuerySmartContractStateRequest { + const NAME: &'static str = "QuerySmartContractStateRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgPinCodesResponse defines the response structure for executing a -/// MsgPinCodes message. -/// -/// Since: 0.40 +/// QuerySmartContractStateResponse is the response type for the +/// Query/SmartContractState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPinCodesResponse {} -impl ::prost::Name for MsgPinCodesResponse { - const NAME: &'static str = "MsgPinCodesResponse"; +pub struct QuerySmartContractStateResponse { + /// Data contains the json data returned from the smart contract + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for QuerySmartContractStateResponse { + const NAME: &'static str = "QuerySmartContractStateResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgUnpinCodes is the MsgUnpinCodes request type. -/// -/// Since: 0.40 +/// QueryCodeRequest is the request type for the Query/Code RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUnpinCodes { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// CodeIDs references the WASM codes - #[prost(uint64, repeated, packed = "false", tag = "2")] - pub code_ids: ::prost::alloc::vec::Vec, +pub struct QueryCodeRequest { + /// grpc-gateway_out does not support Go style CodID + #[prost(uint64, tag = "1")] + pub code_id: u64, } -impl ::prost::Name for MsgUnpinCodes { - const NAME: &'static str = "MsgUnpinCodes"; +impl ::prost::Name for QueryCodeRequest { + const NAME: &'static str = "QueryCodeRequest"; + const PACKAGE: &'static str = "cosmwasm.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) + } +} +/// CodeInfoResponse contains code meta data from CodeInfo +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CodeInfoResponse { + /// id for legacy support + #[prost(uint64, tag = "1")] + pub code_id: u64, + #[prost(string, tag = "2")] + pub creator: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "3")] + pub data_hash: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "6")] + pub instantiate_permission: ::core::option::Option, +} +impl ::prost::Name for CodeInfoResponse { + const NAME: &'static str = "CodeInfoResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgUnpinCodesResponse defines the response structure for executing a -/// MsgUnpinCodes message. -/// -/// Since: 0.40 +/// QueryCodeResponse is the response type for the Query/Code RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUnpinCodesResponse {} -impl ::prost::Name for MsgUnpinCodesResponse { - const NAME: &'static str = "MsgUnpinCodesResponse"; +pub struct QueryCodeResponse { + #[prost(message, optional, tag = "1")] + pub code_info: ::core::option::Option, + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for QueryCodeResponse { + const NAME: &'static str = "QueryCodeResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract -/// request type. -/// -/// Since: 0.40 +/// QueryCodesRequest is the request type for the Query/Codes RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreAndInstantiateContract { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "3")] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission to apply on contract creation, optional - #[prost(message, optional, tag = "4")] - pub instantiate_permission: ::core::option::Option, - /// UnpinCode code on upload, optional. As default the uploaded contract is - /// pinned to cache. - #[prost(bool, tag = "5")] - pub unpin_code: bool, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "6")] - pub admin: ::prost::alloc::string::String, - /// Label is optional metadata to be stored with a constract instance. - #[prost(string, tag = "7")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "8")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred from the authority account to the contract - /// on instantiation - #[prost(message, repeated, tag = "9")] - pub funds: ::prost::alloc::vec::Vec, - /// Source is the URL where the code is hosted - #[prost(string, tag = "10")] - pub source: ::prost::alloc::string::String, - /// Builder is the docker image used to build the code deterministically, used - /// for smart contract verification - #[prost(string, tag = "11")] - pub builder: ::prost::alloc::string::String, - /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart - /// contract verification - #[prost(bytes = "vec", tag = "12")] - pub code_hash: ::prost::alloc::vec::Vec, +pub struct QueryCodesRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: + ::core::option::Option, } -impl ::prost::Name for MsgStoreAndInstantiateContract { - const NAME: &'static str = "MsgStoreAndInstantiateContract"; +impl ::prost::Name for QueryCodesRequest { + const NAME: &'static str = "QueryCodesRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgStoreAndInstantiateContractResponse defines the response structure -/// for executing a MsgStoreAndInstantiateContract message. -/// -/// Since: 0.40 +/// QueryCodesResponse is the response type for the Query/Codes RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreAndInstantiateContractResponse { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, +pub struct QueryCodesResponse { + #[prost(message, repeated, tag = "1")] + pub code_infos: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, } -impl ::prost::Name for MsgStoreAndInstantiateContractResponse { - const NAME: &'static str = "MsgStoreAndInstantiateContractResponse"; +impl ::prost::Name for QueryCodesResponse { + const NAME: &'static str = "QueryCodesResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgAddCodeUploadParamsAddresses is the -/// MsgAddCodeUploadParamsAddresses request type. +/// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes +/// RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAddCodeUploadParamsAddresses { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "2")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +pub struct QueryPinnedCodesRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, } -impl ::prost::Name for MsgAddCodeUploadParamsAddresses { - const NAME: &'static str = "MsgAddCodeUploadParamsAddresses"; +impl ::prost::Name for QueryPinnedCodesRequest { + const NAME: &'static str = "QueryPinnedCodesRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgAddCodeUploadParamsAddressesResponse defines the response -/// structure for executing a MsgAddCodeUploadParamsAddresses message. +/// QueryPinnedCodesResponse is the response type for the +/// Query/PinnedCodes RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAddCodeUploadParamsAddressesResponse {} -impl ::prost::Name for MsgAddCodeUploadParamsAddressesResponse { - const NAME: &'static str = "MsgAddCodeUploadParamsAddressesResponse"; +pub struct QueryPinnedCodesResponse { + #[prost(uint64, repeated, packed = "false", tag = "1")] + pub code_ids: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, +} +impl ::prost::Name for QueryPinnedCodesResponse { + const NAME: &'static str = "QueryPinnedCodesResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgRemoveCodeUploadParamsAddresses is the -/// MsgRemoveCodeUploadParamsAddresses request type. +/// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRemoveCodeUploadParamsAddresses { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "2")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for MsgRemoveCodeUploadParamsAddresses { - const NAME: &'static str = "MsgRemoveCodeUploadParamsAddresses"; +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgRemoveCodeUploadParamsAddressesResponse defines the response -/// structure for executing a MsgRemoveCodeUploadParamsAddresses message. +/// QueryParamsResponse is the response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRemoveCodeUploadParamsAddressesResponse {} -impl ::prost::Name for MsgRemoveCodeUploadParamsAddressesResponse { - const NAME: &'static str = "MsgRemoveCodeUploadParamsAddressesResponse"; +pub struct QueryParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgStoreAndMigrateContract is the MsgStoreAndMigrateContract -/// request type. -/// -/// Since: 0.42 +/// QueryContractsByCreatorRequest is the request type for the +/// Query/ContractsByCreator RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreAndMigrateContract { - /// Authority is the address of the governance account. +pub struct QueryContractsByCreatorRequest { + /// CreatorAddress is the address of contract creator #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "2")] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission to apply on contract creation, optional - #[prost(message, optional, tag = "3")] - pub instantiate_permission: ::core::option::Option, - /// Contract is the address of the smart contract - #[prost(string, tag = "4")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, + pub creator_address: ::prost::alloc::string::String, + /// Pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, } -impl ::prost::Name for MsgStoreAndMigrateContract { - const NAME: &'static str = "MsgStoreAndMigrateContract"; +impl ::prost::Name for QueryContractsByCreatorRequest { + const NAME: &'static str = "QueryContractsByCreatorRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgStoreAndMigrateContractResponse defines the response structure -/// for executing a MsgStoreAndMigrateContract message. -/// -/// Since: 0.42 +/// QueryContractsByCreatorResponse is the response type for the +/// Query/ContractsByCreator RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreAndMigrateContractResponse { - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "1")] - pub code_id: u64, - /// Checksum is the sha256 hash of the stored code - #[prost(bytes = "vec", tag = "2")] - pub checksum: ::prost::alloc::vec::Vec, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "3")] - pub data: ::prost::alloc::vec::Vec, +pub struct QueryContractsByCreatorResponse { + /// ContractAddresses result set + #[prost(string, repeated, tag = "1")] + pub contract_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, } -impl ::prost::Name for MsgStoreAndMigrateContractResponse { - const NAME: &'static str = "MsgStoreAndMigrateContractResponse"; +impl ::prost::Name for QueryContractsByCreatorResponse { + const NAME: &'static str = "QueryContractsByCreatorResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgUpdateContractLabel sets a new label for a smart contract +/// QueryBuildAddressRequest is the request type for the Query/BuildAddress RPC +/// method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateContractLabel { - /// Sender is the that actor that signed the messages +pub struct QueryBuildAddressRequest { + /// CodeHash is the hash of the code #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// NewLabel string to be set + pub code_hash: ::prost::alloc::string::String, + /// CreatorAddress is the address of the contract instantiator #[prost(string, tag = "2")] - pub new_label: ::prost::alloc::string::String, - /// Contract is the address of the smart contract + pub creator_address: ::prost::alloc::string::String, + /// Salt is a hex encoded salt #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, + pub salt: ::prost::alloc::string::String, + /// InitArgs are optional json encoded init args to be used in contract address + /// building if provided + #[prost(bytes = "vec", tag = "4")] + pub init_args: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgUpdateContractLabel { - const NAME: &'static str = "MsgUpdateContractLabel"; +impl ::prost::Name for QueryBuildAddressRequest { + const NAME: &'static str = "QueryBuildAddressRequest"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) } } -/// MsgUpdateContractLabelResponse returns empty data +/// QueryBuildAddressResponse is the response type for the Query/BuildAddress RPC +/// method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateContractLabelResponse {} -impl ::prost::Name for MsgUpdateContractLabelResponse { - const NAME: &'static str = "MsgUpdateContractLabelResponse"; +pub struct QueryBuildAddressResponse { + /// Address is the contract address + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryBuildAddressResponse { + const NAME: &'static str = "QueryBuildAddressResponse"; const PACKAGE: &'static str = "cosmwasm.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmwasm.wasm.v1.{}", Self::NAME) diff --git a/generated/rust/protos/src/cosmwasm.wasm.v1.tonic.rs b/generated/rust/protos/src/cosmwasm.wasm.v1.tonic.rs index 88a9de81cd..c647696ab2 100644 --- a/generated/rust/protos/src/cosmwasm.wasm.v1.tonic.rs +++ b/generated/rust/protos/src/cosmwasm.wasm.v1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,10 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn contract_info( + pub async fn store_code( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -95,16 +92,62 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractInfo"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/StoreCode"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractInfo")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "StoreCode")); self.inner.unary(req, path, codec).await } - pub async fn contract_history( + pub async fn instantiate_contract( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/InstantiateContract"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "InstantiateContract", + )); + self.inner.unary(req, path, codec).await + } + pub async fn instantiate_contract2( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/InstantiateContract2"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "InstantiateContract2", + )); + self.inner.unary(req, path, codec).await + } + pub async fn execute_contract( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -114,16 +157,16 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractHistory"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ExecuteContract"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractHistory")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ExecuteContract")); self.inner.unary(req, path, codec).await } - pub async fn contracts_by_code( + pub async fn migrate_contract( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -133,16 +176,16 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractsByCode"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/MigrateContract"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractsByCode")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "MigrateContract")); self.inner.unary(req, path, codec).await } - pub async fn all_contract_state( + pub async fn update_admin( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -151,19 +194,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/AllContractState"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateAdmin"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "AllContractState", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UpdateAdmin")); self.inner.unary(req, path, codec).await } - pub async fn raw_contract_state( + pub async fn clear_admin( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -172,20 +212,17 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/RawContractState"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ClearAdmin"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "RawContractState", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ClearAdmin")); self.inner.unary(req, path, codec).await } - pub async fn smart_contract_state( + pub async fn update_instantiate_config( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -195,19 +232,21 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/SmartContractState"); + let path = http::uri::PathAndQuery::from_static( + "/cosmwasm.wasm.v1.Msg/UpdateInstantiateConfig", + ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "SmartContractState", + "cosmwasm.wasm.v1.Msg", + "UpdateInstantiateConfig", )); self.inner.unary(req, path, codec).await } - pub async fn code( + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -215,16 +254,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Code"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateParams"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Code")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UpdateParams")); self.inner.unary(req, path, codec).await } - pub async fn codes( + pub async fn sudo_contract( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -233,16 +272,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Codes"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/SudoContract"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Codes")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "SudoContract")); self.inner.unary(req, path, codec).await } - pub async fn pinned_codes( + pub async fn pin_codes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -251,16 +290,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/PinnedCodes"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/PinCodes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "PinnedCodes")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "PinCodes")); self.inner.unary(req, path, codec).await } - pub async fn params( + pub async fn unpin_codes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -269,17 +308,17 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Params"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UnpinCodes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Params")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UnpinCodes")); self.inner.unary(req, path, codec).await } - pub async fn contracts_by_creator( + pub async fn store_and_instantiate_contract( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -289,20 +328,23 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractsByCreator"); + let path = http::uri::PathAndQuery::from_static( + "/cosmwasm.wasm.v1.Msg/StoreAndInstantiateContract", + ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "ContractsByCreator", + "cosmwasm.wasm.v1.Msg", + "StoreAndInstantiateContract", )); self.inner.unary(req, path, codec).await } - pub async fn build_address( + pub async fn remove_code_upload_params_addresses( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -310,35 +352,110 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/BuildAddress"); + let path = http::uri::PathAndQuery::from_static( + "/cosmwasm.wasm.v1.Msg/RemoveCodeUploadParamsAddresses", + ); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "BuildAddress")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "RemoveCodeUploadParamsAddresses", + )); self.inner.unary(req, path, codec).await } - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::{http::Uri, *}; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) + pub async fn add_code_upload_params_addresses( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmwasm.wasm.v1.Msg/AddCodeUploadParamsAddresses", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "AddCodeUploadParamsAddresses", + )); + self.inner.unary(req, path, codec).await } - } - impl MsgClient + pub async fn store_and_migrate_contract( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmwasm.wasm.v1.Msg/StoreAndMigrateContract", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "StoreAndMigrateContract", + )); + self.inner.unary(req, path, codec).await + } + pub async fn update_contract_label( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateContractLabel"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "UpdateContractLabel", + )); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod query_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::{http::Uri, *}; + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, + } + impl QueryClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -353,7 +470,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -366,7 +486,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -399,10 +519,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn store_code( + pub async fn contract_info( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -411,62 +531,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/StoreCode"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractInfo"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "StoreCode")); - self.inner.unary(req, path, codec).await - } - pub async fn instantiate_contract( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/InstantiateContract"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "InstantiateContract", - )); - self.inner.unary(req, path, codec).await - } - pub async fn instantiate_contract2( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/InstantiateContract2"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "InstantiateContract2", - )); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractInfo")); self.inner.unary(req, path, codec).await } - pub async fn execute_contract( + pub async fn contract_history( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -476,16 +550,16 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ExecuteContract"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractHistory"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ExecuteContract")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractHistory")); self.inner.unary(req, path, codec).await } - pub async fn migrate_contract( + pub async fn contracts_by_code( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -495,16 +569,16 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/MigrateContract"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractsByCode"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "MigrateContract")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractsByCode")); self.inner.unary(req, path, codec).await } - pub async fn update_admin( + pub async fn all_contract_state( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -513,16 +587,19 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateAdmin"); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/AllContractState"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UpdateAdmin")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Query", + "AllContractState", + )); self.inner.unary(req, path, codec).await } - pub async fn clear_admin( + pub async fn raw_contract_state( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -531,17 +608,20 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ClearAdmin"); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/RawContractState"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ClearAdmin")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Query", + "RawContractState", + )); self.inner.unary(req, path, codec).await } - pub async fn update_instantiate_config( + pub async fn smart_contract_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -551,21 +631,19 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmwasm.wasm.v1.Msg/UpdateInstantiateConfig", - ); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/SmartContractState"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "UpdateInstantiateConfig", + "cosmwasm.wasm.v1.Query", + "SmartContractState", )); self.inner.unary(req, path, codec).await } - pub async fn update_params( + pub async fn code( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -573,16 +651,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateParams"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Code"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UpdateParams")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Code")); self.inner.unary(req, path, codec).await } - pub async fn sudo_contract( + pub async fn codes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -591,16 +669,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/SudoContract"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Codes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "SudoContract")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Codes")); self.inner.unary(req, path, codec).await } - pub async fn pin_codes( + pub async fn pinned_codes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -609,16 +687,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/PinCodes"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/PinnedCodes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "PinCodes")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "PinnedCodes")); self.inner.unary(req, path, codec).await } - pub async fn unpin_codes( + pub async fn params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -627,89 +705,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UnpinCodes"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Params"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UnpinCodes")); - self.inner.unary(req, path, codec).await - } - pub async fn store_and_instantiate_contract( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmwasm.wasm.v1.Msg/StoreAndInstantiateContract", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "StoreAndInstantiateContract", - )); - self.inner.unary(req, path, codec).await - } - pub async fn remove_code_upload_params_addresses( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmwasm.wasm.v1.Msg/RemoveCodeUploadParamsAddresses", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "RemoveCodeUploadParamsAddresses", - )); - self.inner.unary(req, path, codec).await - } - pub async fn add_code_upload_params_addresses( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmwasm.wasm.v1.Msg/AddCodeUploadParamsAddresses", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "AddCodeUploadParamsAddresses", - )); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Params")); self.inner.unary(req, path, codec).await } - pub async fn store_and_migrate_contract( + pub async fn contracts_by_creator( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -719,23 +725,20 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmwasm.wasm.v1.Msg/StoreAndMigrateContract", - ); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractsByCreator"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "StoreAndMigrateContract", + "cosmwasm.wasm.v1.Query", + "ContractsByCreator", )); self.inner.unary(req, path, codec).await } - pub async fn update_contract_label( + pub async fn build_address( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -743,13 +746,10 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateContractLabel"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/BuildAddress"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "UpdateContractLabel", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "BuildAddress")); self.inner.unary(req, path, codec).await } } diff --git a/generated/rust/protos/src/ibc.applications.fee.v1.rs b/generated/rust/protos/src/ibc.applications.fee.v1.rs index e0da18ac61..b6bd21a81d 100644 --- a/generated/rust/protos/src/ibc.applications.fee.v1.rs +++ b/generated/rust/protos/src/ibc.applications.fee.v1.rs @@ -1,20 +1,18 @@ // @generated -/// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware +/// Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring +/// See ICS004: #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct IncentivizedAcknowledgement { - /// the underlying app acknowledgement bytes - #[prost(bytes = "vec", tag = "1")] - pub app_acknowledgement: ::prost::alloc::vec::Vec, - /// the relayer address which submits the recv packet message +pub struct Metadata { + /// fee_version defines the ICS29 fee version + #[prost(string, tag = "1")] + pub fee_version: ::prost::alloc::string::String, + /// app_version defines the underlying application version, which may or may not be a JSON encoded bytestring #[prost(string, tag = "2")] - pub forward_relayer_address: ::prost::alloc::string::String, - /// success flag of the base application callback - #[prost(bool, tag = "3")] - pub underlying_app_success: bool, + pub app_version: ::prost::alloc::string::String, } -impl ::prost::Name for IncentivizedAcknowledgement { - const NAME: &'static str = "IncentivizedAcknowledgement"; +impl ::prost::Name for Metadata { + const NAME: &'static str = "Metadata"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) @@ -202,20 +200,162 @@ impl ::prost::Name for ForwardRelayerAddress { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring -/// See ICS004: +/// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Metadata { - /// fee_version defines the ICS29 fee version +pub struct IncentivizedAcknowledgement { + /// the underlying app acknowledgement bytes + #[prost(bytes = "vec", tag = "1")] + pub app_acknowledgement: ::prost::alloc::vec::Vec, + /// the relayer address which submits the recv packet message + #[prost(string, tag = "2")] + pub forward_relayer_address: ::prost::alloc::string::String, + /// success flag of the base application callback + #[prost(bool, tag = "3")] + pub underlying_app_success: bool, +} +impl ::prost::Name for IncentivizedAcknowledgement { + const NAME: &'static str = "IncentivizedAcknowledgement"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgRegisterPayee defines the request type for the RegisterPayee rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterPayee { + /// unique port identifier #[prost(string, tag = "1")] - pub fee_version: ::prost::alloc::string::String, - /// app_version defines the underlying application version, which may or may not be a JSON encoded bytestring + pub port_id: ::prost::alloc::string::String, + /// unique channel identifier #[prost(string, tag = "2")] - pub app_version: ::prost::alloc::string::String, + pub channel_id: ::prost::alloc::string::String, + /// the relayer address + #[prost(string, tag = "3")] + pub relayer: ::prost::alloc::string::String, + /// the payee address + #[prost(string, tag = "4")] + pub payee: ::prost::alloc::string::String, } -impl ::prost::Name for Metadata { - const NAME: &'static str = "Metadata"; +impl ::prost::Name for MsgRegisterPayee { + const NAME: &'static str = "MsgRegisterPayee"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterPayeeResponse {} +impl ::prost::Name for MsgRegisterPayeeResponse { + const NAME: &'static str = "MsgRegisterPayeeResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterCounterpartyPayee { + /// unique port identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// unique channel identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// the relayer address + #[prost(string, tag = "3")] + pub relayer: ::prost::alloc::string::String, + /// the counterparty payee address + #[prost(string, tag = "4")] + pub counterparty_payee: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgRegisterCounterpartyPayee { + const NAME: &'static str = "MsgRegisterCounterpartyPayee"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterCounterpartyPayeeResponse {} +impl ::prost::Name for MsgRegisterCounterpartyPayeeResponse { + const NAME: &'static str = "MsgRegisterCounterpartyPayeeResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgPayPacketFee defines the request type for the PayPacketFee rpc +/// This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be +/// paid for +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPayPacketFee { + /// fee encapsulates the recv, ack and timeout fees associated with an IBC packet + #[prost(message, optional, tag = "1")] + pub fee: ::core::option::Option, + /// the source port unique identifier + #[prost(string, tag = "2")] + pub source_port_id: ::prost::alloc::string::String, + /// the source channel unique identifer + #[prost(string, tag = "3")] + pub source_channel_id: ::prost::alloc::string::String, + /// account address to refund fee if necessary + #[prost(string, tag = "4")] + pub signer: ::prost::alloc::string::String, + /// optional list of relayers permitted to the receive packet fees + #[prost(string, repeated, tag = "5")] + pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for MsgPayPacketFee { + const NAME: &'static str = "MsgPayPacketFee"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPayPacketFeeResponse {} +impl ::prost::Name for MsgPayPacketFeeResponse { + const NAME: &'static str = "MsgPayPacketFeeResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc +/// This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPayPacketFeeAsync { + /// unique packet identifier comprised of the channel ID, port ID and sequence + #[prost(message, optional, tag = "1")] + pub packet_id: ::core::option::Option, + /// the packet fee associated with a particular IBC packet + #[prost(message, optional, tag = "2")] + pub packet_fee: ::core::option::Option, +} +impl ::prost::Name for MsgPayPacketFeeAsync { + const NAME: &'static str = "MsgPayPacketFeeAsync"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPayPacketFeeAsyncResponse {} +impl ::prost::Name for MsgPayPacketFeeAsyncResponse { + const NAME: &'static str = "MsgPayPacketFeeAsyncResponse"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) @@ -570,145 +710,5 @@ impl ::prost::Name for QueryFeeEnabledChannelResponse { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// MsgRegisterPayee defines the request type for the RegisterPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterPayee { - /// unique port identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// unique channel identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address - #[prost(string, tag = "3")] - pub relayer: ::prost::alloc::string::String, - /// the payee address - #[prost(string, tag = "4")] - pub payee: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgRegisterPayee { - const NAME: &'static str = "MsgRegisterPayee"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterPayeeResponse {} -impl ::prost::Name for MsgRegisterPayeeResponse { - const NAME: &'static str = "MsgRegisterPayeeResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterCounterpartyPayee { - /// unique port identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// unique channel identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address - #[prost(string, tag = "3")] - pub relayer: ::prost::alloc::string::String, - /// the counterparty payee address - #[prost(string, tag = "4")] - pub counterparty_payee: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgRegisterCounterpartyPayee { - const NAME: &'static str = "MsgRegisterCounterpartyPayee"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterCounterpartyPayeeResponse {} -impl ::prost::Name for MsgRegisterCounterpartyPayeeResponse { - const NAME: &'static str = "MsgRegisterCounterpartyPayeeResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// MsgPayPacketFee defines the request type for the PayPacketFee rpc -/// This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be -/// paid for -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPayPacketFee { - /// fee encapsulates the recv, ack and timeout fees associated with an IBC packet - #[prost(message, optional, tag = "1")] - pub fee: ::core::option::Option, - /// the source port unique identifier - #[prost(string, tag = "2")] - pub source_port_id: ::prost::alloc::string::String, - /// the source channel unique identifer - #[prost(string, tag = "3")] - pub source_channel_id: ::prost::alloc::string::String, - /// account address to refund fee if necessary - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, - /// optional list of relayers permitted to the receive packet fees - #[prost(string, repeated, tag = "5")] - pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for MsgPayPacketFee { - const NAME: &'static str = "MsgPayPacketFee"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPayPacketFeeResponse {} -impl ::prost::Name for MsgPayPacketFeeResponse { - const NAME: &'static str = "MsgPayPacketFeeResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc -/// This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPayPacketFeeAsync { - /// unique packet identifier comprised of the channel ID, port ID and sequence - #[prost(message, optional, tag = "1")] - pub packet_id: ::core::option::Option, - /// the packet fee associated with a particular IBC packet - #[prost(message, optional, tag = "2")] - pub packet_fee: ::core::option::Option, -} -impl ::prost::Name for MsgPayPacketFeeAsync { - const NAME: &'static str = "MsgPayPacketFeeAsync"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPayPacketFeeAsyncResponse {} -impl ::prost::Name for MsgPayPacketFeeAsyncResponse { - const NAME: &'static str = "MsgPayPacketFeeAsyncResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} include!("ibc.applications.fee.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/ibc.applications.fee.v1.tonic.rs b/generated/rust/protos/src/ibc.applications.fee.v1.tonic.rs index df00a51006..789facef05 100644 --- a/generated/rust/protos/src/ibc.applications.fee.v1.tonic.rs +++ b/generated/rust/protos/src/ibc.applications.fee.v1.tonic.rs @@ -1,6 +1,177 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::{http::Uri, *}; + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn register_payee( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/ibc.applications.fee.v1.Msg/RegisterPayee"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.applications.fee.v1.Msg", + "RegisterPayee", + )); + self.inner.unary(req, path, codec).await + } + pub async fn register_counterparty_payee( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.applications.fee.v1.Msg", + "RegisterCounterpartyPayee", + )); + self.inner.unary(req, path, codec).await + } + pub async fn pay_packet_fee( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/ibc.applications.fee.v1.Msg/PayPacketFee"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.applications.fee.v1.Msg", + "PayPacketFee", + )); + self.inner.unary(req, path, codec).await + } + pub async fn pay_packet_fee_async( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.applications.fee.v1.Msg", + "PayPacketFeeAsync", + )); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated client implementations. +#[cfg(feature = "client")] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; @@ -312,174 +483,3 @@ pub mod query_client { } } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::{http::Uri, *}; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - >>::Error: - Into + Send + Sync, - { - MsgClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn register_payee( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.applications.fee.v1.Msg/RegisterPayee"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.fee.v1.Msg", - "RegisterPayee", - )); - self.inner.unary(req, path, codec).await - } - pub async fn register_counterparty_payee( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.fee.v1.Msg", - "RegisterCounterpartyPayee", - )); - self.inner.unary(req, path, codec).await - } - pub async fn pay_packet_fee( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.applications.fee.v1.Msg/PayPacketFee"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.fee.v1.Msg", - "PayPacketFee", - )); - self.inner.unary(req, path, codec).await - } - pub async fn pay_packet_fee_async( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.fee.v1.Msg", - "PayPacketFeeAsync", - )); - self.inner.unary(req, path, codec).await - } - } -} diff --git a/generated/rust/protos/src/ibc.applications.interchain_accounts.controller.v1.rs b/generated/rust/protos/src/ibc.applications.interchain_accounts.controller.v1.rs index 49e06717d8..fae30b375d 100644 --- a/generated/rust/protos/src/ibc.applications.interchain_accounts.controller.v1.rs +++ b/generated/rust/protos/src/ibc.applications.interchain_accounts.controller.v1.rs @@ -19,18 +19,20 @@ impl ::prost::Name for Params { ) } } -/// QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. +/// MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryInterchainAccountRequest { +pub struct MsgRegisterInterchainAccount { #[prost(string, tag = "1")] pub owner: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub connection_id: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub version: ::prost::alloc::string::String, } -impl ::prost::Name for QueryInterchainAccountRequest { - const NAME: &'static str = "QueryInterchainAccountRequest"; +impl ::prost::Name for MsgRegisterInterchainAccount { + const NAME: &'static str = "MsgRegisterInterchainAccount"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -39,16 +41,18 @@ impl ::prost::Name for QueryInterchainAccountRequest { ) } } -/// QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. +/// MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryInterchainAccountResponse { +pub struct MsgRegisterInterchainAccountResponse { #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, + pub channel_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub port_id: ::prost::alloc::string::String, } -impl ::prost::Name for QueryInterchainAccountResponse { - const NAME: &'static str = "QueryInterchainAccountResponse"; +impl ::prost::Name for MsgRegisterInterchainAccountResponse { + const NAME: &'static str = "MsgRegisterInterchainAccountResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -57,13 +61,24 @@ impl ::prost::Name for QueryInterchainAccountResponse { ) } } -/// QueryParamsRequest is the request type for the Query/Params RPC method. +/// MsgSendTx defines the payload for Msg/SendTx #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; +pub struct MsgSendTx { + #[prost(string, tag = "1")] + pub owner: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub connection_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub packet_data: ::core::option::Option, + /// Relative timeout timestamp provided will be added to the current block time during transaction execution. + /// The timeout timestamp must be non-zero. + #[prost(uint64, tag = "4")] + pub relative_timeout: u64, +} +impl ::prost::Name for MsgSendTx { + const NAME: &'static str = "MsgSendTx"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -72,17 +87,16 @@ impl ::prost::Name for QueryParamsRequest { ) } } -/// QueryParamsResponse is the response type for the Query/Params RPC method. +/// MsgSendTxResponse defines the response for MsgSendTx #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, +pub struct MsgSendTxResponse { + #[prost(uint64, tag = "1")] + pub sequence: u64, } -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; +impl ::prost::Name for MsgSendTxResponse { + const NAME: &'static str = "MsgSendTxResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -91,20 +105,22 @@ impl ::prost::Name for QueryParamsResponse { ) } } -/// MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount +/// MsgUpdateParams defines the payload for Msg/UpdateParams #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterInterchainAccount { +pub struct MsgUpdateParams { + /// signer address #[prost(string, tag = "1")] - pub owner: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub version: ::prost::alloc::string::String, + pub signer: ::prost::alloc::string::String, + /// params defines the 27-interchain-accounts/controller parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, } -impl ::prost::Name for MsgRegisterInterchainAccount { - const NAME: &'static str = "MsgRegisterInterchainAccount"; +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -113,18 +129,13 @@ impl ::prost::Name for MsgRegisterInterchainAccount { ) } } -/// MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount +/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterInterchainAccountResponse { - #[prost(string, tag = "1")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub port_id: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgRegisterInterchainAccountResponse { - const NAME: &'static str = "MsgRegisterInterchainAccountResponse"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -133,24 +144,18 @@ impl ::prost::Name for MsgRegisterInterchainAccountResponse { ) } } -/// MsgSendTx defines the payload for Msg/SendTx +/// QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSendTx { +pub struct QueryInterchainAccountRequest { #[prost(string, tag = "1")] pub owner: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub packet_data: ::core::option::Option, - /// Relative timeout timestamp provided will be added to the current block time during transaction execution. - /// The timeout timestamp must be non-zero. - #[prost(uint64, tag = "4")] - pub relative_timeout: u64, } -impl ::prost::Name for MsgSendTx { - const NAME: &'static str = "MsgSendTx"; +impl ::prost::Name for QueryInterchainAccountRequest { + const NAME: &'static str = "QueryInterchainAccountRequest"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -159,16 +164,16 @@ impl ::prost::Name for MsgSendTx { ) } } -/// MsgSendTxResponse defines the response for MsgSendTx +/// QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSendTxResponse { - #[prost(uint64, tag = "1")] - pub sequence: u64, +pub struct QueryInterchainAccountResponse { + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, } -impl ::prost::Name for MsgSendTxResponse { - const NAME: &'static str = "MsgSendTxResponse"; +impl ::prost::Name for QueryInterchainAccountResponse { + const NAME: &'static str = "QueryInterchainAccountResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -177,22 +182,13 @@ impl ::prost::Name for MsgSendTxResponse { ) } } -/// MsgUpdateParams defines the payload for Msg/UpdateParams +/// QueryParamsRequest is the request type for the Query/Params RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the 27-interchain-accounts/controller parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -201,13 +197,17 @@ impl ::prost::Name for MsgUpdateParams { ) } } -/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams +/// QueryParamsResponse is the response type for the Query/Params RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( diff --git a/generated/rust/protos/src/ibc.applications.interchain_accounts.controller.v1.tonic.rs b/generated/rust/protos/src/ibc.applications.interchain_accounts.controller.v1.tonic.rs index 24578ed021..3b0ba7f540 100644 --- a/generated/rust/protos/src/ibc.applications.interchain_accounts.controller.v1.tonic.rs +++ b/generated/rust/protos/src/ibc.applications.interchain_accounts.controller.v1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,11 +80,11 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn interchain_account( + pub async fn register_interchain_account( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -98,19 +95,40 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.controller.v1.Query/InterchainAccount", + "/ibc.applications.interchain_accounts.controller.v1.Msg/RegisterInterchainAccount", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Query", - "InterchainAccount", + "ibc.applications.interchain_accounts.controller.v1.Msg", + "RegisterInterchainAccount", )); self.inner.unary(req, path, codec).await } - pub async fn params( + pub async fn send_tx( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.interchain_accounts.controller.v1.Msg/SendTx", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.applications.interchain_accounts.controller.v1.Msg", + "SendTx", + )); + self.inner.unary(req, path, codec).await + } + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -120,12 +138,12 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.controller.v1.Query/Params", + "/ibc.applications.interchain_accounts.controller.v1.Msg/UpdateParams", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Query", - "Params", + "ibc.applications.interchain_accounts.controller.v1.Msg", + "UpdateParams", )); self.inner.unary(req, path, codec).await } @@ -133,14 +151,14 @@ pub mod query_client { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -151,7 +169,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -166,7 +184,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -179,7 +200,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -212,11 +233,11 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn register_interchain_account( + pub async fn interchain_account( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -227,40 +248,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.controller.v1.Msg/RegisterInterchainAccount", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Msg", - "RegisterInterchainAccount", - )); - self.inner.unary(req, path, codec).await - } - pub async fn send_tx( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.controller.v1.Msg/SendTx", + "/ibc.applications.interchain_accounts.controller.v1.Query/InterchainAccount", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Msg", - "SendTx", + "ibc.applications.interchain_accounts.controller.v1.Query", + "InterchainAccount", )); self.inner.unary(req, path, codec).await } - pub async fn update_params( + pub async fn params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -270,12 +270,12 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.controller.v1.Msg/UpdateParams", + "/ibc.applications.interchain_accounts.controller.v1.Query/Params", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Msg", - "UpdateParams", + "ibc.applications.interchain_accounts.controller.v1.Query", + "Params", )); self.inner.unary(req, path, codec).await } diff --git a/generated/rust/protos/src/ibc.applications.interchain_accounts.host.v1.rs b/generated/rust/protos/src/ibc.applications.interchain_accounts.host.v1.rs index d79a502a66..14f7e174cd 100644 --- a/generated/rust/protos/src/ibc.applications.interchain_accounts.host.v1.rs +++ b/generated/rust/protos/src/ibc.applications.interchain_accounts.host.v1.rs @@ -21,12 +21,21 @@ impl ::prost::Name for Params { ) } } -/// QueryParamsRequest is the request type for the Query/Params RPC method. +/// MsgUpdateParams defines the payload for Msg/UpdateParams #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the 27-interchain-accounts/host parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -35,16 +44,12 @@ impl ::prost::Name for QueryParamsRequest { ) } } -/// QueryParamsResponse is the response type for the Query/Params RPC method. +/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -53,21 +58,12 @@ impl ::prost::Name for QueryParamsResponse { ) } } -/// MsgUpdateParams defines the payload for Msg/UpdateParams +/// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the 27-interchain-accounts/host parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -76,12 +72,16 @@ impl ::prost::Name for MsgUpdateParams { ) } } -/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams +/// QueryParamsResponse is the response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( diff --git a/generated/rust/protos/src/ibc.applications.interchain_accounts.host.v1.tonic.rs b/generated/rust/protos/src/ibc.applications.interchain_accounts.host.v1.tonic.rs index 2d914f0aa8..99fb885307 100644 --- a/generated/rust/protos/src/ibc.applications.interchain_accounts.host.v1.tonic.rs +++ b/generated/rust/protos/src/ibc.applications.interchain_accounts.host.v1.tonic.rs @@ -1,15 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; - /// Query provides defines the gRPC querier service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -20,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -35,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -51,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -84,11 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// Params queries all parameters of the ICA host submodule. - pub async fn params( + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -98,12 +93,12 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.host.v1.Query/Params", + "/ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.interchain_accounts.host.v1.Query", - "Params", + "ibc.applications.interchain_accounts.host.v1.Msg", + "UpdateParams", )); self.inner.unary(req, path, codec).await } @@ -111,14 +106,15 @@ pub mod query_client { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; + /// Query provides defines the gRPC querier service. #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -129,7 +125,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -144,7 +140,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -157,7 +156,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -190,10 +189,11 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn update_params( + /// Params queries all parameters of the ICA host submodule. + pub async fn params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -203,12 +203,12 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams", + "/ibc.applications.interchain_accounts.host.v1.Query/Params", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.interchain_accounts.host.v1.Msg", - "UpdateParams", + "ibc.applications.interchain_accounts.host.v1.Query", + "Params", )); self.inner.unary(req, path, codec).await } diff --git a/generated/rust/protos/src/ibc.applications.interchain_accounts.v1.rs b/generated/rust/protos/src/ibc.applications.interchain_accounts.v1.rs index dba232b884..6763737213 100644 --- a/generated/rust/protos/src/ibc.applications.interchain_accounts.v1.rs +++ b/generated/rust/protos/src/ibc.applications.interchain_accounts.v1.rs @@ -1,4 +1,37 @@ // @generated +/// Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring +/// See ICS004: +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Metadata { + /// version defines the ICS27 protocol version + #[prost(string, tag = "1")] + pub version: ::prost::alloc::string::String, + /// controller_connection_id is the connection identifier associated with the controller chain + #[prost(string, tag = "2")] + pub controller_connection_id: ::prost::alloc::string::String, + /// host_connection_id is the connection identifier associated with the host chain + #[prost(string, tag = "3")] + pub host_connection_id: ::prost::alloc::string::String, + /// address defines the interchain account address to be fulfilled upon the OnChanOpenTry handshake step + /// NOTE: the address field is empty on the OnChanOpenInit handshake step + #[prost(string, tag = "4")] + pub address: ::prost::alloc::string::String, + /// encoding defines the supported codec format + #[prost(string, tag = "5")] + pub encoding: ::prost::alloc::string::String, + /// tx_type defines the type of transactions the interchain account can execute + #[prost(string, tag = "6")] + pub tx_type: ::prost::alloc::string::String, +} +impl ::prost::Name for Metadata { + const NAME: &'static str = "Metadata"; + const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + } +} /// InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -82,37 +115,4 @@ impl ::prost::Name for InterchainAccount { ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) } } -/// Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring -/// See ICS004: -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Metadata { - /// version defines the ICS27 protocol version - #[prost(string, tag = "1")] - pub version: ::prost::alloc::string::String, - /// controller_connection_id is the connection identifier associated with the controller chain - #[prost(string, tag = "2")] - pub controller_connection_id: ::prost::alloc::string::String, - /// host_connection_id is the connection identifier associated with the host chain - #[prost(string, tag = "3")] - pub host_connection_id: ::prost::alloc::string::String, - /// address defines the interchain account address to be fulfilled upon the OnChanOpenTry handshake step - /// NOTE: the address field is empty on the OnChanOpenInit handshake step - #[prost(string, tag = "4")] - pub address: ::prost::alloc::string::String, - /// encoding defines the supported codec format - #[prost(string, tag = "5")] - pub encoding: ::prost::alloc::string::String, - /// tx_type defines the type of transactions the interchain account can execute - #[prost(string, tag = "6")] - pub tx_type: ::prost::alloc::string::String, -} -impl ::prost::Name for Metadata { - const NAME: &'static str = "Metadata"; - const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) - } -} // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/ibc.applications.transfer.v1.rs b/generated/rust/protos/src/ibc.applications.transfer.v1.rs index d8349d9c62..3b5014486b 100644 --- a/generated/rust/protos/src/ibc.applications.transfer.v1.rs +++ b/generated/rust/protos/src/ibc.applications.transfer.v1.rs @@ -1,4 +1,49 @@ // @generated +/// DenomTrace contains the base denomination for ICS20 fungible tokens and the +/// source tracing information path. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DenomTrace { + /// path defines the chain of port/channel identifiers used for tracing the + /// source of the fungible token. + #[prost(string, tag = "1")] + pub path: ::prost::alloc::string::String, + /// base denomination of the relayed fungible token. + #[prost(string, tag = "2")] + pub base_denom: ::prost::alloc::string::String, +} +impl ::prost::Name for DenomTrace { + const NAME: &'static str = "DenomTrace"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// Params defines the set of IBC transfer parameters. +/// NOTE: To prevent a single token from being transferred, set the +/// TransfersEnabled parameter to true and then set the bank module's SendEnabled +/// parameter for the denomination to false. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Params { + /// send_enabled enables or disables all cross-chain token transfers from this + /// chain. + #[prost(bool, tag = "1")] + pub send_enabled: bool, + /// receive_enabled enables or disables all cross-chain token transfers to this + /// chain. + #[prost(bool, tag = "2")] + pub receive_enabled: bool, +} +impl ::prost::Name for Params { + const NAME: &'static str = "Params"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} /// Allocation defines the spend limit for a particular port and channel #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -42,70 +87,116 @@ impl ::prost::Name for TransferAuthorization { ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } } -/// DenomTrace contains the base denomination for ICS20 fungible tokens and the -/// source tracing information path. +/// GenesisState defines the ibc-transfer genesis state #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct DenomTrace { - /// path defines the chain of port/channel identifiers used for tracing the - /// source of the fungible token. +pub struct GenesisState { #[prost(string, tag = "1")] - pub path: ::prost::alloc::string::String, - /// base denomination of the relayed fungible token. + pub port_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub denom_traces: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "3")] + pub params: ::core::option::Option, + /// total_escrowed contains the total amount of tokens escrowed + /// by the transfer module + #[prost(message, repeated, tag = "4")] + pub total_escrowed: + ::prost::alloc::vec::Vec, +} +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between +/// ICS20 enabled chains. See ICS Spec here: +/// +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgTransfer { + /// the port on which the packet will be sent + #[prost(string, tag = "1")] + pub source_port: ::prost::alloc::string::String, + /// the channel by which the packet will be sent #[prost(string, tag = "2")] - pub base_denom: ::prost::alloc::string::String, + pub source_channel: ::prost::alloc::string::String, + /// the tokens to be transferred + #[prost(message, optional, tag = "3")] + pub token: ::core::option::Option, + /// the sender address + #[prost(string, tag = "4")] + pub sender: ::prost::alloc::string::String, + /// the recipient address on the destination chain + #[prost(string, tag = "5")] + pub receiver: ::prost::alloc::string::String, + /// Timeout height relative to the current block height. + /// The timeout is disabled when set to 0. + #[prost(message, optional, tag = "6")] + pub timeout_height: ::core::option::Option, + /// Timeout timestamp in absolute nanoseconds since unix epoch. + /// The timeout is disabled when set to 0. + #[prost(uint64, tag = "7")] + pub timeout_timestamp: u64, + /// optional memo + #[prost(string, tag = "8")] + pub memo: ::prost::alloc::string::String, } -impl ::prost::Name for DenomTrace { - const NAME: &'static str = "DenomTrace"; +impl ::prost::Name for MsgTransfer { + const NAME: &'static str = "MsgTransfer"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } } -/// Params defines the set of IBC transfer parameters. -/// NOTE: To prevent a single token from being transferred, set the -/// TransfersEnabled parameter to true and then set the bank module's SendEnabled -/// parameter for the denomination to false. +/// MsgTransferResponse defines the Msg/Transfer response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// send_enabled enables or disables all cross-chain token transfers from this - /// chain. - #[prost(bool, tag = "1")] - pub send_enabled: bool, - /// receive_enabled enables or disables all cross-chain token transfers to this - /// chain. - #[prost(bool, tag = "2")] - pub receive_enabled: bool, +pub struct MsgTransferResponse { + /// sequence number of the transfer packet sent + #[prost(uint64, tag = "1")] + pub sequence: u64, } -impl ::prost::Name for Params { - const NAME: &'static str = "Params"; +impl ::prost::Name for MsgTransferResponse { + const NAME: &'static str = "MsgTransferResponse"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } } -/// GenesisState defines the ibc-transfer genesis state +/// MsgUpdateParams is the Msg/UpdateParams request type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { +pub struct MsgUpdateParams { + /// signer address #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub denom_traces: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] + pub signer: ::prost::alloc::string::String, + /// params defines the transfer parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] pub params: ::core::option::Option, - /// total_escrowed contains the total amount of tokens escrowed - /// by the transfer module - #[prost(message, repeated, tag = "4")] - pub total_escrowed: - ::prost::alloc::vec::Vec, } -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) @@ -313,96 +404,5 @@ impl ::prost::Name for QueryTotalEscrowForDenomResponse { ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } } -/// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between -/// ICS20 enabled chains. See ICS Spec here: -/// -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTransfer { - /// the port on which the packet will be sent - #[prost(string, tag = "1")] - pub source_port: ::prost::alloc::string::String, - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub source_channel: ::prost::alloc::string::String, - /// the tokens to be transferred - #[prost(message, optional, tag = "3")] - pub token: ::core::option::Option, - /// the sender address - #[prost(string, tag = "4")] - pub sender: ::prost::alloc::string::String, - /// the recipient address on the destination chain - #[prost(string, tag = "5")] - pub receiver: ::prost::alloc::string::String, - /// Timeout height relative to the current block height. - /// The timeout is disabled when set to 0. - #[prost(message, optional, tag = "6")] - pub timeout_height: ::core::option::Option, - /// Timeout timestamp in absolute nanoseconds since unix epoch. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "7")] - pub timeout_timestamp: u64, - /// optional memo - #[prost(string, tag = "8")] - pub memo: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgTransfer { - const NAME: &'static str = "MsgTransfer"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// MsgTransferResponse defines the Msg/Transfer response type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTransferResponse { - /// sequence number of the transfer packet sent - #[prost(uint64, tag = "1")] - pub sequence: u64, -} -impl ::prost::Name for MsgTransferResponse { - const NAME: &'static str = "MsgTransferResponse"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the transfer parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} include!("ibc.applications.transfer.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/ibc.applications.transfer.v1.tonic.rs b/generated/rust/protos/src/ibc.applications.transfer.v1.tonic.rs index 79a18feae1..d054d8f7d1 100644 --- a/generated/rust/protos/src/ibc.applications.transfer.v1.tonic.rs +++ b/generated/rust/protos/src/ibc.applications.transfer.v1.tonic.rs @@ -1,6 +1,132 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::{http::Uri, *}; + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn transfer( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/ibc.applications.transfer.v1.Msg/Transfer"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.applications.transfer.v1.Msg", + "Transfer", + )); + self.inner.unary(req, path, codec).await + } + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.transfer.v1.Msg/UpdateParams", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.applications.transfer.v1.Msg", + "UpdateParams", + )); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated client implementations. +#[cfg(feature = "client")] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; @@ -218,129 +344,3 @@ pub mod query_client { } } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::{http::Uri, *}; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - >>::Error: - Into + Send + Sync, - { - MsgClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn transfer( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.applications.transfer.v1.Msg/Transfer"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.transfer.v1.Msg", - "Transfer", - )); - self.inner.unary(req, path, codec).await - } - pub async fn update_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Msg/UpdateParams", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.transfer.v1.Msg", - "UpdateParams", - )); - self.inner.unary(req, path, codec).await - } - } -} diff --git a/generated/rust/protos/src/ibc.core.channel.v1.rs b/generated/rust/protos/src/ibc.core.channel.v1.rs index 782ac64cc0..f3f31ef314 100644 --- a/generated/rust/protos/src/ibc.core.channel.v1.rs +++ b/generated/rust/protos/src/ibc.core.channel.v1.rs @@ -362,611 +362,562 @@ impl ::prost::Name for PacketSequence { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelRequest is the request type for the Query/Channel RPC method +/// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It +/// is called by a relayer on Chain A. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelRequest { - /// port unique identifier +pub struct MsgChannelOpenInit { #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub channel: ::core::option::Option, + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelRequest { - const NAME: &'static str = "QueryChannelRequest"; +impl ::prost::Name for MsgChannelOpenInit { + const NAME: &'static str = "MsgChannelOpenInit"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelResponse is the response type for the Query/Channel RPC method. -/// Besides the Channel end, it includes a proof and the height from which the -/// proof was retrieved. +/// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelResponse { - /// channel associated with the request identifiers - #[prost(message, optional, tag = "1")] - pub channel: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, +pub struct MsgChannelOpenInitResponse { + #[prost(string, tag = "1")] + pub channel_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub version: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelResponse { - const NAME: &'static str = "QueryChannelResponse"; +impl ::prost::Name for MsgChannelOpenInitResponse { + const NAME: &'static str = "MsgChannelOpenInitResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelsRequest is the request type for the Query/Channels RPC method +/// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel +/// on Chain B. The version field within the Channel field has been deprecated. Its +/// value will be ignored by core IBC. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelsRequest { - /// pagination request - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, +pub struct MsgChannelOpenTry { + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. + #[deprecated] + #[prost(string, tag = "2")] + pub previous_channel_id: ::prost::alloc::string::String, + /// NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. + #[prost(message, optional, tag = "3")] + pub channel: ::core::option::Option, + #[prost(string, tag = "4")] + pub counterparty_version: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "5")] + pub proof_init: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "6")] + pub proof_height: ::core::option::Option, + #[prost(string, tag = "7")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelsRequest { - const NAME: &'static str = "QueryChannelsRequest"; +impl ::prost::Name for MsgChannelOpenTry { + const NAME: &'static str = "MsgChannelOpenTry"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelsResponse is the response type for the Query/Channels RPC method. +/// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelsResponse { - /// list of stored channels of the chain. - #[prost(message, repeated, tag = "1")] - pub channels: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, +pub struct MsgChannelOpenTryResponse { + #[prost(string, tag = "1")] + pub version: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelsResponse { - const NAME: &'static str = "QueryChannelsResponse"; +impl ::prost::Name for MsgChannelOpenTryResponse { + const NAME: &'static str = "MsgChannelOpenTryResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryConnectionChannelsRequest is the request type for the -/// Query/QueryConnectionChannels RPC method +/// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge +/// the change of channel state to TRYOPEN on Chain B. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionChannelsRequest { - /// connection unique identifier +pub struct MsgChannelOpenAck { #[prost(string, tag = "1")] - pub connection: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, + pub port_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub counterparty_channel_id: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub counterparty_version: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "5")] + pub proof_try: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "6")] + pub proof_height: ::core::option::Option, + #[prost(string, tag = "7")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConnectionChannelsRequest { - const NAME: &'static str = "QueryConnectionChannelsRequest"; +impl ::prost::Name for MsgChannelOpenAck { + const NAME: &'static str = "MsgChannelOpenAck"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryConnectionChannelsResponse is the Response type for the -/// Query/QueryConnectionChannels RPC method +/// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionChannelsResponse { - /// list of channels associated with a connection. - #[prost(message, repeated, tag = "1")] - pub channels: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -impl ::prost::Name for QueryConnectionChannelsResponse { - const NAME: &'static str = "QueryConnectionChannelsResponse"; +pub struct MsgChannelOpenAckResponse {} +impl ::prost::Name for MsgChannelOpenAckResponse { + const NAME: &'static str = "MsgChannelOpenAckResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelClientStateRequest is the request type for the Query/ClientState -/// RPC method +/// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to +/// acknowledge the change of channel state to OPEN on Chain A. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelClientStateRequest { - /// port unique identifier +pub struct MsgChannelOpenConfirm { #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "3")] + pub proof_ack: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "4")] + pub proof_height: ::core::option::Option, + #[prost(string, tag = "5")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelClientStateRequest { - const NAME: &'static str = "QueryChannelClientStateRequest"; +impl ::prost::Name for MsgChannelOpenConfirm { + const NAME: &'static str = "MsgChannelOpenConfirm"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelClientStateResponse is the Response type for the -/// Query/QueryChannelClientState RPC method +/// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response +/// type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelClientStateResponse { - /// client state associated with the channel - #[prost(message, optional, tag = "1")] - pub identified_client_state: - ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryChannelClientStateResponse { - const NAME: &'static str = "QueryChannelClientStateResponse"; +pub struct MsgChannelOpenConfirmResponse {} +impl ::prost::Name for MsgChannelOpenConfirmResponse { + const NAME: &'static str = "MsgChannelOpenConfirmResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelConsensusStateRequest is the request type for the -/// Query/ConsensusState RPC method +/// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A +/// to close a channel with Chain B. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelConsensusStateRequest { - /// port unique identifier +pub struct MsgChannelCloseInit { #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - /// revision number of the consensus state - #[prost(uint64, tag = "3")] - pub revision_number: u64, - /// revision height of the consensus state - #[prost(uint64, tag = "4")] - pub revision_height: u64, + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelConsensusStateRequest { - const NAME: &'static str = "QueryChannelConsensusStateRequest"; +impl ::prost::Name for MsgChannelCloseInit { + const NAME: &'static str = "MsgChannelCloseInit"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelClientStateResponse is the Response type for the -/// Query/QueryChannelClientState RPC method +/// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelConsensusStateResponse { - /// consensus state associated with the channel - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option<::pbjson_types::Any>, - /// client ID associated with the consensus state - #[prost(string, tag = "2")] - pub client_id: ::prost::alloc::string::String, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "3")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryChannelConsensusStateResponse { - const NAME: &'static str = "QueryChannelConsensusStateResponse"; +pub struct MsgChannelCloseInitResponse {} +impl ::prost::Name for MsgChannelCloseInitResponse { + const NAME: &'static str = "MsgChannelCloseInitResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketCommitmentRequest is the request type for the -/// Query/PacketCommitment RPC method +/// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B +/// to acknowledge the change of channel state to CLOSED on Chain A. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentRequest { - /// port unique identifier +pub struct MsgChannelCloseConfirm { #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - pub sequence: u64, + #[prost(bytes = "vec", tag = "3")] + pub proof_init: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "4")] + pub proof_height: ::core::option::Option, + #[prost(string, tag = "5")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPacketCommitmentRequest { - const NAME: &'static str = "QueryPacketCommitmentRequest"; +impl ::prost::Name for MsgChannelCloseConfirm { + const NAME: &'static str = "MsgChannelCloseConfirm"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketCommitmentResponse defines the client query response for a packet -/// which also includes a proof and the height from which the proof was -/// retrieved +/// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response +/// type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentResponse { - /// packet associated with the request fields - #[prost(bytes = "vec", tag = "1")] - pub commitment: ::prost::alloc::vec::Vec, - /// merkle proof of existence +pub struct MsgChannelCloseConfirmResponse {} +impl ::prost::Name for MsgChannelCloseConfirmResponse { + const NAME: &'static str = "MsgChannelCloseConfirmResponse"; + const PACKAGE: &'static str = "ibc.core.channel.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + } +} +/// MsgRecvPacket receives incoming IBC packet +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRecvPacket { + #[prost(message, optional, tag = "1")] + pub packet: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved + pub proof_commitment: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] pub proof_height: ::core::option::Option, + #[prost(string, tag = "4")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPacketCommitmentResponse { - const NAME: &'static str = "QueryPacketCommitmentResponse"; +impl ::prost::Name for MsgRecvPacket { + const NAME: &'static str = "MsgRecvPacket"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketCommitmentsRequest is the request type for the -/// Query/QueryPacketCommitments RPC method +/// MsgRecvPacketResponse defines the Msg/RecvPacket response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentsRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, +pub struct MsgRecvPacketResponse { + #[prost(enumeration = "ResponseResultType", tag = "1")] + pub result: i32, } -impl ::prost::Name for QueryPacketCommitmentsRequest { - const NAME: &'static str = "QueryPacketCommitmentsRequest"; +impl ::prost::Name for MsgRecvPacketResponse { + const NAME: &'static str = "MsgRecvPacketResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketCommitmentsResponse is the request type for the -/// Query/QueryPacketCommitments RPC method +/// MsgTimeout receives timed-out packet #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentsResponse { - #[prost(message, repeated, tag = "1")] - pub commitments: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height +pub struct MsgTimeout { + #[prost(message, optional, tag = "1")] + pub packet: ::core::option::Option, + #[prost(bytes = "vec", tag = "2")] + pub proof_unreceived: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, + pub proof_height: ::core::option::Option, + #[prost(uint64, tag = "4")] + pub next_sequence_recv: u64, + #[prost(string, tag = "5")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPacketCommitmentsResponse { - const NAME: &'static str = "QueryPacketCommitmentsResponse"; +impl ::prost::Name for MsgTimeout { + const NAME: &'static str = "MsgTimeout"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketReceiptRequest is the request type for the -/// Query/PacketReceipt RPC method +/// MsgTimeoutResponse defines the Msg/Timeout response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketReceiptRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - pub sequence: u64, +pub struct MsgTimeoutResponse { + #[prost(enumeration = "ResponseResultType", tag = "1")] + pub result: i32, } -impl ::prost::Name for QueryPacketReceiptRequest { - const NAME: &'static str = "QueryPacketReceiptRequest"; +impl ::prost::Name for MsgTimeoutResponse { + const NAME: &'static str = "MsgTimeoutResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketReceiptResponse defines the client query response for a packet -/// receipt which also includes a proof, and the height from which the proof was -/// retrieved +/// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketReceiptResponse { - /// success flag for if receipt exists - #[prost(bool, tag = "2")] - pub received: bool, - /// merkle proof of existence +pub struct MsgTimeoutOnClose { + #[prost(message, optional, tag = "1")] + pub packet: ::core::option::Option, + #[prost(bytes = "vec", tag = "2")] + pub proof_unreceived: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "3")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved + pub proof_close: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] pub proof_height: ::core::option::Option, + #[prost(uint64, tag = "5")] + pub next_sequence_recv: u64, + #[prost(string, tag = "6")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPacketReceiptResponse { - const NAME: &'static str = "QueryPacketReceiptResponse"; +impl ::prost::Name for MsgTimeoutOnClose { + const NAME: &'static str = "MsgTimeoutOnClose"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketAcknowledgementRequest is the request type for the -/// Query/PacketAcknowledgement RPC method +/// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - pub sequence: u64, +pub struct MsgTimeoutOnCloseResponse { + #[prost(enumeration = "ResponseResultType", tag = "1")] + pub result: i32, } -impl ::prost::Name for QueryPacketAcknowledgementRequest { - const NAME: &'static str = "QueryPacketAcknowledgementRequest"; +impl ::prost::Name for MsgTimeoutOnCloseResponse { + const NAME: &'static str = "MsgTimeoutOnCloseResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketAcknowledgementResponse defines the client query response for a -/// packet which also includes a proof and the height from which the -/// proof was retrieved +/// MsgAcknowledgement receives incoming IBC acknowledgement #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementResponse { - /// packet associated with the request fields - #[prost(bytes = "vec", tag = "1")] - pub acknowledgement: ::prost::alloc::vec::Vec, - /// merkle proof of existence +pub struct MsgAcknowledgement { + #[prost(message, optional, tag = "1")] + pub packet: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] + pub acknowledgement: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub proof_acked: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "4")] pub proof_height: ::core::option::Option, + #[prost(string, tag = "5")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPacketAcknowledgementResponse { - const NAME: &'static str = "QueryPacketAcknowledgementResponse"; +impl ::prost::Name for MsgAcknowledgement { + const NAME: &'static str = "MsgAcknowledgement"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketAcknowledgementsRequest is the request type for the -/// Query/QueryPacketCommitments RPC method +/// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementsRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - /// list of packet sequences - #[prost(uint64, repeated, tag = "4")] - pub packet_commitment_sequences: ::prost::alloc::vec::Vec, +pub struct MsgAcknowledgementResponse { + #[prost(enumeration = "ResponseResultType", tag = "1")] + pub result: i32, } -impl ::prost::Name for QueryPacketAcknowledgementsRequest { - const NAME: &'static str = "QueryPacketAcknowledgementsRequest"; +impl ::prost::Name for MsgAcknowledgementResponse { + const NAME: &'static str = "MsgAcknowledgementResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketAcknowledgemetsResponse is the request type for the -/// Query/QueryPacketAcknowledgements RPC method +/// ResponseResultType defines the possible outcomes of the execution of a message #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementsResponse { - #[prost(message, repeated, tag = "1")] - pub acknowledgements: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ResponseResultType { + /// Default zero value enumeration + Unspecified = 0, + /// The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + Noop = 1, + /// The message was executed successfully + Success = 2, } -impl ::prost::Name for QueryPacketAcknowledgementsResponse { - const NAME: &'static str = "QueryPacketAcknowledgementsResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) +impl ResponseResultType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ResponseResultType::Unspecified => "RESPONSE_RESULT_TYPE_UNSPECIFIED", + ResponseResultType::Noop => "RESPONSE_RESULT_TYPE_NOOP", + ResponseResultType::Success => "RESPONSE_RESULT_TYPE_SUCCESS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RESPONSE_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "RESPONSE_RESULT_TYPE_NOOP" => Some(Self::Noop), + "RESPONSE_RESULT_TYPE_SUCCESS" => Some(Self::Success), + _ => None, + } } } -/// QueryUnreceivedPacketsRequest is the request type for the -/// Query/UnreceivedPackets RPC method +/// QueryChannelRequest is the request type for the Query/Channel RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedPacketsRequest { +pub struct QueryChannelRequest { /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - /// list of packet sequences - #[prost(uint64, repeated, tag = "3")] - pub packet_commitment_sequences: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryUnreceivedPacketsRequest { - const NAME: &'static str = "QueryUnreceivedPacketsRequest"; +impl ::prost::Name for QueryChannelRequest { + const NAME: &'static str = "QueryChannelRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryUnreceivedPacketsResponse is the response type for the -/// Query/UnreceivedPacketCommitments RPC method -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] +/// QueryChannelResponse is the response type for the Query/Channel RPC method. +/// Besides the Channel end, it includes a proof and the height from which the +/// proof was retrieved. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedPacketsResponse { - /// list of unreceived packet sequences - #[prost(uint64, repeated, tag = "1")] - pub sequences: ::prost::alloc::vec::Vec, - /// query block height - #[prost(message, optional, tag = "2")] - pub height: ::core::option::Option, +pub struct QueryChannelResponse { + /// channel associated with the request identifiers + #[prost(message, optional, tag = "1")] + pub channel: ::core::option::Option, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, } -impl ::prost::Name for QueryUnreceivedPacketsResponse { - const NAME: &'static str = "QueryUnreceivedPacketsResponse"; +impl ::prost::Name for QueryChannelResponse { + const NAME: &'static str = "QueryChannelResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryUnreceivedAcks is the request type for the -/// Query/UnreceivedAcks RPC method +/// QueryChannelsRequest is the request type for the Query/Channels RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedAcksRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// list of acknowledgement sequences - #[prost(uint64, repeated, tag = "3")] - pub packet_ack_sequences: ::prost::alloc::vec::Vec, +pub struct QueryChannelsRequest { + /// pagination request + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for QueryUnreceivedAcksRequest { - const NAME: &'static str = "QueryUnreceivedAcksRequest"; +impl ::prost::Name for QueryChannelsRequest { + const NAME: &'static str = "QueryChannelsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryUnreceivedAcksResponse is the response type for the -/// Query/UnreceivedAcks RPC method +/// QueryChannelsResponse is the response type for the Query/Channels RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedAcksResponse { - /// list of unreceived acknowledgement sequences - #[prost(uint64, repeated, tag = "1")] - pub sequences: ::prost::alloc::vec::Vec, - /// query block height +pub struct QueryChannelsResponse { + /// list of stored channels of the chain. + #[prost(message, repeated, tag = "1")] + pub channels: ::prost::alloc::vec::Vec, + /// pagination response #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, + /// query block height + #[prost(message, optional, tag = "3")] pub height: ::core::option::Option, } -impl ::prost::Name for QueryUnreceivedAcksResponse { - const NAME: &'static str = "QueryUnreceivedAcksResponse"; +impl ::prost::Name for QueryChannelsResponse { + const NAME: &'static str = "QueryChannelsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryNextSequenceReceiveRequest is the request type for the -/// Query/QueryNextSequenceReceiveRequest RPC method +/// QueryConnectionChannelsRequest is the request type for the +/// Query/QueryConnectionChannels RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceReceiveRequest { - /// port unique identifier +pub struct QueryConnectionChannelsRequest { + /// connection unique identifier #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, + pub connection: ::prost::alloc::string::String, + /// pagination request + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for QueryNextSequenceReceiveRequest { - const NAME: &'static str = "QueryNextSequenceReceiveRequest"; +impl ::prost::Name for QueryConnectionChannelsRequest { + const NAME: &'static str = "QueryConnectionChannelsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QuerySequenceResponse is the request type for the -/// Query/QueryNextSequenceReceiveResponse RPC method +/// QueryConnectionChannelsResponse is the Response type for the +/// Query/QueryConnectionChannels RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceReceiveResponse { - /// next sequence receive number - #[prost(uint64, tag = "1")] - pub next_sequence_receive: u64, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved +pub struct QueryConnectionChannelsResponse { + /// list of channels associated with a connection. + #[prost(message, repeated, tag = "1")] + pub channels: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, + /// query block height #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, + pub height: ::core::option::Option, } -impl ::prost::Name for QueryNextSequenceReceiveResponse { - const NAME: &'static str = "QueryNextSequenceReceiveResponse"; +impl ::prost::Name for QueryConnectionChannelsResponse { + const NAME: &'static str = "QueryConnectionChannelsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryNextSequenceSendRequest is the request type for the -/// Query/QueryNextSequenceSend RPC method +/// QueryChannelClientStateRequest is the request type for the Query/ClientState +/// RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceSendRequest { +pub struct QueryChannelClientStateRequest { /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, @@ -974,22 +925,23 @@ pub struct QueryNextSequenceSendRequest { #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, } -impl ::prost::Name for QueryNextSequenceSendRequest { - const NAME: &'static str = "QueryNextSequenceSendRequest"; +impl ::prost::Name for QueryChannelClientStateRequest { + const NAME: &'static str = "QueryChannelClientStateRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryNextSequenceSendResponse is the request type for the -/// Query/QueryNextSequenceSend RPC method +/// QueryChannelClientStateResponse is the Response type for the +/// Query/QueryChannelClientState RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceSendResponse { - /// next sequence send number - #[prost(uint64, tag = "1")] - pub next_sequence_send: u64, +pub struct QueryChannelClientStateResponse { + /// client state associated with the channel + #[prost(message, optional, tag = "1")] + pub identified_client_state: + ::core::option::Option, /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] pub proof: ::prost::alloc::vec::Vec, @@ -997,430 +949,478 @@ pub struct QueryNextSequenceSendResponse { #[prost(message, optional, tag = "3")] pub proof_height: ::core::option::Option, } -impl ::prost::Name for QueryNextSequenceSendResponse { - const NAME: &'static str = "QueryNextSequenceSendResponse"; +impl ::prost::Name for QueryChannelClientStateResponse { + const NAME: &'static str = "QueryChannelClientStateResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It -/// is called by a relayer on Chain A. +/// QueryChannelConsensusStateRequest is the request type for the +/// Query/ConsensusState RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenInit { +pub struct QueryChannelConsensusStateRequest { + /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub channel: ::core::option::Option, - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// revision number of the consensus state + #[prost(uint64, tag = "3")] + pub revision_number: u64, + /// revision height of the consensus state + #[prost(uint64, tag = "4")] + pub revision_height: u64, } -impl ::prost::Name for MsgChannelOpenInit { - const NAME: &'static str = "MsgChannelOpenInit"; +impl ::prost::Name for QueryChannelConsensusStateRequest { + const NAME: &'static str = "QueryChannelConsensusStateRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. +/// QueryChannelClientStateResponse is the Response type for the +/// Query/QueryChannelClientState RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenInitResponse { - #[prost(string, tag = "1")] - pub channel_id: ::prost::alloc::string::String, +pub struct QueryChannelConsensusStateResponse { + /// consensus state associated with the channel + #[prost(message, optional, tag = "1")] + pub consensus_state: ::core::option::Option<::pbjson_types::Any>, + /// client ID associated with the consensus state #[prost(string, tag = "2")] - pub version: ::prost::alloc::string::String, + pub client_id: ::prost::alloc::string::String, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "3")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "4")] + pub proof_height: ::core::option::Option, } -impl ::prost::Name for MsgChannelOpenInitResponse { - const NAME: &'static str = "MsgChannelOpenInitResponse"; +impl ::prost::Name for QueryChannelConsensusStateResponse { + const NAME: &'static str = "QueryChannelConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel -/// on Chain B. The version field within the Channel field has been deprecated. Its -/// value will be ignored by core IBC. +/// QueryPacketCommitmentRequest is the request type for the +/// Query/PacketCommitment RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenTry { +pub struct QueryPacketCommitmentRequest { + /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - /// Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. - #[deprecated] + /// channel unique identifier #[prost(string, tag = "2")] - pub previous_channel_id: ::prost::alloc::string::String, - /// NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. - #[prost(message, optional, tag = "3")] - pub channel: ::core::option::Option, - #[prost(string, tag = "4")] - pub counterparty_version: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "5")] - pub proof_init: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, + pub channel_id: ::prost::alloc::string::String, + /// packet sequence + #[prost(uint64, tag = "3")] + pub sequence: u64, } -impl ::prost::Name for MsgChannelOpenTry { - const NAME: &'static str = "MsgChannelOpenTry"; +impl ::prost::Name for QueryPacketCommitmentRequest { + const NAME: &'static str = "QueryPacketCommitmentRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. +/// QueryPacketCommitmentResponse defines the client query response for a packet +/// which also includes a proof and the height from which the proof was +/// retrieved #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenTryResponse { - #[prost(string, tag = "1")] - pub version: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, +pub struct QueryPacketCommitmentResponse { + /// packet associated with the request fields + #[prost(bytes = "vec", tag = "1")] + pub commitment: ::prost::alloc::vec::Vec, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, } -impl ::prost::Name for MsgChannelOpenTryResponse { - const NAME: &'static str = "MsgChannelOpenTryResponse"; +impl ::prost::Name for QueryPacketCommitmentResponse { + const NAME: &'static str = "QueryPacketCommitmentResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge -/// the change of channel state to TRYOPEN on Chain B. +/// QueryPacketCommitmentsRequest is the request type for the +/// Query/QueryPacketCommitments RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenAck { +pub struct QueryPacketCommitmentsRequest { + /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, + /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub counterparty_channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub counterparty_version: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "5")] - pub proof_try: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, + /// pagination request + #[prost(message, optional, tag = "3")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgChannelOpenAck { - const NAME: &'static str = "MsgChannelOpenAck"; +impl ::prost::Name for QueryPacketCommitmentsRequest { + const NAME: &'static str = "QueryPacketCommitmentsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. +/// QueryPacketCommitmentsResponse is the request type for the +/// Query/QueryPacketCommitments RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenAckResponse {} -impl ::prost::Name for MsgChannelOpenAckResponse { - const NAME: &'static str = "MsgChannelOpenAckResponse"; +pub struct QueryPacketCommitmentsResponse { + #[prost(message, repeated, tag = "1")] + pub commitments: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, + /// query block height + #[prost(message, optional, tag = "3")] + pub height: ::core::option::Option, +} +impl ::prost::Name for QueryPacketCommitmentsResponse { + const NAME: &'static str = "QueryPacketCommitmentsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to -/// acknowledge the change of channel state to OPEN on Chain A. +/// QueryPacketReceiptRequest is the request type for the +/// Query/PacketReceipt RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenConfirm { +pub struct QueryPacketReceiptRequest { + /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, + /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - pub proof_ack: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, + /// packet sequence + #[prost(uint64, tag = "3")] + pub sequence: u64, } -impl ::prost::Name for MsgChannelOpenConfirm { - const NAME: &'static str = "MsgChannelOpenConfirm"; +impl ::prost::Name for QueryPacketReceiptRequest { + const NAME: &'static str = "QueryPacketReceiptRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response -/// type. +/// QueryPacketReceiptResponse defines the client query response for a packet +/// receipt which also includes a proof, and the height from which the proof was +/// retrieved #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenConfirmResponse {} -impl ::prost::Name for MsgChannelOpenConfirmResponse { - const NAME: &'static str = "MsgChannelOpenConfirmResponse"; +pub struct QueryPacketReceiptResponse { + /// success flag for if receipt exists + #[prost(bool, tag = "2")] + pub received: bool, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "3")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "4")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryPacketReceiptResponse { + const NAME: &'static str = "QueryPacketReceiptResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A -/// to close a channel with Chain B. +/// QueryPacketAcknowledgementRequest is the request type for the +/// Query/PacketAcknowledgement RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseInit { +pub struct QueryPacketAcknowledgementRequest { + /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, + /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, + /// packet sequence + #[prost(uint64, tag = "3")] + pub sequence: u64, } -impl ::prost::Name for MsgChannelCloseInit { - const NAME: &'static str = "MsgChannelCloseInit"; +impl ::prost::Name for QueryPacketAcknowledgementRequest { + const NAME: &'static str = "QueryPacketAcknowledgementRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. +/// QueryPacketAcknowledgementResponse defines the client query response for a +/// packet which also includes a proof and the height from which the +/// proof was retrieved #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseInitResponse {} -impl ::prost::Name for MsgChannelCloseInitResponse { - const NAME: &'static str = "MsgChannelCloseInitResponse"; +pub struct QueryPacketAcknowledgementResponse { + /// packet associated with the request fields + #[prost(bytes = "vec", tag = "1")] + pub acknowledgement: ::prost::alloc::vec::Vec, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryPacketAcknowledgementResponse { + const NAME: &'static str = "QueryPacketAcknowledgementResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B -/// to acknowledge the change of channel state to CLOSED on Chain A. +/// QueryPacketAcknowledgementsRequest is the request type for the +/// Query/QueryPacketCommitments RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseConfirm { +pub struct QueryPacketAcknowledgementsRequest { + /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, + /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - pub proof_init: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, + /// pagination request + #[prost(message, optional, tag = "3")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, + /// list of packet sequences + #[prost(uint64, repeated, tag = "4")] + pub packet_commitment_sequences: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgChannelCloseConfirm { - const NAME: &'static str = "MsgChannelCloseConfirm"; +impl ::prost::Name for QueryPacketAcknowledgementsRequest { + const NAME: &'static str = "QueryPacketAcknowledgementsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response -/// type. +/// QueryPacketAcknowledgemetsResponse is the request type for the +/// Query/QueryPacketAcknowledgements RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseConfirmResponse {} -impl ::prost::Name for MsgChannelCloseConfirmResponse { - const NAME: &'static str = "MsgChannelCloseConfirmResponse"; +pub struct QueryPacketAcknowledgementsResponse { + #[prost(message, repeated, tag = "1")] + pub acknowledgements: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, + /// query block height + #[prost(message, optional, tag = "3")] + pub height: ::core::option::Option, +} +impl ::prost::Name for QueryPacketAcknowledgementsResponse { + const NAME: &'static str = "QueryPacketAcknowledgementsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgRecvPacket receives incoming IBC packet +/// QueryUnreceivedPacketsRequest is the request type for the +/// Query/UnreceivedPackets RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRecvPacket { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub proof_commitment: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, +pub struct QueryUnreceivedPacketsRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// list of packet sequences + #[prost(uint64, repeated, tag = "3")] + pub packet_commitment_sequences: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgRecvPacket { - const NAME: &'static str = "MsgRecvPacket"; +impl ::prost::Name for QueryUnreceivedPacketsRequest { + const NAME: &'static str = "QueryUnreceivedPacketsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgRecvPacketResponse defines the Msg/RecvPacket response type. +/// QueryUnreceivedPacketsResponse is the response type for the +/// Query/UnreceivedPacketCommitments RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRecvPacketResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, +pub struct QueryUnreceivedPacketsResponse { + /// list of unreceived packet sequences + #[prost(uint64, repeated, tag = "1")] + pub sequences: ::prost::alloc::vec::Vec, + /// query block height + #[prost(message, optional, tag = "2")] + pub height: ::core::option::Option, } -impl ::prost::Name for MsgRecvPacketResponse { - const NAME: &'static str = "MsgRecvPacketResponse"; +impl ::prost::Name for QueryUnreceivedPacketsResponse { + const NAME: &'static str = "QueryUnreceivedPacketsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgTimeout receives timed-out packet +/// QueryUnreceivedAcks is the request type for the +/// Query/UnreceivedAcks RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeout { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub proof_unreceived: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, - #[prost(uint64, tag = "4")] - pub next_sequence_recv: u64, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, +pub struct QueryUnreceivedAcksRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// list of acknowledgement sequences + #[prost(uint64, repeated, tag = "3")] + pub packet_ack_sequences: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgTimeout { - const NAME: &'static str = "MsgTimeout"; +impl ::prost::Name for QueryUnreceivedAcksRequest { + const NAME: &'static str = "QueryUnreceivedAcksRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgTimeoutResponse defines the Msg/Timeout response type. +/// QueryUnreceivedAcksResponse is the response type for the +/// Query/UnreceivedAcks RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeoutResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, +pub struct QueryUnreceivedAcksResponse { + /// list of unreceived acknowledgement sequences + #[prost(uint64, repeated, tag = "1")] + pub sequences: ::prost::alloc::vec::Vec, + /// query block height + #[prost(message, optional, tag = "2")] + pub height: ::core::option::Option, } -impl ::prost::Name for MsgTimeoutResponse { - const NAME: &'static str = "MsgTimeoutResponse"; +impl ::prost::Name for QueryUnreceivedAcksResponse { + const NAME: &'static str = "QueryUnreceivedAcksResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. +/// QueryNextSequenceReceiveRequest is the request type for the +/// Query/QueryNextSequenceReceiveRequest RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeoutOnClose { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub proof_unreceived: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - pub proof_close: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(uint64, tag = "5")] - pub next_sequence_recv: u64, - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, +pub struct QueryNextSequenceReceiveRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, } -impl ::prost::Name for MsgTimeoutOnClose { - const NAME: &'static str = "MsgTimeoutOnClose"; +impl ::prost::Name for QueryNextSequenceReceiveRequest { + const NAME: &'static str = "QueryNextSequenceReceiveRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. +/// QuerySequenceResponse is the request type for the +/// Query/QueryNextSequenceReceiveResponse RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeoutOnCloseResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, +pub struct QueryNextSequenceReceiveResponse { + /// next sequence receive number + #[prost(uint64, tag = "1")] + pub next_sequence_receive: u64, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, } -impl ::prost::Name for MsgTimeoutOnCloseResponse { - const NAME: &'static str = "MsgTimeoutOnCloseResponse"; +impl ::prost::Name for QueryNextSequenceReceiveResponse { + const NAME: &'static str = "QueryNextSequenceReceiveResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgAcknowledgement receives incoming IBC acknowledgement +/// QueryNextSequenceSendRequest is the request type for the +/// Query/QueryNextSequenceSend RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAcknowledgement { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub acknowledgement: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - pub proof_acked: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, +pub struct QueryNextSequenceSendRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, } -impl ::prost::Name for MsgAcknowledgement { - const NAME: &'static str = "MsgAcknowledgement"; +impl ::prost::Name for QueryNextSequenceSendRequest { + const NAME: &'static str = "QueryNextSequenceSendRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. +/// QueryNextSequenceSendResponse is the request type for the +/// Query/QueryNextSequenceSend RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAcknowledgementResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, +pub struct QueryNextSequenceSendResponse { + /// next sequence send number + #[prost(uint64, tag = "1")] + pub next_sequence_send: u64, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, } -impl ::prost::Name for MsgAcknowledgementResponse { - const NAME: &'static str = "MsgAcknowledgementResponse"; +impl ::prost::Name for QueryNextSequenceSendResponse { + const NAME: &'static str = "QueryNextSequenceSendResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// ResponseResultType defines the possible outcomes of the execution of a message -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ResponseResultType { - /// Default zero value enumeration - Unspecified = 0, - /// The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - Noop = 1, - /// The message was executed successfully - Success = 2, -} -impl ResponseResultType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - ResponseResultType::Unspecified => "RESPONSE_RESULT_TYPE_UNSPECIFIED", - ResponseResultType::Noop => "RESPONSE_RESULT_TYPE_NOOP", - ResponseResultType::Success => "RESPONSE_RESULT_TYPE_SUCCESS", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "RESPONSE_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "RESPONSE_RESULT_TYPE_NOOP" => Some(Self::Noop), - "RESPONSE_RESULT_TYPE_SUCCESS" => Some(Self::Success), - _ => None, - } - } -} include!("ibc.core.channel.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/ibc.core.channel.v1.tonic.rs b/generated/rust/protos/src/ibc.core.channel.v1.tonic.rs index 4c33d51167..82473de9a7 100644 --- a/generated/rust/protos/src/ibc.core.channel.v1.tonic.rs +++ b/generated/rust/protos/src/ibc.core.channel.v1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,28 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn channel( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/Channel"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channel")); - self.inner.unary(req, path, codec).await - } - pub async fn channels( + pub async fn channel_open_init( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -113,67 +92,20 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/Channels"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channels")); - self.inner.unary(req, path, codec).await - } - pub async fn connection_channels( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/ConnectionChannels", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "ConnectionChannels", - )); - self.inner.unary(req, path, codec).await - } - pub async fn channel_client_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/ChannelClientState", - ); + let path = + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/ChannelOpenInit"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "ChannelClientState", + "ibc.core.channel.v1.Msg", + "ChannelOpenInit", )); self.inner.unary(req, path, codec).await } - pub async fn channel_consensus_state( + pub async fn channel_open_try( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -181,20 +113,17 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/ChannelConsensusState", - ); + let path = + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/ChannelOpenTry"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "ChannelConsensusState", - )); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenTry")); self.inner.unary(req, path, codec).await } - pub async fn packet_commitment( + pub async fn channel_open_ack( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -204,21 +133,17 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/PacketCommitment"); + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/ChannelOpenAck"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketCommitment", - )); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenAck")); self.inner.unary(req, path, codec).await } - pub async fn packet_commitments( + pub async fn channel_open_confirm( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -226,20 +151,19 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/PacketCommitments", - ); + let path = + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/ChannelOpenConfirm"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketCommitments", + "ibc.core.channel.v1.Msg", + "ChannelOpenConfirm", )); self.inner.unary(req, path, codec).await } - pub async fn packet_receipt( + pub async fn channel_close_init( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -249,19 +173,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/PacketReceipt"); + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/ChannelCloseInit"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketReceipt", + "ibc.core.channel.v1.Msg", + "ChannelCloseInit", )); self.inner.unary(req, path, codec).await } - pub async fn packet_acknowledgement( + pub async fn channel_close_confirm( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -272,22 +196,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/PacketAcknowledgement", + "/ibc.core.channel.v1.Msg/ChannelCloseConfirm", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketAcknowledgement", + "ibc.core.channel.v1.Msg", + "ChannelCloseConfirm", )); self.inner.unary(req, path, codec).await } - pub async fn packet_acknowledgements( + pub async fn recv_packet( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -295,23 +217,17 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/PacketAcknowledgements", - ); + let path = http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/RecvPacket"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketAcknowledgements", - )); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "RecvPacket")); self.inner.unary(req, path, codec).await } - pub async fn unreceived_packets( + pub async fn timeout( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -319,20 +235,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/UnreceivedPackets", - ); + let path = http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/Timeout"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "UnreceivedPackets", - )); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "Timeout")); self.inner.unary(req, path, codec).await } - pub async fn unreceived_acks( + pub async fn timeout_on_close( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -342,21 +254,17 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/UnreceivedAcks"); + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/TimeoutOnClose"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "UnreceivedAcks", - )); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "TimeoutOnClose")); self.inner.unary(req, path, codec).await } - pub async fn next_sequence_receive( + pub async fn acknowledgement( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -364,34 +272,12 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/NextSequenceReceive", - ); + let path = + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/Acknowledgement"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "NextSequenceReceive", - )); - self.inner.unary(req, path, codec).await - } - pub async fn next_sequence_send( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/NextSequenceSend"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "NextSequenceSend", + "ibc.core.channel.v1.Msg", + "Acknowledgement", )); self.inner.unary(req, path, codec).await } @@ -399,14 +285,14 @@ pub mod query_client { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -417,7 +303,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -432,7 +318,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -445,7 +334,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -478,10 +367,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn channel_open_init( + pub async fn channel( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -490,19 +379,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/ChannelOpenInit"); + let path = http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/Channel"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Msg", - "ChannelOpenInit", - )); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channel")); self.inner.unary(req, path, codec).await } - pub async fn channel_open_try( + pub async fn channels( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -511,18 +397,19 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/ChannelOpenTry"); + let path = http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/Channels"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenTry")); + .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channels")); self.inner.unary(req, path, codec).await } - pub async fn channel_open_ack( + pub async fn connection_channels( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -530,17 +417,68 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/ChannelOpenAck"); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/ConnectionChannels", + ); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenAck")); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.channel.v1.Query", + "ConnectionChannels", + )); self.inner.unary(req, path, codec).await } - pub async fn channel_open_confirm( + pub async fn channel_client_state( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/ChannelClientState", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.channel.v1.Query", + "ChannelClientState", + )); + self.inner.unary(req, path, codec).await + } + pub async fn channel_consensus_state( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/ChannelConsensusState", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.channel.v1.Query", + "ChannelConsensusState", + )); + self.inner.unary(req, path, codec).await + } + pub async fn packet_commitment( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -550,18 +488,42 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/ChannelOpenConfirm"); + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/PacketCommitment"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Msg", - "ChannelOpenConfirm", + "ibc.core.channel.v1.Query", + "PacketCommitment", )); self.inner.unary(req, path, codec).await } - pub async fn channel_close_init( + pub async fn packet_commitments( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/PacketCommitments", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.channel.v1.Query", + "PacketCommitments", + )); + self.inner.unary(req, path, codec).await + } + pub async fn packet_receipt( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -571,19 +533,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/ChannelCloseInit"); + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/PacketReceipt"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Msg", - "ChannelCloseInit", + "ibc.core.channel.v1.Query", + "PacketReceipt", )); self.inner.unary(req, path, codec).await } - pub async fn channel_close_confirm( + pub async fn packet_acknowledgement( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -594,20 +556,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelCloseConfirm", + "/ibc.core.channel.v1.Query/PacketAcknowledgement", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Msg", - "ChannelCloseConfirm", + "ibc.core.channel.v1.Query", + "PacketAcknowledgement", )); self.inner.unary(req, path, codec).await } - pub async fn recv_packet( + pub async fn packet_acknowledgements( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -615,17 +579,23 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/RecvPacket"); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/PacketAcknowledgements", + ); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "RecvPacket")); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.channel.v1.Query", + "PacketAcknowledgements", + )); self.inner.unary(req, path, codec).await } - pub async fn timeout( + pub async fn unreceived_packets( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -633,16 +603,20 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/Timeout"); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/UnreceivedPackets", + ); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "Timeout")); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.channel.v1.Query", + "UnreceivedPackets", + )); self.inner.unary(req, path, codec).await } - pub async fn timeout_on_close( + pub async fn unreceived_acks( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -652,16 +626,42 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/TimeoutOnClose"); + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/UnreceivedAcks"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "TimeoutOnClose")); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.channel.v1.Query", + "UnreceivedAcks", + )); self.inner.unary(req, path, codec).await } - pub async fn acknowledgement( + pub async fn next_sequence_receive( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/NextSequenceReceive", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.channel.v1.Query", + "NextSequenceReceive", + )); + self.inner.unary(req, path, codec).await + } + pub async fn next_sequence_send( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -671,11 +671,11 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Msg/Acknowledgement"); + http::uri::PathAndQuery::from_static("/ibc.core.channel.v1.Query/NextSequenceSend"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Msg", - "Acknowledgement", + "ibc.core.channel.v1.Query", + "NextSequenceSend", )); self.inner.unary(req, path, codec).await } diff --git a/generated/rust/protos/src/ibc.core.client.v1.rs b/generated/rust/protos/src/ibc.core.client.v1.rs index 3c0329dec9..5b063f0c32 100644 --- a/generated/rust/protos/src/ibc.core.client.v1.rs +++ b/generated/rust/protos/src/ibc.core.client.v1.rs @@ -238,605 +238,605 @@ impl ::prost::Name for IdentifiedGenesisMetadata { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientStateRequest is the request type for the Query/ClientState RPC -/// method +/// MsgCreateClient defines a message to create an IBC client #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStateRequest { - /// client state unique identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, +pub struct MsgCreateClient { + /// light client state + #[prost(message, optional, tag = "1")] + pub client_state: ::core::option::Option<::pbjson_types::Any>, + /// consensus state associated with the client that corresponds to a given + /// height. + #[prost(message, optional, tag = "2")] + pub consensus_state: ::core::option::Option<::pbjson_types::Any>, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryClientStateRequest { - const NAME: &'static str = "QueryClientStateRequest"; +impl ::prost::Name for MsgCreateClient { + const NAME: &'static str = "MsgCreateClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientStateResponse is the response type for the Query/ClientState RPC -/// method. Besides the client state, it includes a proof and the height from -/// which the proof was retrieved. +/// MsgCreateClientResponse defines the Msg/CreateClient response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStateResponse { - /// client state associated with the request identifier - #[prost(message, optional, tag = "1")] - pub client_state: ::core::option::Option<::pbjson_types::Any>, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryClientStateResponse { - const NAME: &'static str = "QueryClientStateResponse"; +pub struct MsgCreateClientResponse {} +impl ::prost::Name for MsgCreateClientResponse { + const NAME: &'static str = "MsgCreateClientResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientStatesRequest is the request type for the Query/ClientStates RPC -/// method +/// MsgUpdateClient defines an sdk.Msg to update a IBC client state using +/// the given client message. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatesRequest { - /// pagination request - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, +pub struct MsgUpdateClient { + /// client unique identifier + #[prost(string, tag = "1")] + pub client_id: ::prost::alloc::string::String, + /// client message to update the light client + #[prost(message, optional, tag = "2")] + pub client_message: ::core::option::Option<::pbjson_types::Any>, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryClientStatesRequest { - const NAME: &'static str = "QueryClientStatesRequest"; +impl ::prost::Name for MsgUpdateClient { + const NAME: &'static str = "MsgUpdateClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientStatesResponse is the response type for the Query/ClientStates RPC -/// method. +/// MsgUpdateClientResponse defines the Msg/UpdateClient response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatesResponse { - /// list of stored ClientStates of the chain. - #[prost(message, repeated, tag = "1")] - pub client_states: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryClientStatesResponse { - const NAME: &'static str = "QueryClientStatesResponse"; +pub struct MsgUpdateClientResponse {} +impl ::prost::Name for MsgUpdateClientResponse { + const NAME: &'static str = "MsgUpdateClientResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStateRequest is the request type for the Query/ConsensusState -/// RPC method. Besides the consensus state, it includes a proof and the height -/// from which the proof was retrieved. +/// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client +/// state #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStateRequest { - /// client identifier +pub struct MsgUpgradeClient { + /// client unique identifier #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, - /// consensus state revision number - #[prost(uint64, tag = "2")] - pub revision_number: u64, - /// consensus state revision height - #[prost(uint64, tag = "3")] - pub revision_height: u64, - /// latest_height overrrides the height field and queries the latest stored - /// ConsensusState - #[prost(bool, tag = "4")] - pub latest_height: bool, + /// upgraded client state + #[prost(message, optional, tag = "2")] + pub client_state: ::core::option::Option<::pbjson_types::Any>, + /// upgraded consensus state, only contains enough information to serve as a + /// basis of trust in update logic + #[prost(message, optional, tag = "3")] + pub consensus_state: ::core::option::Option<::pbjson_types::Any>, + /// proof that old chain committed to new client + #[prost(bytes = "vec", tag = "4")] + pub proof_upgrade_client: ::prost::alloc::vec::Vec, + /// proof that old chain committed to new consensus state + #[prost(bytes = "vec", tag = "5")] + pub proof_upgrade_consensus_state: ::prost::alloc::vec::Vec, + /// signer address + #[prost(string, tag = "6")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConsensusStateRequest { - const NAME: &'static str = "QueryConsensusStateRequest"; +impl ::prost::Name for MsgUpgradeClient { + const NAME: &'static str = "MsgUpgradeClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStateResponse is the response type for the Query/ConsensusState -/// RPC method +/// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStateResponse { - /// consensus state associated with the client identifier at the given height - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option<::pbjson_types::Any>, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryConsensusStateResponse { - const NAME: &'static str = "QueryConsensusStateResponse"; +pub struct MsgUpgradeClientResponse {} +impl ::prost::Name for MsgUpgradeClientResponse { + const NAME: &'static str = "MsgUpgradeClientResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates -/// RPC method. +/// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for +/// light client misbehaviour. +/// This message has been deprecated. Use MsgUpdateClient instead. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStatesRequest { - /// client identifier +pub struct MsgSubmitMisbehaviour { + /// client unique identifier #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, - /// pagination request + /// misbehaviour used for freezing the light client #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, + pub misbehaviour: ::core::option::Option<::pbjson_types::Any>, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConsensusStatesRequest { - const NAME: &'static str = "QueryConsensusStatesRequest"; +impl ::prost::Name for MsgSubmitMisbehaviour { + const NAME: &'static str = "MsgSubmitMisbehaviour"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStatesResponse is the response type for the -/// Query/ConsensusStates RPC method +/// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response +/// type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStatesResponse { - /// consensus states associated with the identifier - #[prost(message, repeated, tag = "1")] - pub consensus_states: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryConsensusStatesResponse { - const NAME: &'static str = "QueryConsensusStatesResponse"; +pub struct MsgSubmitMisbehaviourResponse {} +impl ::prost::Name for MsgSubmitMisbehaviourResponse { + const NAME: &'static str = "MsgSubmitMisbehaviourResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights -/// RPC method. +/// MsgRecoverClient defines the message used to recover a frozen or expired client. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStateHeightsRequest { - /// client identifier +pub struct MsgRecoverClient { + /// the client identifier for the client to be updated if the proposal passes #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, + pub subject_client_id: ::prost::alloc::string::String, + /// the substitute client identifier for the client which will replace the subject + /// client + #[prost(string, tag = "2")] + pub substitute_client_id: ::prost::alloc::string::String, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConsensusStateHeightsRequest { - const NAME: &'static str = "QueryConsensusStateHeightsRequest"; +impl ::prost::Name for MsgRecoverClient { + const NAME: &'static str = "MsgRecoverClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStateHeightsResponse is the response type for the -/// Query/ConsensusStateHeights RPC method +/// MsgRecoverClientResponse defines the Msg/RecoverClient response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStateHeightsResponse { - /// consensus state heights - #[prost(message, repeated, tag = "1")] - pub consensus_state_heights: ::prost::alloc::vec::Vec, - /// pagination response +pub struct MsgRecoverClientResponse {} +impl ::prost::Name for MsgRecoverClientResponse { + const NAME: &'static str = "MsgRecoverClientResponse"; + const PACKAGE: &'static str = "ibc.core.client.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + } +} +/// MsgIBCSoftwareUpgrade defines the message used to schedule an upgrade of an IBC client using a v1 governance proposal +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgIbcSoftwareUpgrade { + #[prost(message, optional, tag = "1")] + pub plan: ::core::option::Option, + /// An UpgradedClientState must be provided to perform an IBC breaking upgrade. + /// This will make the chain commit to the correct upgraded (self) client state + /// before the upgrade occurs, so that connecting chains can verify that the + /// new upgraded client is valid by verifying a proof on the previous version + /// of the chain. This will allow IBC connections to persist smoothly across + /// planned chain upgrades. Correspondingly, the UpgradedClientState field has been + /// deprecated in the Cosmos SDK to allow for this logic to exist solely in + /// the 02-client module. #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, + pub upgraded_client_state: ::core::option::Option<::pbjson_types::Any>, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConsensusStateHeightsResponse { - const NAME: &'static str = "QueryConsensusStateHeightsResponse"; +impl ::prost::Name for MsgIbcSoftwareUpgrade { + const NAME: &'static str = "MsgIBCSoftwareUpgrade"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC -/// method +/// MsgIBCSoftwareUpgradeResponse defines the Msg/IBCSoftwareUpgrade response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatusRequest { - /// client unique identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryClientStatusRequest { - const NAME: &'static str = "QueryClientStatusRequest"; +pub struct MsgIbcSoftwareUpgradeResponse {} +impl ::prost::Name for MsgIbcSoftwareUpgradeResponse { + const NAME: &'static str = "MsgIBCSoftwareUpgradeResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC -/// method. It returns the current status of the IBC client. +/// MsgUpdateParams defines the sdk.Msg type to update the client parameters. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatusResponse { +pub struct MsgUpdateParams { + /// signer address #[prost(string, tag = "1")] - pub status: ::prost::alloc::string::String, + pub signer: ::prost::alloc::string::String, + /// params defines the client parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, } -impl ::prost::Name for QueryClientStatusResponse { - const NAME: &'static str = "QueryClientStatusResponse"; +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientParamsRequest is the request type for the Query/ClientParams RPC -/// method. +/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientParamsRequest {} -impl ::prost::Name for QueryClientParamsRequest { - const NAME: &'static str = "QueryClientParamsRequest"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientParamsResponse is the response type for the Query/ClientParams RPC -/// method. +/// QueryClientStateRequest is the request type for the Query/ClientState RPC +/// method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, +pub struct QueryClientStateRequest { + /// client state unique identifier + #[prost(string, tag = "1")] + pub client_id: ::prost::alloc::string::String, } -impl ::prost::Name for QueryClientParamsResponse { - const NAME: &'static str = "QueryClientParamsResponse"; +impl ::prost::Name for QueryClientStateRequest { + const NAME: &'static str = "QueryClientStateRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryUpgradedClientStateRequest is the request type for the -/// Query/UpgradedClientState RPC method +/// QueryClientStateResponse is the response type for the Query/ClientState RPC +/// method. Besides the client state, it includes a proof and the height from +/// which the proof was retrieved. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedClientStateRequest {} -impl ::prost::Name for QueryUpgradedClientStateRequest { - const NAME: &'static str = "QueryUpgradedClientStateRequest"; +pub struct QueryClientStateResponse { + /// client state associated with the request identifier + #[prost(message, optional, tag = "1")] + pub client_state: ::core::option::Option<::pbjson_types::Any>, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryClientStateResponse { + const NAME: &'static str = "QueryClientStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryUpgradedClientStateResponse is the response type for the -/// Query/UpgradedClientState RPC method. +/// QueryClientStatesRequest is the request type for the Query/ClientStates RPC +/// method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedClientStateResponse { - /// client state associated with the request identifier +pub struct QueryClientStatesRequest { + /// pagination request #[prost(message, optional, tag = "1")] - pub upgraded_client_state: ::core::option::Option<::pbjson_types::Any>, + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for QueryUpgradedClientStateResponse { - const NAME: &'static str = "QueryUpgradedClientStateResponse"; +impl ::prost::Name for QueryClientStatesRequest { + const NAME: &'static str = "QueryClientStatesRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryUpgradedConsensusStateRequest is the request type for the -/// Query/UpgradedConsensusState RPC method +/// QueryClientStatesResponse is the response type for the Query/ClientStates RPC +/// method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedConsensusStateRequest {} -impl ::prost::Name for QueryUpgradedConsensusStateRequest { - const NAME: &'static str = "QueryUpgradedConsensusStateRequest"; +pub struct QueryClientStatesResponse { + /// list of stored ClientStates of the chain. + #[prost(message, repeated, tag = "1")] + pub client_states: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryClientStatesResponse { + const NAME: &'static str = "QueryClientStatesResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryUpgradedConsensusStateResponse is the response type for the -/// Query/UpgradedConsensusState RPC method. +/// QueryConsensusStateRequest is the request type for the Query/ConsensusState +/// RPC method. Besides the consensus state, it includes a proof and the height +/// from which the proof was retrieved. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedConsensusStateResponse { - /// Consensus state associated with the request identifier - #[prost(message, optional, tag = "1")] - pub upgraded_consensus_state: ::core::option::Option<::pbjson_types::Any>, +pub struct QueryConsensusStateRequest { + /// client identifier + #[prost(string, tag = "1")] + pub client_id: ::prost::alloc::string::String, + /// consensus state revision number + #[prost(uint64, tag = "2")] + pub revision_number: u64, + /// consensus state revision height + #[prost(uint64, tag = "3")] + pub revision_height: u64, + /// latest_height overrrides the height field and queries the latest stored + /// ConsensusState + #[prost(bool, tag = "4")] + pub latest_height: bool, } -impl ::prost::Name for QueryUpgradedConsensusStateResponse { - const NAME: &'static str = "QueryUpgradedConsensusStateResponse"; +impl ::prost::Name for QueryConsensusStateRequest { + const NAME: &'static str = "QueryConsensusStateRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgCreateClient defines a message to create an IBC client +/// QueryConsensusStateResponse is the response type for the Query/ConsensusState +/// RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateClient { - /// light client state +pub struct QueryConsensusStateResponse { + /// consensus state associated with the client identifier at the given height #[prost(message, optional, tag = "1")] - pub client_state: ::core::option::Option<::pbjson_types::Any>, - /// consensus state associated with the client that corresponds to a given - /// height. - #[prost(message, optional, tag = "2")] pub consensus_state: ::core::option::Option<::pbjson_types::Any>, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgCreateClient { - const NAME: &'static str = "MsgCreateClient"; - const PACKAGE: &'static str = "ibc.core.client.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) - } + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, } -/// MsgCreateClientResponse defines the Msg/CreateClient response type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateClientResponse {} -impl ::prost::Name for MsgCreateClientResponse { - const NAME: &'static str = "MsgCreateClientResponse"; +impl ::prost::Name for QueryConsensusStateResponse { + const NAME: &'static str = "QueryConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpdateClient defines an sdk.Msg to update a IBC client state using -/// the given client message. +/// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates +/// RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateClient { - /// client unique identifier +pub struct QueryConsensusStatesRequest { + /// client identifier #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, - /// client message to update the light client + /// pagination request #[prost(message, optional, tag = "2")] - pub client_message: ::core::option::Option<::pbjson_types::Any>, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgUpdateClient { - const NAME: &'static str = "MsgUpdateClient"; +impl ::prost::Name for QueryConsensusStatesRequest { + const NAME: &'static str = "QueryConsensusStatesRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpdateClientResponse defines the Msg/UpdateClient response type. +/// QueryConsensusStatesResponse is the response type for the +/// Query/ConsensusStates RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateClientResponse {} -impl ::prost::Name for MsgUpdateClientResponse { - const NAME: &'static str = "MsgUpdateClientResponse"; +pub struct QueryConsensusStatesResponse { + /// consensus states associated with the identifier + #[prost(message, repeated, tag = "1")] + pub consensus_states: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryConsensusStatesResponse { + const NAME: &'static str = "QueryConsensusStatesResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client -/// state +/// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights +/// RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpgradeClient { - /// client unique identifier +pub struct QueryConsensusStateHeightsRequest { + /// client identifier #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, - /// upgraded client state + /// pagination request #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option<::pbjson_types::Any>, - /// upgraded consensus state, only contains enough information to serve as a - /// basis of trust in update logic - #[prost(message, optional, tag = "3")] - pub consensus_state: ::core::option::Option<::pbjson_types::Any>, - /// proof that old chain committed to new client - #[prost(bytes = "vec", tag = "4")] - pub proof_upgrade_client: ::prost::alloc::vec::Vec, - /// proof that old chain committed to new consensus state - #[prost(bytes = "vec", tag = "5")] - pub proof_upgrade_consensus_state: ::prost::alloc::vec::Vec, - /// signer address - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgUpgradeClient { - const NAME: &'static str = "MsgUpgradeClient"; +impl ::prost::Name for QueryConsensusStateHeightsRequest { + const NAME: &'static str = "QueryConsensusStateHeightsRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. +/// QueryConsensusStateHeightsResponse is the response type for the +/// Query/ConsensusStateHeights RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpgradeClientResponse {} -impl ::prost::Name for MsgUpgradeClientResponse { - const NAME: &'static str = "MsgUpgradeClientResponse"; +pub struct QueryConsensusStateHeightsResponse { + /// consensus state heights + #[prost(message, repeated, tag = "1")] + pub consensus_state_heights: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryConsensusStateHeightsResponse { + const NAME: &'static str = "QueryConsensusStateHeightsResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for -/// light client misbehaviour. -/// This message has been deprecated. Use MsgUpdateClient instead. +/// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC +/// method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitMisbehaviour { +pub struct QueryClientStatusRequest { /// client unique identifier #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, - /// misbehaviour used for freezing the light client - #[prost(message, optional, tag = "2")] - pub misbehaviour: ::core::option::Option<::pbjson_types::Any>, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for MsgSubmitMisbehaviour { - const NAME: &'static str = "MsgSubmitMisbehaviour"; +impl ::prost::Name for QueryClientStatusRequest { + const NAME: &'static str = "QueryClientStatusRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response -/// type. +/// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC +/// method. It returns the current status of the IBC client. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitMisbehaviourResponse {} -impl ::prost::Name for MsgSubmitMisbehaviourResponse { - const NAME: &'static str = "MsgSubmitMisbehaviourResponse"; +pub struct QueryClientStatusResponse { + #[prost(string, tag = "1")] + pub status: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryClientStatusResponse { + const NAME: &'static str = "QueryClientStatusResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgRecoverClient defines the message used to recover a frozen or expired client. +/// QueryClientParamsRequest is the request type for the Query/ClientParams RPC +/// method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRecoverClient { - /// the client identifier for the client to be updated if the proposal passes - #[prost(string, tag = "1")] - pub subject_client_id: ::prost::alloc::string::String, - /// the substitute client identifier for the client which will replace the subject - /// client - #[prost(string, tag = "2")] - pub substitute_client_id: ::prost::alloc::string::String, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgRecoverClient { - const NAME: &'static str = "MsgRecoverClient"; +pub struct QueryClientParamsRequest {} +impl ::prost::Name for QueryClientParamsRequest { + const NAME: &'static str = "QueryClientParamsRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgRecoverClientResponse defines the Msg/RecoverClient response type. +/// QueryClientParamsResponse is the response type for the Query/ClientParams RPC +/// method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRecoverClientResponse {} -impl ::prost::Name for MsgRecoverClientResponse { - const NAME: &'static str = "MsgRecoverClientResponse"; +pub struct QueryClientParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryClientParamsResponse { + const NAME: &'static str = "QueryClientParamsResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgIBCSoftwareUpgrade defines the message used to schedule an upgrade of an IBC client using a v1 governance proposal +/// QueryUpgradedClientStateRequest is the request type for the +/// Query/UpgradedClientState RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcSoftwareUpgrade { - #[prost(message, optional, tag = "1")] - pub plan: ::core::option::Option, - /// An UpgradedClientState must be provided to perform an IBC breaking upgrade. - /// This will make the chain commit to the correct upgraded (self) client state - /// before the upgrade occurs, so that connecting chains can verify that the - /// new upgraded client is valid by verifying a proof on the previous version - /// of the chain. This will allow IBC connections to persist smoothly across - /// planned chain upgrades. Correspondingly, the UpgradedClientState field has been - /// deprecated in the Cosmos SDK to allow for this logic to exist solely in - /// the 02-client module. - #[prost(message, optional, tag = "2")] - pub upgraded_client_state: ::core::option::Option<::pbjson_types::Any>, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgIbcSoftwareUpgrade { - const NAME: &'static str = "MsgIBCSoftwareUpgrade"; +pub struct QueryUpgradedClientStateRequest {} +impl ::prost::Name for QueryUpgradedClientStateRequest { + const NAME: &'static str = "QueryUpgradedClientStateRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgIBCSoftwareUpgradeResponse defines the Msg/IBCSoftwareUpgrade response type. +/// QueryUpgradedClientStateResponse is the response type for the +/// Query/UpgradedClientState RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcSoftwareUpgradeResponse {} -impl ::prost::Name for MsgIbcSoftwareUpgradeResponse { - const NAME: &'static str = "MsgIBCSoftwareUpgradeResponse"; +pub struct QueryUpgradedClientStateResponse { + /// client state associated with the request identifier + #[prost(message, optional, tag = "1")] + pub upgraded_client_state: ::core::option::Option<::pbjson_types::Any>, +} +impl ::prost::Name for QueryUpgradedClientStateResponse { + const NAME: &'static str = "QueryUpgradedClientStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpdateParams defines the sdk.Msg type to update the client parameters. +/// QueryUpgradedConsensusStateRequest is the request type for the +/// Query/UpgradedConsensusState RPC method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the client parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +pub struct QueryUpgradedConsensusStateRequest {} +impl ::prost::Name for QueryUpgradedConsensusStateRequest { + const NAME: &'static str = "QueryUpgradedConsensusStateRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. +/// QueryUpgradedConsensusStateResponse is the response type for the +/// Query/UpgradedConsensusState RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryUpgradedConsensusStateResponse { + /// Consensus state associated with the request identifier + #[prost(message, optional, tag = "1")] + pub upgraded_consensus_state: ::core::option::Option<::pbjson_types::Any>, +} +impl ::prost::Name for QueryUpgradedConsensusStateResponse { + const NAME: &'static str = "QueryUpgradedConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) diff --git a/generated/rust/protos/src/ibc.core.client.v1.tonic.rs b/generated/rust/protos/src/ibc.core.client.v1.tonic.rs index 951ced054d..be354e169c 100644 --- a/generated/rust/protos/src/ibc.core.client.v1.tonic.rs +++ b/generated/rust/protos/src/ibc.core.client.v1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,10 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn client_state( + pub async fn create_client( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -95,17 +92,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientState"); + let path = http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/CreateClient"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientState")); + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "CreateClient")); self.inner.unary(req, path, codec).await } - pub async fn client_states( + pub async fn update_client( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -114,17 +110,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientStates"); + let path = http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/UpdateClient"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStates")); + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpdateClient")); self.inner.unary(req, path, codec).await } - pub async fn consensus_state( + pub async fn upgrade_client( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -134,18 +129,16 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ConsensusState"); + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/UpgradeClient"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Query", - "ConsensusState", - )); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpgradeClient")); self.inner.unary(req, path, codec).await } - pub async fn consensus_states( + pub async fn submit_misbehaviour( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -155,42 +148,18 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ConsensusStates"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Query", - "ConsensusStates", - )); - self.inner.unary(req, path, codec).await - } - pub async fn consensus_state_heights( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/ConsensusStateHeights", - ); + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/SubmitMisbehaviour"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Query", - "ConsensusStateHeights", + "ibc.core.client.v1.Msg", + "SubmitMisbehaviour", )); self.inner.unary(req, path, codec).await } - pub async fn client_status( + pub async fn recover_client( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -200,16 +169,16 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientStatus"); + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/RecoverClient"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStatus")); + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "RecoverClient")); self.inner.unary(req, path, codec).await } - pub async fn client_params( + pub async fn ibc_software_upgrade( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -219,43 +188,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientParams"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientParams")); - self.inner.unary(req, path, codec).await - } - pub async fn upgraded_client_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/UpgradedClientState", - ); + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/IBCSoftwareUpgrade"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Query", - "UpgradedClientState", + "ibc.core.client.v1.Msg", + "IBCSoftwareUpgrade", )); self.inner.unary(req, path, codec).await } - pub async fn upgraded_consensus_state( + pub async fn update_client_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -263,13 +208,12 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/UpgradedConsensusState", - ); + let path = + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/UpdateClientParams"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Query", - "UpgradedConsensusState", + "ibc.core.client.v1.Msg", + "UpdateClientParams", )); self.inner.unary(req, path, codec).await } @@ -277,14 +221,14 @@ pub mod query_client { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -295,7 +239,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -310,7 +254,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -323,7 +270,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -356,10 +303,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn create_client( + pub async fn client_state( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -368,16 +315,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/CreateClient"); + let path = + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientState"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "CreateClient")); + .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientState")); self.inner.unary(req, path, codec).await } - pub async fn update_client( + pub async fn client_states( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -386,16 +334,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/UpdateClient"); + let path = + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientStates"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpdateClient")); + .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStates")); self.inner.unary(req, path, codec).await } - pub async fn upgrade_client( + pub async fn consensus_state( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -405,16 +354,18 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/UpgradeClient"); + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ConsensusState"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpgradeClient")); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.client.v1.Query", + "ConsensusState", + )); self.inner.unary(req, path, codec).await } - pub async fn submit_misbehaviour( + pub async fn consensus_states( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -424,18 +375,42 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/SubmitMisbehaviour"); + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ConsensusStates"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Msg", - "SubmitMisbehaviour", + "ibc.core.client.v1.Query", + "ConsensusStates", )); self.inner.unary(req, path, codec).await } - pub async fn recover_client( + pub async fn consensus_state_heights( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.client.v1.Query/ConsensusStateHeights", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.client.v1.Query", + "ConsensusStateHeights", + )); + self.inner.unary(req, path, codec).await + } + pub async fn client_status( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -445,16 +420,16 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/RecoverClient"); + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientStatus"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "RecoverClient")); + .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStatus")); self.inner.unary(req, path, codec).await } - pub async fn ibc_software_upgrade( + pub async fn client_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -464,19 +439,43 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/IBCSoftwareUpgrade"); + http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientParams"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientParams")); + self.inner.unary(req, path, codec).await + } + pub async fn upgraded_client_state( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.client.v1.Query/UpgradedClientState", + ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Msg", - "IBCSoftwareUpgrade", + "ibc.core.client.v1.Query", + "UpgradedClientState", )); self.inner.unary(req, path, codec).await } - pub async fn update_client_params( + pub async fn upgraded_consensus_state( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -484,12 +483,13 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/UpdateClientParams"); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.client.v1.Query/UpgradedConsensusState", + ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Msg", - "UpdateClientParams", + "ibc.core.client.v1.Query", + "UpgradedConsensusState", )); self.inner.unary(req, path, codec).await } diff --git a/generated/rust/protos/src/ibc.core.connection.v1.rs b/generated/rust/protos/src/ibc.core.connection.v1.rs index 8bbef9972b..d1b70636d6 100644 --- a/generated/rust/protos/src/ibc.core.connection.v1.rs +++ b/generated/rust/protos/src/ibc.core.connection.v1.rs @@ -225,6 +225,224 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } +/// MsgConnectionOpenInit defines the msg sent by an account on Chain A to +/// initialize a connection with Chain B. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgConnectionOpenInit { + #[prost(string, tag = "1")] + pub client_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub counterparty: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub version: ::core::option::Option, + #[prost(uint64, tag = "4")] + pub delay_period: u64, + #[prost(string, tag = "5")] + pub signer: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgConnectionOpenInit { + const NAME: &'static str = "MsgConnectionOpenInit"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response +/// type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgConnectionOpenInitResponse {} +impl ::prost::Name for MsgConnectionOpenInitResponse { + const NAME: &'static str = "MsgConnectionOpenInitResponse"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a +/// connection on Chain B. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgConnectionOpenTry { + #[prost(string, tag = "1")] + pub client_id: ::prost::alloc::string::String, + /// Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. + #[deprecated] + #[prost(string, tag = "2")] + pub previous_connection_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub client_state: ::core::option::Option<::pbjson_types::Any>, + #[prost(message, optional, tag = "4")] + pub counterparty: ::core::option::Option, + #[prost(uint64, tag = "5")] + pub delay_period: u64, + #[prost(message, repeated, tag = "6")] + pub counterparty_versions: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "7")] + pub proof_height: ::core::option::Option, + /// proof of the initialization the connection on Chain A: `UNITIALIZED -> + /// INIT` + #[prost(bytes = "vec", tag = "8")] + pub proof_init: ::prost::alloc::vec::Vec, + /// proof of client state included in message + #[prost(bytes = "vec", tag = "9")] + pub proof_client: ::prost::alloc::vec::Vec, + /// proof of client consensus state + #[prost(bytes = "vec", tag = "10")] + pub proof_consensus: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "11")] + pub consensus_height: ::core::option::Option, + #[prost(string, tag = "12")] + pub signer: ::prost::alloc::string::String, + /// optional proof data for host state machines that are unable to introspect their own consensus state + #[prost(bytes = "vec", tag = "13")] + pub host_consensus_state_proof: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgConnectionOpenTry { + const NAME: &'static str = "MsgConnectionOpenTry"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgConnectionOpenTryResponse {} +impl ::prost::Name for MsgConnectionOpenTryResponse { + const NAME: &'static str = "MsgConnectionOpenTryResponse"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to +/// acknowledge the change of connection state to TRYOPEN on Chain B. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgConnectionOpenAck { + #[prost(string, tag = "1")] + pub connection_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub counterparty_connection_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub version: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub client_state: ::core::option::Option<::pbjson_types::Any>, + #[prost(message, optional, tag = "5")] + pub proof_height: ::core::option::Option, + /// proof of the initialization the connection on Chain B: `UNITIALIZED -> + /// TRYOPEN` + #[prost(bytes = "vec", tag = "6")] + pub proof_try: ::prost::alloc::vec::Vec, + /// proof of client state included in message + #[prost(bytes = "vec", tag = "7")] + pub proof_client: ::prost::alloc::vec::Vec, + /// proof of client consensus state + #[prost(bytes = "vec", tag = "8")] + pub proof_consensus: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "9")] + pub consensus_height: ::core::option::Option, + #[prost(string, tag = "10")] + pub signer: ::prost::alloc::string::String, + /// optional proof data for host state machines that are unable to introspect their own consensus state + #[prost(bytes = "vec", tag = "11")] + pub host_consensus_state_proof: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgConnectionOpenAck { + const NAME: &'static str = "MsgConnectionOpenAck"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgConnectionOpenAckResponse {} +impl ::prost::Name for MsgConnectionOpenAckResponse { + const NAME: &'static str = "MsgConnectionOpenAckResponse"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to +/// acknowledge the change of connection state to OPEN on Chain A. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgConnectionOpenConfirm { + #[prost(string, tag = "1")] + pub connection_id: ::prost::alloc::string::String, + /// proof for the change of the connection state on Chain A: `INIT -> OPEN` + #[prost(bytes = "vec", tag = "2")] + pub proof_ack: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, + #[prost(string, tag = "4")] + pub signer: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgConnectionOpenConfirm { + const NAME: &'static str = "MsgConnectionOpenConfirm"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm +/// response type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgConnectionOpenConfirmResponse {} +impl ::prost::Name for MsgConnectionOpenConfirmResponse { + const NAME: &'static str = "MsgConnectionOpenConfirmResponse"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// MsgUpdateParams defines the sdk.Msg type to update the connection parameters. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the connection parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} /// QueryConnectionRequest is the request type for the Query/Connection RPC /// method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] @@ -465,223 +683,5 @@ impl ::prost::Name for QueryConnectionParamsResponse { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgConnectionOpenInit defines the msg sent by an account on Chain A to -/// initialize a connection with Chain B. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenInit { - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub counterparty: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub version: ::core::option::Option, - #[prost(uint64, tag = "4")] - pub delay_period: u64, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgConnectionOpenInit { - const NAME: &'static str = "MsgConnectionOpenInit"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} -/// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response -/// type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenInitResponse {} -impl ::prost::Name for MsgConnectionOpenInitResponse { - const NAME: &'static str = "MsgConnectionOpenInitResponse"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} -/// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a -/// connection on Chain B. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenTry { - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. - #[deprecated] - #[prost(string, tag = "2")] - pub previous_connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub client_state: ::core::option::Option<::pbjson_types::Any>, - #[prost(message, optional, tag = "4")] - pub counterparty: ::core::option::Option, - #[prost(uint64, tag = "5")] - pub delay_period: u64, - #[prost(message, repeated, tag = "6")] - pub counterparty_versions: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "7")] - pub proof_height: ::core::option::Option, - /// proof of the initialization the connection on Chain A: `UNITIALIZED -> - /// INIT` - #[prost(bytes = "vec", tag = "8")] - pub proof_init: ::prost::alloc::vec::Vec, - /// proof of client state included in message - #[prost(bytes = "vec", tag = "9")] - pub proof_client: ::prost::alloc::vec::Vec, - /// proof of client consensus state - #[prost(bytes = "vec", tag = "10")] - pub proof_consensus: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "11")] - pub consensus_height: ::core::option::Option, - #[prost(string, tag = "12")] - pub signer: ::prost::alloc::string::String, - /// optional proof data for host state machines that are unable to introspect their own consensus state - #[prost(bytes = "vec", tag = "13")] - pub host_consensus_state_proof: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgConnectionOpenTry { - const NAME: &'static str = "MsgConnectionOpenTry"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} -/// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenTryResponse {} -impl ::prost::Name for MsgConnectionOpenTryResponse { - const NAME: &'static str = "MsgConnectionOpenTryResponse"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} -/// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to -/// acknowledge the change of connection state to TRYOPEN on Chain B. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenAck { - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub counterparty_connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub version: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub client_state: ::core::option::Option<::pbjson_types::Any>, - #[prost(message, optional, tag = "5")] - pub proof_height: ::core::option::Option, - /// proof of the initialization the connection on Chain B: `UNITIALIZED -> - /// TRYOPEN` - #[prost(bytes = "vec", tag = "6")] - pub proof_try: ::prost::alloc::vec::Vec, - /// proof of client state included in message - #[prost(bytes = "vec", tag = "7")] - pub proof_client: ::prost::alloc::vec::Vec, - /// proof of client consensus state - #[prost(bytes = "vec", tag = "8")] - pub proof_consensus: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "9")] - pub consensus_height: ::core::option::Option, - #[prost(string, tag = "10")] - pub signer: ::prost::alloc::string::String, - /// optional proof data for host state machines that are unable to introspect their own consensus state - #[prost(bytes = "vec", tag = "11")] - pub host_consensus_state_proof: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgConnectionOpenAck { - const NAME: &'static str = "MsgConnectionOpenAck"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} -/// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenAckResponse {} -impl ::prost::Name for MsgConnectionOpenAckResponse { - const NAME: &'static str = "MsgConnectionOpenAckResponse"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} -/// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to -/// acknowledge the change of connection state to OPEN on Chain A. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenConfirm { - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, - /// proof for the change of the connection state on Chain A: `INIT -> OPEN` - #[prost(bytes = "vec", tag = "2")] - pub proof_ack: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgConnectionOpenConfirm { - const NAME: &'static str = "MsgConnectionOpenConfirm"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} -/// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm -/// response type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenConfirmResponse {} -impl ::prost::Name for MsgConnectionOpenConfirmResponse { - const NAME: &'static str = "MsgConnectionOpenConfirmResponse"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} -/// MsgUpdateParams defines the sdk.Msg type to update the connection parameters. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the connection parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} include!("ibc.core.connection.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/ibc.core.connection.v1.tonic.rs b/generated/rust/protos/src/ibc.core.connection.v1.tonic.rs index 31c6e4865d..85e4b97b75 100644 --- a/generated/rust/protos/src/ibc.core.connection.v1.tonic.rs +++ b/generated/rust/protos/src/ibc.core.connection.v1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,10 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn connection( + pub async fn connection_open_init( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -95,43 +92,21 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.core.connection.v1.Query/Connection"); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.connection.v1.Msg/ConnectionOpenInit", + ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "Connection", + "ibc.core.connection.v1.Msg", + "ConnectionOpenInit", )); self.inner.unary(req, path, codec).await } - pub async fn connections( + pub async fn connection_open_try( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/ibc.core.connection.v1.Query/Connections"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "Connections", - )); - self.inner.unary(req, path, codec).await - } - pub async fn client_connections( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -140,22 +115,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Query/ClientConnections", + "/ibc.core.connection.v1.Msg/ConnectionOpenTry", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "ClientConnections", + "ibc.core.connection.v1.Msg", + "ConnectionOpenTry", )); self.inner.unary(req, path, codec).await } - pub async fn connection_client_state( + pub async fn connection_open_ack( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -164,20 +137,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Query/ConnectionClientState", + "/ibc.core.connection.v1.Msg/ConnectionOpenAck", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "ConnectionClientState", + "ibc.core.connection.v1.Msg", + "ConnectionOpenAck", )); self.inner.unary(req, path, codec).await } - pub async fn connection_consensus_state( + pub async fn connection_open_confirm( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -188,19 +161,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Query/ConnectionConsensusState", + "/ibc.core.connection.v1.Msg/ConnectionOpenConfirm", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "ConnectionConsensusState", + "ibc.core.connection.v1.Msg", + "ConnectionOpenConfirm", )); self.inner.unary(req, path, codec).await } - pub async fn connection_params( + pub async fn update_connection_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -210,12 +183,12 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Query/ConnectionParams", + "/ibc.core.connection.v1.Msg/UpdateConnectionParams", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "ConnectionParams", + "ibc.core.connection.v1.Msg", + "UpdateConnectionParams", )); self.inner.unary(req, path, codec).await } @@ -223,14 +196,14 @@ pub mod query_client { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -241,7 +214,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -256,7 +229,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -269,7 +245,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -302,10 +278,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn connection_open_init( + pub async fn connection( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -314,21 +290,43 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Msg/ConnectionOpenInit", - ); + let path = + http::uri::PathAndQuery::from_static("/ibc.core.connection.v1.Query/Connection"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "ConnectionOpenInit", + "ibc.core.connection.v1.Query", + "Connection", )); self.inner.unary(req, path, codec).await } - pub async fn connection_open_try( + pub async fn connections( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/ibc.core.connection.v1.Query/Connections"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.core.connection.v1.Query", + "Connections", + )); + self.inner.unary(req, path, codec).await + } + pub async fn client_connections( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -337,20 +335,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Msg/ConnectionOpenTry", + "/ibc.core.connection.v1.Query/ClientConnections", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "ConnectionOpenTry", + "ibc.core.connection.v1.Query", + "ClientConnections", )); self.inner.unary(req, path, codec).await } - pub async fn connection_open_ack( + pub async fn connection_client_state( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -359,20 +359,20 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Msg/ConnectionOpenAck", + "/ibc.core.connection.v1.Query/ConnectionClientState", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "ConnectionOpenAck", + "ibc.core.connection.v1.Query", + "ConnectionClientState", )); self.inner.unary(req, path, codec).await } - pub async fn connection_open_confirm( + pub async fn connection_consensus_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -383,19 +383,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Msg/ConnectionOpenConfirm", + "/ibc.core.connection.v1.Query/ConnectionConsensusState", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "ConnectionOpenConfirm", + "ibc.core.connection.v1.Query", + "ConnectionConsensusState", )); self.inner.unary(req, path, codec).await } - pub async fn update_connection_params( + pub async fn connection_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -405,12 +405,12 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Msg/UpdateConnectionParams", + "/ibc.core.connection.v1.Query/ConnectionParams", ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "UpdateConnectionParams", + "ibc.core.connection.v1.Query", + "ConnectionParams", )); self.inner.unary(req, path, codec).await } diff --git a/generated/rust/protos/src/ibc.lightclients.wasm.v1.rs b/generated/rust/protos/src/ibc.lightclients.wasm.v1.rs index b0f1357df4..0d8d19f453 100644 --- a/generated/rust/protos/src/ibc.lightclients.wasm.v1.rs +++ b/generated/rust/protos/src/ibc.lightclients.wasm.v1.rs @@ -1,101 +1,87 @@ // @generated -/// GenesisState defines 08-wasm's keeper genesis state -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// uploaded light client wasm contracts - #[prost(message, repeated, tag = "1")] - pub contracts: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) - } -} -/// Contract stores contract code +/// Wasm light client's Client state #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Contract { - /// contract byte code +pub struct ClientState { + /// bytes encoding the client state of the underlying light client + /// implemented as a Wasm contract. #[prost(bytes = "vec", tag = "1")] - pub code_bytes: ::prost::alloc::vec::Vec, + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] + pub data: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] + pub checksum: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "3")] + pub latest_height: ::core::option::Option, } -impl ::prost::Name for Contract { - const NAME: &'static str = "Contract"; +impl ::prost::Name for ClientState { + const NAME: &'static str = "ClientState"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// QueryChecksumsRequest is the request type for the Query/Checksums RPC method. +/// Wasm light client's ConsensusState #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChecksumsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, +pub struct ConsensusState { + /// bytes encoding the consensus state of the underlying light client + /// implemented as a Wasm contract. + #[prost(bytes = "vec", tag = "1")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] + pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryChecksumsRequest { - const NAME: &'static str = "QueryChecksumsRequest"; +impl ::prost::Name for ConsensusState { + const NAME: &'static str = "ConsensusState"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// QueryChecksumsResponse is the response type for the Query/Checksums RPC method. +/// Wasm light client message (either header(s) or misbehaviour) #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChecksumsResponse { - /// checksums is a list of the hex encoded checksums of all wasm codes stored. - #[prost(string, repeated, tag = "1")] - pub checksums: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, +pub struct ClientMessage { + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryChecksumsResponse { - const NAME: &'static str = "QueryChecksumsResponse"; +impl ::prost::Name for ClientMessage { + const NAME: &'static str = "ClientMessage"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// QueryCodeRequest is the request type for the Query/Code RPC method. +/// GenesisState defines 08-wasm's keeper genesis state #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodeRequest { - /// checksum is a hex encoded string of the code stored. - #[prost(string, tag = "1")] - pub checksum: ::prost::alloc::string::String, +pub struct GenesisState { + /// uploaded light client wasm contracts + #[prost(message, repeated, tag = "1")] + pub contracts: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryCodeRequest { - const NAME: &'static str = "QueryCodeRequest"; +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// QueryCodeResponse is the response type for the Query/Code RPC method. +/// Contract stores contract code #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodeResponse { +pub struct Contract { + /// contract byte code #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, + pub code_bytes: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryCodeResponse { - const NAME: &'static str = "QueryCodeResponse"; +impl ::prost::Name for Contract { + const NAME: &'static str = "Contract"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) @@ -204,57 +190,71 @@ impl ::prost::Name for MsgMigrateContractResponse { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// Wasm light client's Client state +/// QueryChecksumsRequest is the request type for the Query/Checksums RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientState { - /// bytes encoding the client state of the underlying light client - /// implemented as a Wasm contract. - #[prost(bytes = "vec", tag = "1")] - #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] - pub data: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] - pub checksum: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub latest_height: ::core::option::Option, +pub struct QueryChecksumsRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for ClientState { - const NAME: &'static str = "ClientState"; +impl ::prost::Name for QueryChecksumsRequest { + const NAME: &'static str = "QueryChecksumsRequest"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// Wasm light client's ConsensusState +/// QueryChecksumsResponse is the response type for the Query/Checksums RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusState { - /// bytes encoding the consensus state of the underlying light client - /// implemented as a Wasm contract. - #[prost(bytes = "vec", tag = "1")] - #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] - pub data: ::prost::alloc::vec::Vec, +pub struct QueryChecksumsResponse { + /// checksums is a list of the hex encoded checksums of all wasm codes stored. + #[prost(string, repeated, tag = "1")] + pub checksums: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, } -impl ::prost::Name for ConsensusState { - const NAME: &'static str = "ConsensusState"; +impl ::prost::Name for QueryChecksumsResponse { + const NAME: &'static str = "QueryChecksumsResponse"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// Wasm light client message (either header(s) or misbehaviour) +/// QueryCodeRequest is the request type for the Query/Code RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientMessage { +pub struct QueryCodeRequest { + /// checksum is a hex encoded string of the code stored. + #[prost(string, tag = "1")] + pub checksum: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryCodeRequest { + const NAME: &'static str = "QueryCodeRequest"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// QueryCodeResponse is the response type for the Query/Code RPC method. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryCodeResponse { #[prost(bytes = "vec", tag = "1")] pub data: ::prost::alloc::vec::Vec, } -impl ::prost::Name for ClientMessage { - const NAME: &'static str = "ClientMessage"; +impl ::prost::Name for QueryCodeResponse { + const NAME: &'static str = "QueryCodeResponse"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) diff --git a/generated/rust/protos/src/ibc.lightclients.wasm.v1.tonic.rs b/generated/rust/protos/src/ibc.lightclients.wasm.v1.tonic.rs index 0ac7108afc..1413af9303 100644 --- a/generated/rust/protos/src/ibc.lightclients.wasm.v1.tonic.rs +++ b/generated/rust/protos/src/ibc.lightclients.wasm.v1.tonic.rs @@ -1,14 +1,14 @@ // @generated /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -19,7 +19,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -34,10 +34,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -50,7 +47,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -83,10 +80,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn checksums( + pub async fn store_code( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -96,18 +93,39 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.lightclients.wasm.v1.Query/Checksums"); + http::uri::PathAndQuery::from_static("/ibc.lightclients.wasm.v1.Msg/StoreCode"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "StoreCode")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_checksum( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum", + ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.lightclients.wasm.v1.Query", - "Checksums", + "ibc.lightclients.wasm.v1.Msg", + "RemoveChecksum", )); self.inner.unary(req, path, codec).await } - pub async fn code( + pub async fn migrate_contract( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -115,24 +133,28 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/ibc.lightclients.wasm.v1.Query/Code"); + let path = http::uri::PathAndQuery::from_static( + "/ibc.lightclients.wasm.v1.Msg/MigrateContract", + ); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Query", "Code")); + req.extensions_mut().insert(GrpcMethod::new( + "ibc.lightclients.wasm.v1.Msg", + "MigrateContract", + )); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -143,7 +165,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -158,7 +180,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -171,7 +196,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -204,10 +229,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn store_code( + pub async fn checksums( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -217,39 +242,18 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/ibc.lightclients.wasm.v1.Msg/StoreCode"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "StoreCode")); - self.inner.unary(req, path, codec).await - } - pub async fn remove_checksum( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum", - ); + http::uri::PathAndQuery::from_static("/ibc.lightclients.wasm.v1.Query/Checksums"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "ibc.lightclients.wasm.v1.Msg", - "RemoveChecksum", + "ibc.lightclients.wasm.v1.Query", + "Checksums", )); self.inner.unary(req, path, codec).await } - pub async fn migrate_contract( + pub async fn code( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -257,14 +261,10 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.lightclients.wasm.v1.Msg/MigrateContract", - ); + let path = http::uri::PathAndQuery::from_static("/ibc.lightclients.wasm.v1.Query/Code"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.lightclients.wasm.v1.Msg", - "MigrateContract", - )); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Query", "Code")); self.inner.unary(req, path, codec).await } } diff --git a/generated/rust/protos/src/tendermint.abci.rs b/generated/rust/protos/src/tendermint.abci.rs index 8afd529061..c69416eeca 100644 --- a/generated/rust/protos/src/tendermint.abci.rs +++ b/generated/rust/protos/src/tendermint.abci.rs @@ -527,7 +527,7 @@ pub struct ResponseQuery { #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64_opt_default"))] pub value: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "8")] - #[serde(alias = "proofOps")] + #[cfg_attr(feature = "serde", serde(alias = "proofOps"))] pub proof_ops: ::core::option::Option, #[prost(int64, tag = "9")] #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] diff --git a/generated/rust/protos/src/tendermint.crypto.rs b/generated/rust/protos/src/tendermint.crypto.rs index 8c0c429336..f60a61d2dc 100644 --- a/generated/rust/protos/src/tendermint.crypto.rs +++ b/generated/rust/protos/src/tendermint.crypto.rs @@ -112,17 +112,29 @@ pub mod public_key { #[cfg_attr(feature = "serde", serde(tag = "type", content = "value"))] pub enum Sum { #[prost(bytes, tag = "1")] - #[serde(rename = "tendermint/PubKeyEd25519")] - Ed25519(#[serde(with = "::serde_utils::base64")] ::prost::alloc::vec::Vec), + #[cfg_attr(feature = "serde", serde(rename = "tendermint/PubKeyEd25519"))] + Ed25519( + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] + ::prost::alloc::vec::Vec, + ), #[prost(bytes, tag = "2")] - #[serde(rename = "tendermint/PubKeySecp256k1")] - Secp256k1(#[serde(with = "::serde_utils::base64")] ::prost::alloc::vec::Vec), + #[cfg_attr(feature = "serde", serde(rename = "tendermint/PubKeySecp256k1"))] + Secp256k1( + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] + ::prost::alloc::vec::Vec, + ), #[prost(bytes, tag = "3")] - #[serde(rename = "tendermint/PubKeyBn254")] - Bn254(#[serde(with = "::serde_utils::base64")] ::prost::alloc::vec::Vec), + #[cfg_attr(feature = "serde", serde(rename = "tendermint/PubKeyBn254"))] + Bn254( + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] + ::prost::alloc::vec::Vec, + ), #[prost(bytes, tag = "4")] - #[serde(rename = "cometbft/PubKeyBls12_381")] - Bls12_381(#[serde(with = "::serde_utils::base64")] ::prost::alloc::vec::Vec), + #[cfg_attr(feature = "serde", serde(rename = "cometbft/PubKeyBls12_381"))] + Bls12_381( + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] + ::prost::alloc::vec::Vec, + ), } } impl ::prost::Name for PublicKey { diff --git a/generated/rust/protos/src/tendermint.p2p.rs b/generated/rust/protos/src/tendermint.p2p.rs index 346865cc33..5514345863 100644 --- a/generated/rust/protos/src/tendermint.p2p.rs +++ b/generated/rust/protos/src/tendermint.p2p.rs @@ -122,7 +122,7 @@ pub struct DefaultNodeInfo { #[prost(message, optional, tag = "1")] pub protocol_version: ::core::option::Option, #[prost(string, tag = "2")] - #[serde(alias = "id")] + #[cfg_attr(feature = "serde", serde(alias = "id"))] pub default_node_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub listen_addr: ::prost::alloc::string::String, diff --git a/generated/rust/protos/src/tendermint.types.rs b/generated/rust/protos/src/tendermint.types.rs index 33e158daf3..10ffddd389 100644 --- a/generated/rust/protos/src/tendermint.types.rs +++ b/generated/rust/protos/src/tendermint.types.rs @@ -1,142 +1,16 @@ // @generated -/// ConsensusParams contains consensus critical parameters that determine the -/// validity of blocks. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusParams { - #[prost(message, optional, tag = "1")] - pub block: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub evidence: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub validator: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub version: ::core::option::Option, - #[prost(message, optional, tag = "5")] - pub abci: ::core::option::Option, -} -impl ::prost::Name for ConsensusParams { - const NAME: &'static str = "ConsensusParams"; - const PACKAGE: &'static str = "tendermint.types"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("tendermint.types.{}", Self::NAME) - } -} -/// BlockParams contains limits on the block size. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlockParams { - /// Max block size, in bytes. - /// Note: must be greater than 0 - #[prost(int64, tag = "1")] - pub max_bytes: i64, - /// Max gas per block. - /// Note: must be greater or equal to -1 - #[prost(int64, tag = "2")] - pub max_gas: i64, -} -impl ::prost::Name for BlockParams { - const NAME: &'static str = "BlockParams"; - const PACKAGE: &'static str = "tendermint.types"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("tendermint.types.{}", Self::NAME) - } -} -/// EvidenceParams determine how we handle evidence of malfeasance. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct EvidenceParams { - /// Max age of evidence, in blocks. - /// - /// The basic formula for calculating this is: MaxAgeDuration / {average block - /// time}. - #[prost(int64, tag = "1")] - pub max_age_num_blocks: i64, - /// Max age of evidence, in time. - /// - /// It should correspond with an app's "unbonding period" or other similar - /// mechanism for handling [Nothing-At-Stake - /// attacks](). - #[prost(message, optional, tag = "2")] - pub max_age_duration: ::core::option::Option<::pbjson_types::Duration>, - /// This sets the maximum size of total evidence in bytes that can be committed in a single block. - /// and should fall comfortably under the max block bytes. - /// Default is 1048576 or 1MB - #[prost(int64, tag = "3")] - pub max_bytes: i64, -} -impl ::prost::Name for EvidenceParams { - const NAME: &'static str = "EvidenceParams"; - const PACKAGE: &'static str = "tendermint.types"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("tendermint.types.{}", Self::NAME) - } -} -/// ValidatorParams restrict the public key types validators can use. -/// NOTE: uses ABCI pubkey naming, not Amino names. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorParams { - #[prost(string, repeated, tag = "1")] - pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for ValidatorParams { - const NAME: &'static str = "ValidatorParams"; - const PACKAGE: &'static str = "tendermint.types"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("tendermint.types.{}", Self::NAME) - } -} -/// VersionParams contains the ABCI application version. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VersionParams { - #[prost(uint64, tag = "1")] - pub app: u64, -} -impl ::prost::Name for VersionParams { - const NAME: &'static str = "VersionParams"; - const PACKAGE: &'static str = "tendermint.types"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("tendermint.types.{}", Self::NAME) - } -} -/// HashedParams is a subset of ConsensusParams. -/// -/// It is hashed into the Header.ConsensusHash. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HashedParams { - #[prost(int64, tag = "1")] - pub block_max_bytes: i64, - #[prost(int64, tag = "2")] - pub block_max_gas: i64, -} -impl ::prost::Name for HashedParams { - const NAME: &'static str = "HashedParams"; - const PACKAGE: &'static str = "tendermint.types"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("tendermint.types.{}", Self::NAME) - } -} -/// ABCIParams configure functionality specific to the Application Blockchain Interface. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AbciParams { - /// vote_extensions_enable_height configures the first height during which - /// vote extensions will be enabled. During this specified height, and for all - /// subsequent heights, precommit messages that do not contain valid extension data - /// will be considered invalid. Prior to this height, vote extensions will not - /// be used or accepted by validators on the network. - /// - /// Once enabled, vote extensions will be created by the application in ExtendVote, - /// passed to the application for validation in VerifyVoteExtension and given - /// to the application to use when proposing a block during PrepareProposal. +pub struct EventDataRoundState { #[prost(int64, tag = "1")] - pub vote_extensions_enable_height: i64, + pub height: i64, + #[prost(int32, tag = "2")] + pub round: i32, + #[prost(string, tag = "3")] + pub step: ::prost::alloc::string::String, } -impl ::prost::Name for AbciParams { - const NAME: &'static str = "ABCIParams"; +impl ::prost::Name for EventDataRoundState { + const NAME: &'static str = "EventDataRoundState"; const PACKAGE: &'static str = "tendermint.types"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("tendermint.types.{}", Self::NAME) @@ -279,7 +153,7 @@ pub struct BlockId { #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_upper_unprefixed"))] pub hash: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] - #[serde(alias = "parts")] + #[cfg_attr(feature = "serde", serde(alias = "parts"))] pub part_set_header: ::core::option::Option, } impl ::prost::Name for BlockId { @@ -667,10 +541,10 @@ pub mod evidence { #[cfg_attr(feature = "serde", serde(tag = "type", content = "value"))] pub enum Sum { #[prost(message, tag = "1")] - #[serde(rename = "tendermint/DuplicateVoteEvidence")] + #[cfg_attr(feature = "serde", serde(rename = "tendermint/DuplicateVoteEvidence"))] DuplicateVoteEvidence(super::DuplicateVoteEvidence), #[prost(message, tag = "2")] - #[serde(rename = "tendermint/DuplicateVoteEvidence")] + #[cfg_attr(feature = "serde", serde(rename = "tendermint/DuplicateVoteEvidence"))] LightClientAttackEvidence(super::LightClientAttackEvidence), } } @@ -691,15 +565,15 @@ pub struct DuplicateVoteEvidence { #[prost(message, optional, tag = "2")] pub vote_b: ::core::option::Option, #[prost(int64, tag = "3")] - #[serde(alias = "TotalVotingPower")] + #[cfg_attr(feature = "serde", serde(alias = "TotalVotingPower"))] #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub total_voting_power: i64, #[prost(int64, tag = "4")] - #[serde(alias = "ValidatorPower")] + #[cfg_attr(feature = "serde", serde(alias = "ValidatorPower"))] #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub validator_power: i64, #[prost(message, optional, tag = "5")] - #[serde(alias = "Timestamp")] + #[cfg_attr(feature = "serde", serde(alias = "Timestamp"))] pub timestamp: ::core::option::Option<::pbjson_types::Timestamp>, } impl ::prost::Name for DuplicateVoteEvidence { @@ -748,43 +622,6 @@ impl ::prost::Name for EvidenceList { ::prost::alloc::format!("tendermint.types.{}", Self::NAME) } } -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Block { - #[prost(message, optional, tag = "1")] - pub header: ::core::option::Option
, - #[prost(message, optional, tag = "2")] - pub data: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub evidence: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub last_commit: ::core::option::Option, -} -impl ::prost::Name for Block { - const NAME: &'static str = "Block"; - const PACKAGE: &'static str = "tendermint.types"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("tendermint.types.{}", Self::NAME) - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventDataRoundState { - #[prost(int64, tag = "1")] - pub height: i64, - #[prost(int32, tag = "2")] - pub round: i32, - #[prost(string, tag = "3")] - pub step: ::prost::alloc::string::String, -} -impl ::prost::Name for EventDataRoundState { - const NAME: &'static str = "EventDataRoundState"; - const PACKAGE: &'static str = "tendermint.types"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("tendermint.types.{}", Self::NAME) - } -} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CanonicalBlockId { @@ -914,4 +751,167 @@ impl ::prost::Name for CanonicalVoteExtension { ::prost::alloc::format!("tendermint.types.{}", Self::NAME) } } +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Block { + #[prost(message, optional, tag = "1")] + pub header: ::core::option::Option
, + #[prost(message, optional, tag = "2")] + pub data: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub evidence: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub last_commit: ::core::option::Option, +} +impl ::prost::Name for Block { + const NAME: &'static str = "Block"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// ConsensusParams contains consensus critical parameters that determine the +/// validity of blocks. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConsensusParams { + #[prost(message, optional, tag = "1")] + pub block: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub evidence: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub validator: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub version: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub abci: ::core::option::Option, +} +impl ::prost::Name for ConsensusParams { + const NAME: &'static str = "ConsensusParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// BlockParams contains limits on the block size. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BlockParams { + /// Max block size, in bytes. + /// Note: must be greater than 0 + #[prost(int64, tag = "1")] + pub max_bytes: i64, + /// Max gas per block. + /// Note: must be greater or equal to -1 + #[prost(int64, tag = "2")] + pub max_gas: i64, +} +impl ::prost::Name for BlockParams { + const NAME: &'static str = "BlockParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// EvidenceParams determine how we handle evidence of malfeasance. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EvidenceParams { + /// Max age of evidence, in blocks. + /// + /// The basic formula for calculating this is: MaxAgeDuration / {average block + /// time}. + #[prost(int64, tag = "1")] + pub max_age_num_blocks: i64, + /// Max age of evidence, in time. + /// + /// It should correspond with an app's "unbonding period" or other similar + /// mechanism for handling [Nothing-At-Stake + /// attacks](). + #[prost(message, optional, tag = "2")] + pub max_age_duration: ::core::option::Option<::pbjson_types::Duration>, + /// This sets the maximum size of total evidence in bytes that can be committed in a single block. + /// and should fall comfortably under the max block bytes. + /// Default is 1048576 or 1MB + #[prost(int64, tag = "3")] + pub max_bytes: i64, +} +impl ::prost::Name for EvidenceParams { + const NAME: &'static str = "EvidenceParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// ValidatorParams restrict the public key types validators can use. +/// NOTE: uses ABCI pubkey naming, not Amino names. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidatorParams { + #[prost(string, repeated, tag = "1")] + pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for ValidatorParams { + const NAME: &'static str = "ValidatorParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// VersionParams contains the ABCI application version. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VersionParams { + #[prost(uint64, tag = "1")] + pub app: u64, +} +impl ::prost::Name for VersionParams { + const NAME: &'static str = "VersionParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// HashedParams is a subset of ConsensusParams. +/// +/// It is hashed into the Header.ConsensusHash. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HashedParams { + #[prost(int64, tag = "1")] + pub block_max_bytes: i64, + #[prost(int64, tag = "2")] + pub block_max_gas: i64, +} +impl ::prost::Name for HashedParams { + const NAME: &'static str = "HashedParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// ABCIParams configure functionality specific to the Application Blockchain Interface. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AbciParams { + /// vote_extensions_enable_height configures the first height during which + /// vote extensions will be enabled. During this specified height, and for all + /// subsequent heights, precommit messages that do not contain valid extension data + /// will be considered invalid. Prior to this height, vote extensions will not + /// be used or accepted by validators on the network. + /// + /// Once enabled, vote extensions will be created by the application in ExtendVote, + /// passed to the application for validation in VerifyVoteExtension and given + /// to the application to use when proposing a block during PrepareProposal. + #[prost(int64, tag = "1")] + pub vote_extensions_enable_height: i64, +} +impl ::prost::Name for AbciParams { + const NAME: &'static str = "ABCIParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} // @@protoc_insertion_point(module) diff --git a/generated/rust/protos/src/union.ibc.lightclients.cometbls.v1.rs b/generated/rust/protos/src/union.ibc.lightclients.cometbls.v1.rs index 17cdeb81ab..e9ecc5d2a3 100644 --- a/generated/rust/protos/src/union.ibc.lightclients.cometbls.v1.rs +++ b/generated/rust/protos/src/union.ibc.lightclients.cometbls.v1.rs @@ -8,18 +8,15 @@ pub struct ClientState { /// submitted headers are valid for upgrade #[prost(uint64, tag = "2")] pub trusting_period: u64, - /// duration of the staking unbonding period - #[prost(uint64, tag = "3")] - pub unbonding_period: u64, /// defines how much new (untrusted) header's Time can drift into the future. - #[prost(uint64, tag = "4")] + #[prost(uint64, tag = "3")] pub max_clock_drift: u64, /// Block height when the client was frozen due to a misbehaviour - #[prost(message, optional, tag = "5")] + #[prost(message, optional, tag = "4")] pub frozen_height: ::core::option::Option, /// Latest height the client was updated to - #[prost(message, optional, tag = "6")] + #[prost(message, optional, tag = "5")] pub latest_height: ::core::option::Option, } @@ -69,7 +66,7 @@ impl ::prost::Name for Misbehaviour { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct LightHeader { +pub struct SignedHeader { #[prost(int64, tag = "1")] pub height: i64, #[prost(message, optional, tag = "2")] @@ -81,8 +78,8 @@ pub struct LightHeader { #[prost(bytes = "vec", tag = "5")] pub app_hash: ::prost::alloc::vec::Vec, } -impl ::prost::Name for LightHeader { - const NAME: &'static str = "LightHeader"; +impl ::prost::Name for SignedHeader { + const NAME: &'static str = "SignedHeader"; const PACKAGE: &'static str = "union.ibc.lightclients.cometbls.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("union.ibc.lightclients.cometbls.v1.{}", Self::NAME) @@ -92,7 +89,7 @@ impl ::prost::Name for LightHeader { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Header { #[prost(message, optional, tag = "1")] - pub signed_header: ::core::option::Option, + pub signed_header: ::core::option::Option, #[prost(message, optional, tag = "2")] pub trusted_height: ::core::option::Option, diff --git a/hubble/Cargo.toml b/hubble/Cargo.toml index 3274307488..4202bba367 100644 --- a/hubble/Cargo.toml +++ b/hubble/Cargo.toml @@ -33,7 +33,6 @@ clap = { workspace = true, features = ["derive", "env", "error-con color-eyre = { workspace = true, features = ["default"] } cometbft-rpc = { workspace = true } const-hex = "1.12.0" -contracts = { workspace = true } futures = { workspace = true, features = ["async-await"] } hex = { workspace = true } itertools = "0.13.0" diff --git a/hubble/src/chain_id_query.rs b/hubble/src/chain_id_query.rs new file mode 100644 index 0000000000..5fc5e6032c --- /dev/null +++ b/hubble/src/chain_id_query.rs @@ -0,0 +1,328 @@ +use std::str::FromStr; + +use alloy::{ + providers::{Provider, ProviderBuilder}, + sol, +}; +use prost::Message; +use protos::ibc::{ + core::client::v1::QueryClientStateRequest, lightclients::wasm::v1::QueryCodeRequest, +}; +use sqlx::PgPool; +use tendermint_rpc::{Client, HttpClient}; +use tracing::warn; +use unionlabs::{ + encoding::{DecodeAs, EthAbi, Proto}, + parse_wasm_client_type, WasmClientType, +}; +sol! { + contract IbcHandler { + function CreateClient(MsgCreateClient calldata) returns (string memory); + } + + struct MsgCreateClient { + string client_type; + bytes client_state_bytes; + bytes consensus_state_bytes; + address relayer; + } +} +use crate::cli::{IndexerConfig, Indexers}; + +#[derive(Debug)] +struct Data { + chain_id: i32, + client_id: String, + counterparty_chain_id: String, +} + +pub async fn tx(db: PgPool, indexers: Indexers) { + let mut datas = vec![]; + + for indexer in indexers { + match indexer { + IndexerConfig::DummyFetcher(_) => {} + IndexerConfig::EthFetcher(_) => {} + IndexerConfig::TmFetcher(_) => {} + IndexerConfig::AptosFetcher(_) => {} + IndexerConfig::Scroll(_) => {} + IndexerConfig::Arb(_) => {} + IndexerConfig::Beacon(_) => {} + IndexerConfig::Bera(_) => {} + IndexerConfig::EthFork(_) => {} + IndexerConfig::Tm(tm_config) => { + let client = HttpClient::new(tm_config.urls[0].as_str()).unwrap(); + + let grpc_url = tm_config.grpc_url.clone().unwrap(); + + let mut grpc_client = + protos::ibc::core::client::v1::query_client::QueryClient::connect( + grpc_url.clone(), + ) + .await + .unwrap(); + + let chain_id = client.status().await.unwrap().node_info.network.to_string(); + + let tm_clients = sqlx::query!( + r#" + select cc.client_id, ch.id + from v0_cosmos.create_client cc + join v0.chains ch on cc.chain_id = ch.id + left join v0.clients cl on + cl.chain_id = ch.id and + cl.client_id = cc.client_id + where + ch.chain_id = $1 and + cc.client_id is not null + and cl.chain_id is null + "#, + chain_id + ) + .fetch_all(&db) + .await + .unwrap(); + + for record in tm_clients { + let client_id = record.client_id.unwrap(); + let client_state = grpc_client + .client_state(QueryClientStateRequest { + client_id: client_id.clone(), + }) + .await + .unwrap() + .into_inner() + .client_state + .unwrap(); + + match &*client_state.type_url { + "/ibc.lightclients.wasm.v1.ClientState" => { + let cs = protos::ibc::lightclients::wasm::v1::ClientState::decode( + &*client_state.value, + ) + .unwrap(); + + let mut client = + protos::ibc::lightclients::wasm::v1::query_client::QueryClient::connect( + grpc_url.clone(), + ) + .await + .unwrap(); + + let wasm_blob = client + .code(QueryCodeRequest { + checksum: hex::encode(&*cs.checksum), + }) + .await + .unwrap() + .into_inner() + .data; + + let client_type = parse_wasm_client_type(wasm_blob).unwrap(); + + let counterparty_chain_id = match client_type.unwrap() { + WasmClientType::EthereumMinimal + | WasmClientType::EthereumMainnet => { + let cs = match unionlabs::ibc::lightclients::ethereum::client_state::ClientState::decode_as::(&cs.data) { + Ok(cs) => cs, + // We changed the format of berachain client states, but union-testnet-8 still contains an old configuration which we need to ignore. + Err(err) => { + warn!("error while decoding client {client_id}: {:?}. Most likely due to a client state upgrade. This can then be safely ignored", err); + continue; + } + }; + cs.chain_id.to_string() + } + WasmClientType::Cometbls => { + let cs = match unionlabs::ibc::lightclients::cometbls::client_state::ClientState::decode_as::(&cs.data) { + Ok(cs) => cs, + Err(err) => { + warn!("error while decoding client {client_id}: {:?}. Most likely due to a client state upgrade. This can then be safely ignored", err); + continue + } + }; + + cs.chain_id.as_str().to_owned() + } + WasmClientType::Tendermint => { + let cs = match unionlabs::ibc::lightclients::tendermint::client_state::ClientState::decode_as::(&cs.data) { + Ok(cs) => cs, + Err(err) => { + warn!("error while decoding client {client_id}: {:?}. Most likely due to a client state upgrade. This can then be safely ignored", err); + continue + } + }; + + cs.chain_id + } + WasmClientType::Scroll => { + let cs = match unionlabs::ibc::lightclients::scroll::client_state::ClientState::decode_as::(&cs.data) { + Ok(cs) => cs, + Err(err) => { + warn!("error while decoding client {client_id}: {:?}. Most likely due to a client state upgrade. This can then be safely ignored", err); + continue + } + }; + + cs.chain_id.to_string() + } + WasmClientType::Arbitrum => { + let cs = match unionlabs::ibc::lightclients::arbitrum::client_state::ClientState::decode_as::(&cs.data) { + Ok(cs) => cs, + Err(err) => { + warn!("error while decoding client {client_id}: {:?}. Most likely due to a client state upgrade. This can then be safely ignored", err); + continue + } + }; + + cs.chain_id.to_string() + } + WasmClientType::Linea => todo!("We still need to add linea"), + WasmClientType::Berachain => { + let cs = match unionlabs::ibc::lightclients::berachain::client_state::ClientState::decode_as::(&cs.data) { + Ok(cs) => cs, + // We changed the format of berachain client states, but union-testnet-8 still contains an old configuration which we need to ignore. + Err(err) => { + warn!("error while decoding client {client_id}: {:?}. Most likely due to a client state upgrade. This can then be safely ignored", err); + continue; + } + }; + + cs.execution_chain_id.to_string() + } + WasmClientType::EvmInCosmos => { + todo!("We still need to add evm-in-cosmos") + } + WasmClientType::Movement => { + let cs = match unionlabs::ibc::lightclients::movement::client_state::ClientState::decode_as::(&cs.data) { + Ok(cs) => cs, + Err(err) => { + warn!("error while decoding client {client_id}: {:?}. Most likely due to a client state upgrade. This can then be safely ignored", err); + continue; + } + }; + + cs.chain_id.to_string() + } + }; + + datas.push(Data { + chain_id: record.id, + client_id: client_id.clone(), + counterparty_chain_id, + }) + } + "/ibc.lightclients.tendermint.v1.ClientState" => { + let cs = + protos::ibc::lightclients::tendermint::v1::ClientState::decode( + &*client_state.value, + ) + .unwrap(); + + datas.push(Data { + chain_id: record.id, + client_id: client_id.clone(), + counterparty_chain_id: cs.chain_id, + }) + } + _ => { + panic!("unknown client state type {}", client_state.type_url) + } + }; + } + } + IndexerConfig::Eth(eth_config) => { + let provider = ProviderBuilder::new().on_http(eth_config.urls[0].clone()); + + let chain_id = provider.get_chain_id().await.unwrap().to_string(); + dbg!("hi"); + + let eth_clients = sqlx::query!( + r#" + SELECT + cl.transaction_hash, cl.client_id, ch.id + FROM + v0_evm.client_created cl + JOIN + v0.chains ch + ON + cl.chain_id = ch.id + WHERE + ch.chain_id = $1 + "#, + chain_id + ) + .fetch_all(&db) + .await + .unwrap(); + + for record in eth_clients { + let Some(client_id) = record.client_id else { + tracing::info!( + internal_db_chain_id = record.id, + %chain_id, + "skipping record" + ); + continue; + }; + + let tx = provider + .get_transaction_by_hash( + alloy::primitives::FixedBytes::from_str( + &record.transaction_hash.unwrap(), + ) + .unwrap(), + ) + .await + .unwrap() + .unwrap(); + + let msg = match ::abi_decode(&tx.input,true) { + Ok(msg) => msg, + Err(err) => { + warn!("could not decode CreateClientCall, most likely due to ABI change: {}", err); + continue + } + }; + + match &*msg._0.client_type { + "cometbls" => { + let cs = unionlabs::ibc::lightclients::cometbls::client_state::ClientState::decode_as::(&msg._0.client_state_bytes).unwrap(); + + datas.push(Data { + chain_id: record.id, + client_id, + counterparty_chain_id: cs.chain_id.as_str().to_owned(), + }) + } + ty => panic!("unknown evm client type `{ty}`"), + } + } + } + } + } + + sqlx::query!( + r#" + INSERT INTO + v0.clients (chain_id, client_id, counterparty_chain_id) + SELECT + * + FROM + UNNEST($1::integer[], $2::text[], $3::text[]) + ON CONFLICT DO NOTHING + "#, + &datas.iter().map(|x| x.chain_id).collect::>()[..], + &datas + .iter() + .map(|x| x.client_id.clone()) + .collect::>()[..], + &datas + .iter() + .map(|x| x.counterparty_chain_id.clone()) + .collect::>()[..], + ) + .execute(&db) + .await + .unwrap(); +} diff --git a/hubble/src/indexer/eth/create_client_tracker.rs b/hubble/src/indexer/eth/create_client_tracker.rs index c4e18fc113..91f4a8cc16 100644 --- a/hubble/src/indexer/eth/create_client_tracker.rs +++ b/hubble/src/indexer/eth/create_client_tracker.rs @@ -78,7 +78,7 @@ pub fn schedule_create_client_checker( "#, internal_chain_id, client_id, - cs.chain_id.to_string(), + cs.chain_id.as_str().to_owned(), ) .execute(&pg_pool) .await?; diff --git a/hubble/src/indexer/tm/create_client_tracker.rs b/hubble/src/indexer/tm/create_client_tracker.rs index 0871d96d32..2b306cba7b 100644 --- a/hubble/src/indexer/tm/create_client_tracker.rs +++ b/hubble/src/indexer/tm/create_client_tracker.rs @@ -97,7 +97,7 @@ pub fn schedule_create_client_checker( } }; - cs.chain_id + cs.chain_id.as_str().to_owned() } WasmClientType::Tendermint => { let cs = match unionlabs::ibc::lightclients::tendermint::client_state::ClientState::decode_as::(&cs.data) { diff --git a/lib/arbitrum-verifier/Cargo.toml b/lib/arbitrum-verifier/Cargo.toml index b597057e30..0e054ee005 100644 --- a/lib/arbitrum-verifier/Cargo.toml +++ b/lib/arbitrum-verifier/Cargo.toml @@ -12,8 +12,8 @@ workspace = true # test-include = ["lib/arbitrum-verifier/tests"] [dependencies] +alloy-core = { workspace = true } ethereum-verifier = { workspace = true } -ethers-core = { workspace = true } hex = { workspace = true } hex-literal = { workspace = true } rlp = { workspace = true } diff --git a/lib/beacon-api/src/types.rs b/lib/beacon-api/src/types.rs index 7b18343246..6fecfe7e87 100644 --- a/lib/beacon-api/src/types.rs +++ b/lib/beacon-api/src/types.rs @@ -30,7 +30,7 @@ pub struct BeaconHeaderData { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BeaconHeaderSignature { pub message: BeaconBlockHeader, - pub signature: BlsSignature, + pub signature: H768, } // #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] @@ -136,9 +136,8 @@ pub struct BeaconHeaderSignature { use serde::{Deserialize, Serialize}; use unionlabs::{ - bls::BlsSignature, ethereum::{config::PresetBaseKind, Version}, - hash::H256, + hash::{H256, H768}, ibc::lightclients::ethereum::{ beacon_block_header::BeaconBlockHeader, fork::Fork, fork_parameters::ForkParameters, light_client_update::UnboundedLightClientUpdate, diff --git a/lib/chain-utils/Cargo.toml b/lib/chain-utils/Cargo.toml index 8aa64b0aff..2c7e0fb7f8 100644 --- a/lib/chain-utils/Cargo.toml +++ b/lib/chain-utils/Cargo.toml @@ -9,18 +9,17 @@ workspace = true [dependencies] beacon-api = { workspace = true } -contracts = { workspace = true, features = ["providers"] } protos = { workspace = true, features = ["default", "client"] } serde-utils = { workspace = true } unionlabs = { workspace = true, features = ["default"] } +alloy = { workspace = true } bip32 = { workspace = true, features = ["secp256k1"] } chrono = { workspace = true, features = ["alloc"] } cometbft-rpc = { workspace = true } crossbeam-queue = { workspace = true, features = ["std"] } dashmap = { workspace = true } enumorph = { workspace = true } -ethers = { workspace = true, features = ["rustls", "ws"] } frame-support-procedural = { workspace = true } futures = { workspace = true } hex = { workspace = true } diff --git a/lib/chain-utils/src/arbitrum.rs b/lib/chain-utils/src/arbitrum.rs index bc30230c83..03a4abec2d 100644 --- a/lib/chain-utils/src/arbitrum.rs +++ b/lib/chain-utils/src/arbitrum.rs @@ -1,10 +1,5 @@ use std::sync::Arc; -use contracts::ibc_handler::IBCHandler; -use ethers::{ - contract::{EthAbiCodec, EthAbiType, EthDisplay, EthEvent}, - providers::{Middleware, Provider, ProviderError, Ws, WsClientError}, -}; use serde::{Deserialize, Serialize}; use tracing::{debug, instrument}; use unionlabs::{ @@ -351,7 +346,7 @@ impl Arbitrum { arbitrum::client_state::ClientState { l1_client_id: self.l1_client_id.clone().to_string().validate().unwrap(), chain_id: self.chain_id, - l1_latest_slot: height.revision_height, + l1_latest_slot: height.height(), l1_contract_address: self.l1_contract_address, l1_next_node_num_slot: self.l1_next_node_num_slot, l1_nodes_slot: self.l1_nodes_slot, @@ -371,7 +366,7 @@ impl Arbitrum { height: Height, ) -> arbitrum::consensus_state::ConsensusState { let arbitrum_height = ethers::types::BlockId::Number(ethers::types::BlockNumber::Number( - self.execution_height_of_beacon_slot(height.revision_height) + self.execution_height_of_beacon_slot(height.height()) .await .into(), )); @@ -444,7 +439,7 @@ impl Arbitrum { // // }; // // let block = arbitrum -// // .execution_height_of_beacon_slot(slot.revision_height) +// // .execution_height_of_beacon_slot(slot.height()) // // .await; // // dbg!(block); diff --git a/lib/chain-utils/src/berachain.rs b/lib/chain-utils/src/berachain.rs index e2f0165313..576c958859 100644 --- a/lib/chain-utils/src/berachain.rs +++ b/lib/chain-utils/src/berachain.rs @@ -138,7 +138,7 @@ impl Berachain { async fn self_client_state(&self, height: Height) -> berachain::client_state::ClientState { let commit = self .tm_client - .commit(Some(height.revision_height.try_into().unwrap())) + .commit(Some(height.height().try_into().unwrap())) .await .unwrap(); @@ -176,13 +176,11 @@ impl Berachain { &self, height: Height, ) -> berachain::consensus_state::ConsensusState { - let execution_header = self - .execution_header_at_beacon_slot(height.revision_height) - .await; + let execution_header = self.execution_header_at_beacon_slot(height.height()).await; let commit = self .tm_client - .commit(Some(height.revision_height.try_into().unwrap())) + .commit(Some(height.height().try_into().unwrap())) .await .unwrap(); diff --git a/lib/chain-utils/src/cosmos.rs b/lib/chain-utils/src/cosmos.rs index 1f798fea60..df0f8ce902 100644 --- a/lib/chain-utils/src/cosmos.rs +++ b/lib/chain-utils/src/cosmos.rs @@ -160,9 +160,6 @@ impl Cosmos { #[must_use] pub fn make_height(&self, height: u64) -> Height { - Height { - revision_number: self.chain_revision, - revision_height: height, - } + Height::new_with_revision(self.chain_revision, height) } } diff --git a/lib/chain-utils/src/cosmos_sdk.rs b/lib/chain-utils/src/cosmos_sdk.rs index 31168a7227..03b83c29ff 100644 --- a/lib/chain-utils/src/cosmos_sdk.rs +++ b/lib/chain-utils/src/cosmos_sdk.rs @@ -19,10 +19,10 @@ use unionlabs::{ encoding::{EncodeAs, Proto}, google::protobuf::any::Any, hash::{hash_v2::HexUnprefixed, H256}, - id::{ClientId, ConnectionId}, + id::ClientId, parse_wasm_client_type, signer::CosmosSigner, - ErrorReporter, MaybeRecoverableError, WasmClientType, + ErrorReporter, MaybeRecoverableError, }; use crate::{ @@ -109,7 +109,7 @@ pub trait CosmosSdkChainIbcExt: CosmosSdkChain + CosmosSdkChainRpcs { .data; match parse_wasm_client_type(bz) { - Ok(Some(ty)) => { + Some(ty) => { info!( %checksum, ?ty, @@ -120,16 +120,7 @@ pub trait CosmosSdkChainIbcExt: CosmosSdkChain + CosmosSdkChainRpcs { Some(ty) } - Ok(None) => None, - Err(err) => { - error!( - %checksum, - %err, - "unable to parse wasm client type" - ); - - None - } + None => None, } } @@ -140,7 +131,7 @@ pub trait CosmosSdkChainIbcExt: CosmosSdkChain + CosmosSdkChainRpcs { .await .unwrap() .client_state(protos::ibc::core::client::v1::QueryClientStateRequest { - client_id: client_id.to_string(), + client_id: client_id.to_string_prefixed("08-wasm"), // we assume that this client is an 08-wasm client if we're querying the checksum }) .await .unwrap() @@ -159,25 +150,6 @@ pub trait CosmosSdkChainIbcExt: CosmosSdkChain + CosmosSdkChainRpcs { .try_into() .unwrap() } - - async fn client_id_of_connection(&self, connection_id: ConnectionId) -> ClientId { - protos::ibc::core::connection::v1::query_client::QueryClient::connect( - self.grpc_url().clone(), - ) - .await - .unwrap() - .connection(protos::ibc::core::connection::v1::QueryConnectionRequest { - connection_id: connection_id.to_string(), - }) - .await - .unwrap() - .into_inner() - .connection - .unwrap() - .client_id - .parse() - .unwrap() - } } #[allow(async_fn_in_trait)] @@ -380,7 +352,7 @@ pub trait CosmosSdkChainExt: CosmosSdkChainRpcs { let auth_info = AuthInfo { signer_infos: [SignerInfo { public_key: Some(AnyPubKey::Secp256k1(secp256k1::PubKey { - key: signer.public_key(), + key: signer.public_key().into(), })), mode_info: ModeInfo::Single { mode: SignMode::Direct, diff --git a/lib/chain-utils/src/ethereum.rs b/lib/chain-utils/src/ethereum.rs index b6c2627f44..35ef8276dd 100644 --- a/lib/chain-utils/src/ethereum.rs +++ b/lib/chain-utils/src/ethereum.rs @@ -34,9 +34,8 @@ use unionlabs::{ ibc::lightclients::ethereum::storage_proof::StorageProof, ics24::{ AcknowledgementPath, ChannelEndPath, ClientConsensusStatePath, ClientStatePath, - CommitmentPath, ConnectionPath, IbcPath, NextClientSequencePath, - NextConnectionSequencePath, NextSequenceAckPath, NextSequenceRecvPath, - NextSequenceSendPath, ReceiptPath, + CommitmentPath, ConnectionPath, NextClientSequencePath, NextConnectionSequencePath, + NextSequenceAckPath, NextSequenceRecvPath, NextSequenceSendPath, ReceiptPath, }, uint::U256, ErrorReporter, @@ -413,355 +412,3 @@ impl IbcHandlerExt for IBCHandler { Ok(path.read(self, execution_block_number).await) } } - -pub trait EthereumStateRead: IbcPath { - fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> impl Future + Send + '_; -} - -impl EthereumStateRead for ClientStatePath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - Hex( - match ibc_handler - .get_client(self.client_id.to_string()) - .block(execution_block_number) - .call() - .await - { - Ok(client_address) => { - let client_state_bytes = - &ILightClient::new(client_address, ibc_handler.client()) - .get_client_state(self.client_id.to_string()) - .block(execution_block_number) - .call() - .await - .unwrap(); - - // TODO: Ensure this invariant is documented in the solidity IBC stack - if client_state_bytes.iter().all(|b| *b == 0) { - vec![] - } else { - client_state_bytes.to_vec() - } - } - Err(err) - if err - .as_revert() - .is_some_and(|bz| bz[..] == ErrClientNotFound::selector()) => - { - vec![] - } - Err(err) => { - panic!("error fetching client state: {}", ErrorReporter(err)) - } - }, - ) - } -} - -impl EthereumStateRead for ClientConsensusStatePath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - Hex( - match ibc_handler - .get_client(self.client_id.to_string()) - .block(execution_block_number) - .call() - .await - { - Ok(client_address) => { - let consensus_state_bytes = - &ILightClient::new(client_address, ibc_handler.client()) - .get_consensus_state(self.client_id.to_string(), self.height.into()) - .block(execution_block_number) - .call() - .await - .unwrap(); - - // TODO: Ensure this invariant is documented in the solidity IBC stack - if consensus_state_bytes.iter().all(|b| *b == 0) { - vec![] - } else { - consensus_state_bytes.to_vec() - } - } - Err(err) - if err - .as_revert() - .is_some_and(|bz| bz[..] == ErrClientNotFound::selector()) => - { - vec![] - } - Err(err) => { - panic!("error fetching client state: {}", ErrorReporter(err)) - } - }, - ) - } -} - -impl EthereumStateRead for ConnectionPath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - let connection: IbcCoreConnectionV1ConnectionEndData = ibc_handler - .get_connection(self.connection_id.to_string()) - .block(execution_block_number) - .call() - .await - .unwrap(); - - if connection == IbcCoreConnectionV1ConnectionEndData::default() { - None - } else { - Some(connection.try_into().unwrap()) - } - } -} - -impl EthereumStateRead for ChannelEndPath { - #[instrument( - skip_all, - fields( - port_id = %self.port_id, - channel_id = %self.channel_id, - %execution_block_number, - ibc_handler_address = %H160::from(ibc_handler.address()), - ) - )] - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - let channel: IbcCoreChannelV1ChannelData = ibc_handler - .get_channel(self.port_id.to_string(), self.channel_id.to_string()) - .block(execution_block_number) - .call() - .await - .unwrap(); - - if channel == IbcCoreChannelV1ChannelData::default() { - None - } else { - Some(channel.try_into().unwrap()) - } - } -} - -impl EthereumStateRead for CommitmentPath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - let commitment: H256 = ibc_handler - .client() - .get_storage_at( - ibc_handler.address(), - ibc_commitment_key(&self.to_string(), IBC_HANDLER_COMMITMENTS_SLOT) - .to_be_bytes() - .into(), - Some(execution_block_number.into()), - ) - .await - .unwrap() - .into(); - - if commitment == ::default() { - None - } else { - Some(commitment) - } - } -} - -impl EthereumStateRead for AcknowledgementPath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - let ack_commitment: H256 = ibc_handler - .client() - .get_storage_at( - ibc_handler.address(), - ibc_commitment_key(&self.to_string(), IBC_HANDLER_COMMITMENTS_SLOT) - .to_be_bytes() - .into(), - Some(execution_block_number.into()), - ) - .await - .unwrap() - .into(); - - if ack_commitment == ::default() { - None - } else { - Some(ack_commitment) - } - } -} - -impl EthereumStateRead for NextConnectionSequencePath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - U256::from_be_bytes( - ibc_handler - .client() - .get_storage_at( - ibc_handler.address(), - ibc_commitment_key(&self.to_string(), IBC_HANDLER_COMMITMENTS_SLOT) - .to_be_bytes() - .into(), - Some(execution_block_number.into()), - ) - .await - .unwrap() - .0, - ) - .try_into() - .unwrap() - } -} - -impl EthereumStateRead for NextClientSequencePath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - U256::from_be_bytes( - ibc_handler - .client() - .get_storage_at( - ibc_handler.address(), - ibc_commitment_key(&self.to_string(), IBC_HANDLER_COMMITMENTS_SLOT) - .to_be_bytes() - .into(), - Some(execution_block_number.into()), - ) - .await - .unwrap() - .0, - ) - .try_into() - .unwrap() - } -} - -impl EthereumStateRead for ReceiptPath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - match u64::try_from(U256::from_be_bytes( - ibc_handler - .client() - .get_storage_at( - ibc_handler.address(), - ibc_commitment_key(&self.to_string(), IBC_HANDLER_COMMITMENTS_SLOT) - .to_be_bytes() - .into(), - Some(execution_block_number.into()), - ) - .await - .unwrap() - .0, - )) - .unwrap() - { - 0 => false, - 1 => true, - n => panic!("not a bool??? {n}"), - } - } -} - -impl EthereumStateRead for NextSequenceRecvPath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - u64::try_from(U256::from_be_bytes( - ibc_handler - .client() - .get_storage_at( - ibc_handler.address(), - ibc_commitment_key(&self.to_string(), IBC_HANDLER_COMMITMENTS_SLOT) - .to_be_bytes() - .into(), - Some(execution_block_number.into()), - ) - .await - .unwrap() - .0, - )) - .unwrap() - } -} - -impl EthereumStateRead for NextSequenceSendPath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - u64::try_from(U256::from_be_bytes( - ibc_handler - .client() - .get_storage_at( - ibc_handler.address(), - ibc_commitment_key(&self.to_string(), IBC_HANDLER_COMMITMENTS_SLOT) - .to_be_bytes() - .into(), - Some(execution_block_number.into()), - ) - .await - .unwrap() - .0, - )) - .unwrap() - } -} - -impl EthereumStateRead for NextSequenceAckPath { - async fn read( - self, - ibc_handler: &IBCHandler, - execution_block_number: u64, - ) -> Self::Value { - u64::try_from(U256::from_be_bytes( - ibc_handler - .client() - .get_storage_at( - ibc_handler.address(), - ibc_commitment_key(&self.to_string(), IBC_HANDLER_COMMITMENTS_SLOT) - .to_be_bytes() - .into(), - Some(execution_block_number.into()), - ) - .await - .unwrap() - .0, - )) - .unwrap() - } -} diff --git a/lib/chain-utils/src/lib.rs b/lib/chain-utils/src/lib.rs index b441fc5ac2..2c3ad62b96 100644 --- a/lib/chain-utils/src/lib.rs +++ b/lib/chain-utils/src/lib.rs @@ -1,13 +1,13 @@ #![feature(trait_alias)] -pub mod arbitrum; -pub mod berachain; -pub mod cosmos; -pub mod ethereum; -pub mod scroll; -pub mod union; +// pub mod arbitrum; +// pub mod berachain; +// pub mod cosmos; +// pub mod ethereum; +// pub mod scroll; +// pub mod union; -pub mod cosmos_sdk; +// pub mod cosmos_sdk; pub mod private_key; diff --git a/lib/chain-utils/src/scroll.rs b/lib/chain-utils/src/scroll.rs index 69ce4275f4..8671dbfb5a 100644 --- a/lib/chain-utils/src/scroll.rs +++ b/lib/chain-utils/src/scroll.rs @@ -284,7 +284,7 @@ impl Scroll { l1_client_id: self.l1_client_id.to_string(), chain_id: self.chain_id(), // REVIEW: Should we query the l1 latest slot here? - latest_slot: height.revision_height, + latest_slot: height.height(), latest_batch_index_slot: self.rollup_last_finalized_batch_index_slot, frozen_height: Height { revision_number: 0, @@ -302,9 +302,7 @@ impl Scroll { &self, height: Height, ) -> scroll::consensus_state::ConsensusState { - let batch_index = self - .batch_index_of_beacon_slot(height.revision_height) - .await; + let batch_index = self.batch_index_of_beacon_slot(height.height()).await; let scroll_height = self.scroll_height_of_batch_index(batch_index).await; let block = self diff --git a/lib/chain-utils/src/union.rs b/lib/chain-utils/src/union.rs index 2baf18bbca..c7ae8a288b 100644 --- a/lib/chain-utils/src/union.rs +++ b/lib/chain-utils/src/union.rs @@ -1,17 +1,12 @@ -use std::{fmt::Debug, num::ParseIntError, sync::Arc}; +use std::{fmt::Debug, sync::Arc}; -use dashmap::DashMap; -use ethers::prelude::k256::ecdsa; use serde::{Deserialize, Serialize}; -use tendermint_rpc::{Client, WebSocketClient, WebSocketClientUrl}; -use unionlabs::{ - hash::H256, ibc::core::client::height::Height, id::ClientId, signer::CosmosSigner, - WasmClientType, -}; +use tendermint_rpc::{WebSocketClient, WebSocketClientUrl}; +use unionlabs::{hash::H256, signer::CosmosSigner}; use crate::{ - cosmos_sdk::{CosmosKeyring, CosmosSdkChain, CosmosSdkChainRpcs, GasConfig}, - keyring::{ChainKeyring, ConcurrentKeyring, KeyringConfig, KeyringEntry, SignerBalance}, + cosmos_sdk::{CosmosKeyring, GasConfig}, + keyring::{ChainKeyring, ConcurrentKeyring, KeyringConfig, SignerBalance}, }; #[derive(Debug, Clone)] @@ -53,109 +48,3 @@ impl ChainKeyring for Union { .await } } - -#[derive(Debug, thiserror::Error)] -pub enum UnionInitError { - #[error("tendermint rpc error")] - Tendermint(#[from] tendermint_rpc::Error), - #[error( - "unable to parse chain id: expected format `-`, found `{found}`" - )] - ChainIdParse { - found: String, - #[source] - source: Option, - }, -} - -impl Union { - pub async fn new(config: Config) -> Result { - let (tm_client, driver) = WebSocketClient::builder(config.ws_url) - .compat_mode(tendermint_rpc::client::CompatMode::V0_37) - .build() - .await?; - - tokio::spawn(async move { driver.run().await }); - - let chain_id = tm_client.status().await?.node_info.network.to_string(); - - let chain_revision = chain_id - .split('-') - .last() - .ok_or_else(|| UnionInitError::ChainIdParse { - found: chain_id.clone(), - source: None, - })? - .parse() - .map_err(|err| UnionInitError::ChainIdParse { - found: chain_id.clone(), - source: Some(err), - })?; - - Ok(Self { - // TODO: Deduplicate between this and cosmos.rs - keyring: CosmosKeyring::new( - config.keyring.name, - config - .keyring - .keys - .into_iter() - // TODO: Make this configurable or fetch it from the chain - .map(|entry| { - let signer = CosmosSigner::new( - ecdsa::SigningKey::from_bytes(entry.value().as_slice().into()) - .expect("invalid private key"), - "union".to_owned(), - ); - - KeyringEntry { - name: entry.name(), - address: signer.to_string(), - signer, - } - }), - ), - tm_client, - chain_id, - chain_revision, - prover_endpoints: config.prover_endpoints, - grpc_url: config.grpc_url, - checksum_cache: Arc::new(DashMap::default()), - gas_config: config.gas_config, - }) - } - - #[must_use] - pub fn make_height(&self, height: u64) -> Height { - Height { - revision_number: self.chain_revision, - revision_height: height, - } - } -} - -pub type UnionClientId = ClientId; - -impl CosmosSdkChain for Union { - fn checksum_cache(&self) -> &Arc> { - &self.checksum_cache - } -} - -impl CosmosSdkChainRpcs for Union { - fn tm_chain_id(&self) -> String { - self.chain_id.clone() - } - - fn gas_config(&self) -> &GasConfig { - &self.gas_config - } - - fn grpc_url(&self) -> String { - self.grpc_url.clone() - } - - fn tm_client(&self) -> &WebSocketClient { - &self.tm_client - } -} diff --git a/lib/cometbft-rpc/Cargo.toml b/lib/cometbft-rpc/Cargo.toml index e62cd653ea..c007a776a0 100644 --- a/lib/cometbft-rpc/Cargo.toml +++ b/lib/cometbft-rpc/Cargo.toml @@ -20,7 +20,7 @@ serde-utils = { workspace = true } thiserror = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] } -unionlabs = { workspace = true } +unionlabs = { workspace = true, features = ["proto", "serde"] } [dev-dependencies] hex-literal = "0.4.1" diff --git a/lib/cometbft-rpc/src/lib.rs b/lib/cometbft-rpc/src/lib.rs index 9c56b80e86..fced238db2 100644 --- a/lib/cometbft-rpc/src/lib.rs +++ b/lib/cometbft-rpc/src/lib.rs @@ -97,7 +97,8 @@ impl Client { &self, mut height: Option, ) -> Result { - const PER_PAGE: BoundedU8<1, 100> = const { result_unwrap!(BoundedU8::<1, 100>::new(100)) }; + const PER_PAGE: BoundedU8<1, 100> = + const { result_unwrap!(BoundedU8::<1, 100>::new_const(100)) }; let mut page = const { option_unwrap!(NonZeroU64::new(1)) }; diff --git a/lib/cometbls-groth16-verifier/src/lib.rs b/lib/cometbls-groth16-verifier/src/lib.rs index 0981b72cab..f70dd5c4c0 100644 --- a/lib/cometbls-groth16-verifier/src/lib.rs +++ b/lib/cometbls-groth16-verifier/src/lib.rs @@ -12,7 +12,7 @@ use hex_literal::hex; use sha3::Digest; use substrate_bn::G1; use unionlabs::{ - hash::H256, ibc::lightclients::cometbls::light_header::LightHeader, uint::U256, ByteArrayExt, + hash::H256, ibc::lightclients::cometbls::signed_header::SignedHeader, uint::U256, ByteArrayExt, }; mod constants; @@ -206,7 +206,7 @@ pub enum Error { pub fn verify_zkp( chain_id: &str, trusted_validators_hash: H256, - header: &LightHeader, + header: &SignedHeader, zkp: impl Into>, ) -> Result<(), Error> { verify_generic_zkp_2( @@ -222,7 +222,7 @@ pub fn verify_zkp( fn verify_generic_zkp_2( chain_id: &str, trusted_validators_hash: H256, - header: &LightHeader, + header: &SignedHeader, g: substrate_bn::AffineG2, g_root_sigma_neg: substrate_bn::AffineG2, zkp: ZKP, @@ -232,7 +232,7 @@ fn verify_generic_zkp_2( } // Constant + public inputs let decode_scalar = move |x: U256| -> Result { - substrate_bn::Fr::new(x.0 .0.into()).ok_or(Error::InvalidPublicInput) + substrate_bn::Fr::new(x.as_limbs().into()).ok_or(Error::InvalidPublicInput) }; let commitment_hash = hash_commitment(&zkp.proof_commitment)?; let mut inputs_hash = <[u8; 32]>::from( @@ -318,7 +318,7 @@ mod tests { verify_zkp( "union-devnet-1337", hex!("1B7EA0F1B3E574F8D50A12827CCEA43CFF858C2716AE05370CC40AE8EC521FD8").into(), - &LightHeader { + &SignedHeader { height: 3405691582.try_into().unwrap(), time: Timestamp { seconds: 1710783278.try_into().unwrap(), @@ -345,7 +345,7 @@ mod tests { verify_zkp( "union-testnet-8", hex!("01a84dca649aa2df8de2f65a84c9092bbd5296b4bc54d818f844b28573d8e0be").into(), - &LightHeader { + &SignedHeader { height: 969006.try_into().unwrap(), time: Timestamp::from_str("2024-06-18T13:21:28.026113925Z").unwrap(), validators_hash: hex!("01a84dca649aa2df8de2f65a84c9092bbd5296b4bc54d818f844b28573d8e0be").into(), @@ -364,7 +364,7 @@ mod tests { verify_zkp( "union-testnet-8", hex!("01a84dca649aa2df8de2f65a84c9092bbd5296b4bc54d818f844b28573d8e0be").into(), - &LightHeader { + &SignedHeader { height: 969002.try_into().unwrap(), time: Timestamp::from_str("2024-06-18T13:21:02.868708953Z").unwrap(), validators_hash: hex!("01a84dca649aa2df8de2f65a84c9092bbd5296b4bc54d818f844b28573d8e0be").into(), @@ -383,7 +383,7 @@ mod tests { verify_zkp( "union-testnet-8", hex!("01a84dca649aa2df8de2f65a84c9092bbd5296b4bc54d818f844b28573d8e0be").into(), - &LightHeader { + &SignedHeader { height: 969002.try_into().unwrap(), time: Timestamp::from_str("2024-06-18T13:21:02.868708953Z").unwrap(), validators_hash: hex!("01a84dca649aa2df8de2f65a84c9092bbd5296b4bc54d818f844b28573d8e0be").into(), @@ -402,7 +402,7 @@ mod tests { verify_zkp( "union-testnet-8", hex!("1deda64b1cc1319718f168b5aa8ed904b7d5b0ab932acdf6deae0ad9bd565a53").into(), - &LightHeader { + &SignedHeader { height: 969001.try_into().unwrap(), time: Timestamp::from_str("2024-06-18T13:20:56.784169335Z").unwrap(), validators_hash: hex!("1deda64b1cc1319718f168b5aa8ed904b7d5b0ab932acdf6deae0ad9bd565a53").into(), @@ -421,7 +421,7 @@ mod tests { verify_zkp( "union-devnet-1337", hex!("1B7EA0F1B3E574F8D50A12827CCEA43CFF858C2716AE05370CC40AE8EC521FD8").into(), - &LightHeader { + &SignedHeader { height: 3405691583.try_into().unwrap(), time: Timestamp { seconds: 1710783278.try_into().unwrap(), @@ -443,7 +443,7 @@ mod tests { verify_zkp( "union-devnet-1", hex!("2f4975ab7e75a677f43efebf53e0ec05460d2cf55506ad08d6b05254f96a500d").into(), - &LightHeader { + &SignedHeader { height: 905.try_into().unwrap(), time: Timestamp::from_str("2024-09-23T20:48:00.739712762Z").unwrap(), validators_hash: hex!("2f4975ab7e75a677f43efebf53e0ec05460d2cf55506ad08d6b05254f96a500d").into(), diff --git a/lib/ethereum-verifier/Cargo.toml b/lib/ethereum-verifier/Cargo.toml index abc51b201a..69d87c3413 100644 --- a/lib/ethereum-verifier/Cargo.toml +++ b/lib/ethereum-verifier/Cargo.toml @@ -13,7 +13,7 @@ test-include = ["lib/ethereum-verifier/src/test/"] ssz = { workspace = true } serde-utils = { workspace = true } -unionlabs = { workspace = true, features = ["cosmwasm"] } +unionlabs = { workspace = true, features = ["cosmwasm", "rlp", "ssz"] } bytes = { workspace = true } hash-db = { version = "0.16.0", default-features = false } diff --git a/lib/ethereum-verifier/src/crypto.rs b/lib/ethereum-verifier/src/crypto.rs index 9c1e255d6a..3388eb886a 100644 --- a/lib/ethereum-verifier/src/crypto.rs +++ b/lib/ethereum-verifier/src/crypto.rs @@ -1,46 +1,44 @@ -use unionlabs::bls::{BlsPublicKey, BlsSignature}; +use unionlabs::hash::{H384, H768}; use crate::error::Error; pub fn fast_aggregate_verify( - public_keys: &[&BlsPublicKey], + public_keys: &[&H384], msg: &[u8], - signature: &BlsSignature, + signature: &H768, ) -> Result { __fast_aggregate_verify(public_keys, msg, signature, |pk| { milagro_bls::PublicKey::from_bytes(pk.as_ref()) }) } -pub fn eth_aggregate_public_keys(public_keys: &[BlsPublicKey]) -> Result { +pub fn eth_aggregate_public_keys(public_keys: &[H384]) -> Result { __eth_aggregate_public_keys(public_keys, |pk| { milagro_bls::PublicKey::from_bytes(pk.as_ref()) }) } pub fn fast_aggregate_verify_unchecked( - public_keys: &[&BlsPublicKey], + public_keys: &[&H384], msg: &[u8], - signature: &BlsSignature, + signature: &H768, ) -> Result { __fast_aggregate_verify(public_keys, msg, signature, |pk| { milagro_bls::PublicKey::from_bytes_unchecked(pk.as_ref()) }) } -pub fn eth_aggregate_public_keys_unchecked( - public_keys: &[BlsPublicKey], -) -> Result { +pub fn eth_aggregate_public_keys_unchecked(public_keys: &[H384]) -> Result { __eth_aggregate_public_keys(public_keys, |pk| { milagro_bls::PublicKey::from_bytes_unchecked(pk.as_ref()) }) } fn __fast_aggregate_verify( - public_keys: &[&BlsPublicKey], + public_keys: &[&H384], msg: &[u8], - signature: &BlsSignature, - map_fn: fn(&BlsPublicKey) -> Result, + signature: &H768, + map_fn: fn(&H384) -> Result, ) -> Result { let public_keys = public_keys .iter() @@ -50,7 +48,7 @@ fn __fast_aggregate_verify( let public_keys: Vec<&milagro_bls::PublicKey> = public_keys.iter().collect(); - let signature: milagro_bls::Signature = signature.try_into()?; + let signature = milagro_bls::Signature::from_bytes(signature.as_ref())?; let aggregate_signature = milagro_bls::AggregateSignature::aggregate(&[&signature]); let aggregate_pubkey = @@ -60,9 +58,9 @@ fn __fast_aggregate_verify( } fn __eth_aggregate_public_keys( - public_keys: &[BlsPublicKey], - map_fn: fn(&BlsPublicKey) -> Result, -) -> Result { + public_keys: &[H384], + map_fn: fn(&H384) -> Result, +) -> Result { let public_keys = public_keys .iter() .map(map_fn) @@ -71,6 +69,6 @@ fn __eth_aggregate_public_keys( let public_keys: Vec<&milagro_bls::PublicKey> = public_keys.iter().collect(); milagro_bls::AggregatePublicKey::aggregate(&public_keys) - .map(|x| x.into()) + .map(|x| milagro_bls::PublicKey { point: x.point }.as_bytes().into()) .map_err(Error::Bls) } diff --git a/lib/ethereum-verifier/src/error.rs b/lib/ethereum-verifier/src/error.rs index c058820d01..bf170f18d8 100644 --- a/lib/ethereum-verifier/src/error.rs +++ b/lib/ethereum-verifier/src/error.rs @@ -1,9 +1,6 @@ use milagro_bls::AmclError; use trie_db::TrieError; -use unionlabs::{ - bls::{BlsPublicKey, BlsSignature}, - hash::H256, -}; +use unionlabs::hash::{H256, H384, H768}; #[derive(Debug, PartialEq, Clone, thiserror::Error)] #[error("invalid merkle branch \ @@ -22,9 +19,9 @@ pub struct InvalidMerkleBranch { #[derive(Debug, PartialEq, thiserror::Error, Clone)] #[error("signature cannot be verified (public_keys: {public_keys:?}, msg: {msg}, signature: {signature})", msg = serde_utils::to_hex(.msg))] pub struct InvalidSignature { - pub public_keys: Vec, + pub public_keys: Vec, pub msg: Vec, - pub signature: BlsSignature, + pub signature: H768, } #[derive(Debug, PartialEq, thiserror::Error, Clone)] @@ -93,10 +90,7 @@ pub enum Error { #[error( "next sync committee ({found}) does not match with the one in the current state ({expected})" )] - NextSyncCommitteeMismatch { - expected: BlsPublicKey, - found: BlsPublicKey, - }, + NextSyncCommitteeMismatch { expected: H384, found: H384 }, #[error("insufficient number of sync committee participants ({0})")] InsufficientSyncCommitteeParticipants(usize), #[error("bls error ({0:?})")] @@ -110,7 +104,7 @@ pub enum Error { #[error("proof is invalid due to missing value: {v}", v = serde_utils::to_hex(value))] ValueMissing { value: Vec }, #[error("trie error ({0:?})")] - Trie(Box>), + Trie(Box>), // we us debug here because the display implementation for rlp::DecoderError is stupid #[error("rlp decoding failed: {0:?}")] RlpDecode(#[from] rlp::DecoderError), @@ -133,8 +127,8 @@ impl From for Error { } // NOTE: Implemented here instead of via #[from] since Box> doesn't implement core::error::Error -impl From>> for Error { - fn from(e: Box>) -> Self { +impl From>> for Error { + fn from(e: Box>) -> Self { Error::Trie(e) } } diff --git a/lib/ethereum-verifier/src/rlp_node_codec.rs b/lib/ethereum-verifier/src/rlp_node_codec.rs index 6e119b003b..51d360a922 100644 --- a/lib/ethereum-verifier/src/rlp_node_codec.rs +++ b/lib/ethereum-verifier/src/rlp_node_codec.rs @@ -19,7 +19,6 @@ use std::{borrow::Borrow, marker::PhantomData, ops::Range}; use hash_db::Hasher; -use primitive_types::H256; use rlp::{DecoderError, Prototype, Rlp, RlpStream}; use sha3::{Digest, Keccak256}; use trie_db::{ @@ -39,13 +38,13 @@ impl TrieLayout for EthLayout { } use hash256_std_hasher::Hash256StdHasher; +use unionlabs::hash::H256; /// Concrete implementation of Hasher using Keccak 256-bit hashes #[derive(Debug)] pub struct KeccakHasher; impl Hasher for KeccakHasher { - // TODO: Use `unionlabs::ethereum::H256` here type Out = H256; type StdHasher = Hash256StdHasher; const LENGTH: usize = 32; @@ -72,7 +71,7 @@ const HASHED_NULL_NODE_BYTES: [u8; 32] = [ 0x56, 0xe8, 0x1f, 0x17, 0x1b, 0xcc, 0x55, 0xa6, 0xff, 0x83, 0x45, 0xe6, 0x92, 0xc0, 0xf8, 0x6e, 0x5b, 0x48, 0xe0, 0x1b, 0x99, 0x6c, 0xad, 0xc0, 0x01, 0x62, 0x2f, 0xb5, 0xe3, 0x63, 0xb4, 0x21, ]; -const HASHED_NULL_NODE: H256 = H256(HASHED_NULL_NODE_BYTES); +const HASHED_NULL_NODE: H256 = H256::new(HASHED_NULL_NODE_BYTES); /// Encode a partial value with an iterator as input. fn encode_partial_from_iterator_iter<'a>( diff --git a/lib/ethereum-verifier/src/verify.rs b/lib/ethereum-verifier/src/verify.rs index be8381410f..a0d2b7b9b2 100644 --- a/lib/ethereum-verifier/src/verify.rs +++ b/lib/ethereum-verifier/src/verify.rs @@ -4,7 +4,6 @@ use ssz::Ssz; use trie_db::{Trie, TrieDBBuilder}; use typenum::Unsigned; use unionlabs::{ - bls::{BlsPublicKey, BlsSignature}, ensure, ethereum::{ config::{ @@ -16,7 +15,7 @@ use unionlabs::{ }, DomainType, }, - hash::{H160, H256}, + hash::{hash_v2::Hash, H160, H256, H384}, ibc::lightclients::ethereum::{ execution_payload_header::CapellaExecutionPayloadHeader, fork_parameters::ForkParameters, light_client_header::LightClientHeader, light_client_update::LightClientUpdate, @@ -41,9 +40,9 @@ type MinSyncCommitteeParticipants = pub trait BlsVerify { fn fast_aggregate_verify<'pk>( &self, - public_keys: impl IntoIterator, + public_keys: impl IntoIterator, msg: Vec, - signature: BlsSignature, + signature: Hash<96>, ) -> Result<(), Error>; } @@ -255,7 +254,6 @@ fn get_node( db.insert(hash_db::EMPTY_PREFIX, n.as_ref()); }); - let root: primitive_types::H256 = root.into(); let trie = TrieDBBuilder::::new(&db, &root).build(); Ok(trie.get(&keccak_256(key.as_ref()))?) } @@ -391,6 +389,7 @@ mod tests { use serde::Deserialize; use unionlabs::{ ethereum::config::{Mainnet, SEPOLIA}, + hash::H768, ibc::lightclients::ethereum::{storage_proof::StorageProof, sync_committee::SyncCommittee}, }; @@ -493,9 +492,9 @@ mod tests { impl BlsVerify for BlsVerifier { fn fast_aggregate_verify<'pk>( &self, - public_keys: impl IntoIterator, + public_keys: impl IntoIterator, msg: Vec, - signature: BlsSignature, + signature: H768, ) -> Result<(), Error> { let res = crate::crypto::fast_aggregate_verify_unchecked( public_keys.into_iter().collect::>().as_slice(), diff --git a/lib/ibc-solidity/Cargo.toml b/lib/ibc-solidity/Cargo.toml new file mode 100644 index 0000000000..cba7dca61a --- /dev/null +++ b/lib/ibc-solidity/Cargo.toml @@ -0,0 +1,16 @@ +[package] +edition = { workspace = true } +license-file = { workspace = true } +name = "ibc-solidity" +repository = { workspace = true } +version = "0.1.0" + +[lints] +workspace = true + +[dependencies] +alloy = { workspace = true, features = ["sol-types", "contract"] } # TODO: Fix the feature gating with `sol!` + +[features] +default = ["rpc"] +rpc = ["alloy/contract"] diff --git a/lib/ibc-solidity/src/lib.rs b/lib/ibc-solidity/src/lib.rs new file mode 100644 index 0000000000..13af2862d3 --- /dev/null +++ b/lib/ibc-solidity/src/lib.rs @@ -0,0 +1,535 @@ +pub mod ibc { + alloy::sol! { + // #![sol(cfg_attr(feature = "rpc", rpc))] + #![sol(rpc, all_derives)] + + contract Ibc { + // STORE + + mapping(bytes32 => bytes32) public commitments; + + // ClientType -> Address + mapping(bytes32 => address) public clientRegistry; + // ClientId -> ClientType + mapping(uint32 => bytes32) public clientTypes; + // ClientId -> Address + mapping(uint32 => address) public clientImpls; + // ConnectionId -> Connection + mapping(uint32 => Connection) public connections; + // ChannelId -> Channel + mapping(uint32 => Channel) public channels; + // ChannelId -> PortId + mapping(uint32 => address) public channelOwner; + + function registerClient(bytes32 clientType, address client) external; + + function createClient( + MsgCreateClient calldata msg_ + ) external returns (uint32 clientId); + + function updateClient( + MsgUpdateClient calldata msg_ + ) external; + + // CONNECTION + + function connectionOpenInit( + MsgConnectionOpenInit calldata msg_ + ) external returns (uint32); + + function connectionOpenTry( + MsgConnectionOpenTry calldata msg_ + ) external returns (uint32); + + function connectionOpenAck( + MsgConnectionOpenAck calldata msg_ + ) external; + + function connectionOpenConfirm( + MsgConnectionOpenConfirm calldata msg_ + ) external; + + // CHANNEL + + function channelOpenInit( + MsgChannelOpenInit calldata msg_ + ) external returns (uint32); + + function channelOpenTry( + MsgChannelOpenTry calldata msg_ + ) external returns (uint32); + + function channelOpenAck( + MsgChannelOpenAck calldata msg_ + ) external; + + function channelOpenConfirm( + MsgChannelOpenConfirm calldata msg_ + ) external; + + function channelCloseInit( + MsgChannelCloseInit calldata msg_ + ) external; + + function channelCloseConfirm( + MsgChannelCloseConfirm calldata msg_ + ) external; + + // PACKET + + function sendPacket( + uint32 sourceChannel, + uint64 timeoutHeight, + uint64 timeoutTimestamp, + bytes calldata data + ) external returns (uint64); + + function recvPacket( + MsgPacketRecv calldata msg_ + ) external; + + function recvIntentPacket( + MsgIntentPacketRecv calldata msg_ + ) external; + + function writeAcknowledgement( + Packet calldata packet, + bytes memory acknowledgement + ) external; + + function acknowledgePacket( + MsgPacketAcknowledgement calldata msg_ + ) external; + + function timeoutPacket( + MsgPacketTimeout calldata msg_ + ) external; + + function batchSend( + MsgBatchSend calldata msg_ + ) external; + + function batchAcks( + MsgBatchAcks calldata msg_ + ) external; + + // IBC MODULE + + error ErrClientNotFound(); + error ErrModuleNotFound(); + error ErrInvalidConnectionState(); + error ErrInvalidChannelState(); + + // IBC CLIENT + + event ClientRegistered(bytes32 clientType, address clientAddress); + event ClientCreated(bytes32 clientType, uint32 clientId); + event ClientUpdated(uint32 clientId, uint64 height); + + error ErrClientTypeAlreadyExists(); + error ErrClientTypeNotFound(); + + // IBC CONNECTION + + event ConnectionOpenInit( + uint32 connectionId, uint32 clientId, uint32 counterpartyClientId + ); + event ConnectionOpenTry( + uint32 connectionId, + uint32 clientId, + uint32 counterpartyClientId, + uint32 counterpartyConnectionId + ); + event ConnectionOpenAck( + uint32 connectionId, + uint32 clientId, + uint32 counterpartyClientId, + uint32 counterpartyConnectionId + ); + event ConnectionOpenConfirm( + uint32 connectionId, + uint32 clientId, + uint32 counterpartyClientId, + uint32 counterpartyConnectionId + ); + + // error ErrInvalidProof(); + // error ErrInvalidConnectionState(); + + // IBC CHANNEL + + event ChannelOpenInit( + address portId, uint32 channelId, uint32 connectionId, bytes32 version + ); + event ChannelOpenTry( + address portId, + uint32 channelId, + uint32 counterpartyChannelId, + uint32 connectionId, + bytes32 version + ); + event ChannelOpenAck( + address portId, + uint32 channelId, + uint32 counterpartyChannelId, + uint32 connectionId + ); + event ChannelOpenConfirm( + address portId, + uint32 channelId, + uint32 counterpartyChannelId, + uint32 connectionId + ); + event ChannelCloseInit(address portId, uint32 channelId); + event ChannelCloseConfirm(address portId, uint32 channelId); + + // IBC PACKET + + event SendPacket(Packet packet); + event RecvPacket(Packet packet, address relayer, bytes relayerMsg); + event RecvIntentPacket( + Packet packet, address marketMaker, bytes marketMakerMsg + ); + event WriteAcknowledgement(Packet packet, bytes acknowledgement); + event AcknowledgePacket( + Packet packet, bytes acknowledgement, address relayer + ); + event TimeoutPacket(Packet packet, address relayer); + + error ErrUnauthorized(); + error ErrLatestTimestampNotFound(); + error ErrTimeoutMustBeSet(); + error ErrHeightTimeout(); + error ErrTimestampTimeout(); + error ErrInvalidProof(); + error ErrPacketSequenceNextSequenceMismatch(); + error ErrPacketSequenceAckSequenceMismatch(); + error ErrAcknowledgementIsEmpty(); + error ErrPacketNotReceived(); + error ErrAcknowledgementAlreadyExists(); + error ErrPacketCommitmentNotFound(); + error ErrTimeoutHeightNotReached(); + error ErrTimeoutTimestampNotReached(); + error ErrNextSequenceMustBeLEQThanTimeoutSequence(); + error ErrNotEnoughPackets(); + error ErrCommittedAckNotPresent(); + error ErrCannotIntentOrderedPacket(); + + // COMETBLS CLIENT + + error ErrNotIBC(); + error ErrTrustedConsensusStateNotFound(); + error ErrUntrustedHeightLTETrustedHeight(); + error ErrUntrustedTimestampLTETrustedTimestamp(); + error ErrHeaderExpired(); + error ErrMaxClockDriftExceeded(); + error ErrInvalidZKP(); + error ErrInvalidUntrustedValidatorsHash(); + error ErrInvalidMisbehaviorHeadersSequence(); + error ErrInvalidMisbehavior(); + error ErrClientFrozen(); + error ErrInvalidInitialConsensusState(); + } + + enum ConnectionState { + Unspecified, + Init, + TryOpen, + Open + } + + struct ConnectionCounterparty { + uint32 clientId; + uint32 connectionId; + } + + struct Connection { + ConnectionState state; + ConnectionCounterparty counterparty; + uint32 clientId; + } + + enum ChannelState { + Unspecified, + Init, + TryOpen, + Open, + Closed + } + + enum ChannelOrder { + Unspecified, + Unordered, + Ordered + } + + struct ChannelCounterparty { + uint32 channelId; + } + + struct Channel { + ChannelState state; + ChannelOrder ordering; + uint32 connectionId; + ChannelCounterparty counterparty; + bytes32 version; + } + + struct Packet { + uint64 sequence; + uint32 sourceChannel; + uint32 destinationChannel; + bytes data; + uint64 timeoutHeight; + uint64 timeoutTimestamp; + } + + struct MsgCreateClient { + bytes32 clientType; + bytes clientStateBytes; + bytes consensusStateBytes; + address relayer; + } + + struct MsgUpdateClient { + uint32 clientId; + bytes clientMessage; + address relayer; + } + + struct MsgConnectionOpenInit { + uint32 clientId; + ConnectionCounterparty counterparty; + address relayer; + } + + struct MsgConnectionOpenTry { + ConnectionCounterparty counterparty; + uint32 clientId; + bytes proofInit; + uint64 proofHeight; + address relayer; + } + + struct MsgConnectionOpenAck { + uint32 connectionId; + uint32 counterpartyConnectionId; + bytes proofTry; + uint64 proofHeight; + address relayer; + } + + struct MsgConnectionOpenConfirm { + uint32 connectionId; + bytes proofAck; + uint64 proofHeight; + address relayer; + } + + struct MsgChannelOpenInit { + address portId; + Channel channel; + address relayer; + } + + struct MsgChannelOpenTry { + address portId; + Channel channel; + bytes32 counterpartyVersion; + bytes proofInit; + uint64 proofHeight; + address relayer; + } + + struct MsgChannelOpenAck { + address portId; + uint32 channelId; + bytes32 counterpartyVersion; + uint32 counterpartyChannelId; + bytes proofTry; + uint64 proofHeight; + address relayer; + } + + struct MsgChannelOpenConfirm { + address portId; + uint32 channelId; + bytes proofAck; + uint64 proofHeight; + address relayer; + } + + struct MsgChannelCloseInit { + address portId; + uint32 channelId; + address relayer; + } + + struct MsgChannelCloseConfirm { + address portId; + uint32 channelId; + bytes proofInit; + uint64 proofHeight; + address relayer; + } + + struct MsgPacketRecv { + Packet[] packets; + bytes[] relayerMsgs; + address relayer; + bytes proof; + uint64 proofHeight; + } + + struct MsgPacketAcknowledgement { + Packet[] packets; + bytes[] acknowledgements; + bytes proof; + uint64 proofHeight; + address relayer; + } + + struct MsgPacketTimeout { + Packet packet; + bytes proof; + uint64 proofHeight; + uint64 nextSequenceRecv; + address relayer; + } + + struct MsgIntentPacketRecv { + Packet[] packets; + bytes[] marketMakerMsgs; + address marketMaker; + bytes emptyProof; + } + + struct MsgBatchSend { + uint32 sourceChannel; + Packet[] packets; + } + + struct MsgBatchAcks { + uint32 sourceChannel; + Packet[] packets; + bytes[] acks; + } + + struct ConsensusStateUpdate { + bytes32 clientStateCommitment; + bytes32 consensusStateCommitment; + uint64 height; + } + + interface ILightClient { + function createClient( + uint32 clientId, + bytes calldata clientStateBytes, + bytes calldata consensusStateBytes + ) external returns (ConsensusStateUpdate memory update); + + function getTimestampAtHeight( + uint32 clientId, + uint64 height + ) external view returns (uint64); + + function getLatestHeight( + uint32 clientId + ) external view returns (uint64 height); + + function updateClient( + uint32 clientId, + bytes calldata clientMessageBytes + ) external returns (ConsensusStateUpdate memory update); + + function verifyMembership( + uint32 clientId, + uint64 height, + bytes calldata proof, + bytes calldata path, + bytes calldata value + ) external returns (bool); + + function verifyNonMembership( + uint32 clientId, + uint64 height, + bytes calldata proof, + bytes calldata path + ) external returns (bool); + + function getClientState( + uint32 clientId + ) external view returns (bytes memory); + + function getConsensusState( + uint32 clientId, + uint64 height + ) external view returns (bytes memory); + + function isFrozen( + uint32 clientId + ) external view returns (bool); + } + } +} + +pub mod ics23 { + alloy::sol! { + struct ExistenceProof { + bytes key; + bytes value; + bytes leafPrefix; + InnerOp[] path; + } + + struct NonExistenceProof { + bytes key; + ExistenceProof left; + ExistenceProof right; + } + + struct InnerOp { + bytes prefix; + bytes suffix; + } + + struct ProofSpec { + uint256 childSize; + uint256 minPrefixLength; + uint256 maxPrefixLength; + } + } +} + +pub mod cometbls { + alloy::sol! { + struct SignedHeader { + uint64 height; + uint64 secs; + uint64 nanos; + bytes32 validatorsHash; + bytes32 nextValidatorsHash; + bytes32 appHash; + } + + struct Header { + SignedHeader signedHeader; + uint64 trustedHeight; + bytes zeroKnowledgeProof; + } + + struct ClientState { + bytes31 chainId; + uint64 trustingPeriod; + uint64 maxClockDrift; + uint64 frozenHeight; + uint64 latestHeight; + } + + struct ConsensusState { + uint64 timestamp; + bytes32 appHash; + bytes32 nextValidatorsHash; + } + } +} diff --git a/lib/ibc-vm-rs/src/lib.rs b/lib/ibc-vm-rs/src/lib.rs index ed45223b5d..77fe31cdf2 100644 --- a/lib/ibc-vm-rs/src/lib.rs +++ b/lib/ibc-vm-rs/src/lib.rs @@ -33,7 +33,7 @@ lazy_static::lazy_static! { #[derive(thiserror::Error, PartialEqNoBound, Debug)] pub enum IbcError { - #[error("client {0} is not active ({1})")] + #[error("client {0:?} is not active ({1})")] NotActive(ClientId, Status), // TODO(aeryz): this needs context @@ -76,10 +76,10 @@ pub enum IbcError { #[error("the proposed version contains an unsupported feature ({0})")] UnsupportedFeatureInVersion(Order), - #[error("the client state is not found for client {0}")] + #[error("the client state is not found for client {0:?}")] ClientStateNotFound(ClientId), - #[error("channel ({1}) with port {0} is not found")] + #[error("channel ({1:?}) with port {0:?} is not found")] ChannelNotFound(PortId, ChannelId), #[error("channel state is {0} while {1} is expected")] @@ -92,12 +92,12 @@ pub enum IbcError { DestinationPortMismatch(PortId, PortId), #[error( - "source channel ({0}) does not match the received packet's counterparty channel ({1})" + "source channel ({0:?}) does not match the received packet's counterparty channel ({1:?})" )] SourceChannelMismatch(ChannelId, ChannelId), #[error( - "source channel ({0}) does not match the received packet's counterparty channel ({1})" + "source channel ({0:?}) does not match the received packet's counterparty channel ({1:?})" )] DestinationChannelMismatch(ChannelId, ChannelId), diff --git a/lib/ibc-vm-rs/src/states/channel_handshake.rs b/lib/ibc-vm-rs/src/states/channel_handshake.rs index 369ce5601d..e9684facbe 100644 --- a/lib/ibc-vm-rs/src/states/channel_handshake.rs +++ b/lib/ibc-vm-rs/src/states/channel_handshake.rs @@ -72,7 +72,9 @@ impl Runnable for ChannelOpenInit { } .into(), ) - .ok_or(IbcError::ConnectionNotFound(connection_hops[0].to_string()))?; + .ok_or(IbcError::ConnectionNotFound( + connection_hops[0].to_string_prefixed(), + ))?; if connection.state != connection::state::State::Open { return Err(IbcError::IncorrectConnectionState( @@ -263,7 +265,9 @@ impl Runnable for ChannelOpenTry { } .into(), ) - .ok_or(IbcError::ConnectionNotFound(connection_hops[0].to_string()))?; + .ok_or(IbcError::ConnectionNotFound( + connection_hops[0].to_string_prefixed(), + ))?; if connection.state != connection::state::State::Open { return Err(IbcError::IncorrectConnectionState( @@ -278,7 +282,7 @@ impl Runnable for ChannelOpenTry { ordering: Order::Unordered, counterparty: channel::counterparty::Counterparty { port_id: port_id.clone(), - channel_id: "".to_string(), + channel_id: None, }, connection_hops: vec![connection.counterparty.connection_id.unwrap()], version: counterparty_version.clone(), @@ -309,7 +313,8 @@ impl Runnable for ChannelOpenTry { "ibc".to_string(), format!( "channelEnds/ports/{}/channels/{}", - counterparty.port_id, counterparty.channel_id + counterparty.port_id, + counterparty.channel_id.unwrap().to_string_prefixed() ), ], }, @@ -422,7 +427,7 @@ impl Runnable for ChannelOpenTry { port_id, channel_id, counterparty_port_id: counterparty.port_id, - counterparty_channel_id: counterparty.channel_id.validate().unwrap(), + counterparty_channel_id: counterparty.channel_id.unwrap(), connection_id: connection_hops[0].clone(), version, })], @@ -512,7 +517,7 @@ impl Runnable for ChannelOpenAck { .into(), ) .ok_or(IbcError::ConnectionNotFound( - channel.connection_hops[0].to_string(), + channel.connection_hops[0].to_string_prefixed(), ))?; if connection.state != connection::state::State::Open { @@ -527,9 +532,8 @@ impl Runnable for ChannelOpenAck { state: channel::state::State::Tryopen, ordering: Order::Unordered, counterparty: channel::counterparty::Counterparty { - // TODO(aeryz): make port id a validator type port_id: port_id.clone(), - channel_id: channel_id.clone().to_string(), + channel_id: Some(channel_id.clone()), }, connection_hops: vec![connection.counterparty.connection_id.unwrap()], version: counterparty_version.clone(), @@ -629,7 +633,8 @@ impl Runnable for ChannelOpenAck { channel.state = channel::state::State::Open; channel.version = counterparty_version; - channel.counterparty.channel_id = counterparty_channel_id.clone(); + channel.counterparty.channel_id = + Some(ChannelId::parse_prefixed(&counterparty_channel_id).unwrap()); let counterparty_port_id = channel.counterparty.port_id.clone(); let connection_id = channel.connection_hops[0].clone(); @@ -641,7 +646,10 @@ impl Runnable for ChannelOpenAck { port_id, channel_id, counterparty_port_id, - counterparty_channel_id: counterparty_channel_id.validate().unwrap(), + counterparty_channel_id: ChannelId::parse_prefixed( + &counterparty_channel_id, + ) + .unwrap(), connection_id, })], IbcVmResponse::Empty, @@ -724,7 +732,7 @@ impl Runnable for ChannelOpenConfirm { .into(), ) .ok_or(IbcError::ConnectionNotFound( - channel.connection_hops[0].to_string(), + channel.connection_hops[0].to_string_prefixed(), ))?; if connection.state != connection::state::State::Open { @@ -741,7 +749,7 @@ impl Runnable for ChannelOpenConfirm { counterparty: channel::counterparty::Counterparty { // TODO(aeryz): make port id a validator type port_id: port_id.clone(), - channel_id: channel_id.clone().to_string(), + channel_id: Some(channel_id.clone()), }, connection_hops: vec![connection.counterparty.connection_id.unwrap()], version: channel.version, @@ -771,7 +779,11 @@ impl Runnable for ChannelOpenConfirm { format!( "channelEnds/ports/{}/channels/{}", channel.counterparty.port_id, - channel.counterparty.channel_id, + channel + .counterparty + .channel_id + .unwrap() + .to_string_prefixed(), ), ], }, diff --git a/lib/ibc-vm-rs/src/states/connection_handshake.rs b/lib/ibc-vm-rs/src/states/connection_handshake.rs index 3d6afc471c..be16ec6110 100644 --- a/lib/ibc-vm-rs/src/states/connection_handshake.rs +++ b/lib/ibc-vm-rs/src/states/connection_handshake.rs @@ -10,7 +10,7 @@ use unionlabs::{ }, }, ics24::ConnectionPath, - id::ClientId, + id::{ClientId, ConnectionId}, validated::ValidateT, }; @@ -234,7 +234,10 @@ impl Runnable for ConnectionOpenTry { path: MerklePath { key_path: vec![ "ibc".to_string(), - format!("connections/{}", counterparty_connection_id.unwrap()), + format!( + "connections/{}", + counterparty_connection_id.unwrap().to_string_prefixed() + ), ], }, // TODO(aeryz): generic over the encoding @@ -401,13 +404,13 @@ impl Runnable for ConnectionOpenAck { } connection.state = connection::state::State::Open; connection.counterparty.connection_id = - Some(counterparty_connection_id.clone().validate().unwrap()); + Some(ConnectionId::parse_prefixed(&counterparty_connection_id).unwrap()); let counterparty_client_id = connection.counterparty.client_id.clone(); host.commit( ConnectionPath { - connection_id: connection_id.clone().validate().unwrap(), + connection_id: ConnectionId::parse_prefixed(&connection_id).unwrap(), } .into(), connection, @@ -415,10 +418,13 @@ impl Runnable for ConnectionOpenAck { Either::Right(( vec![IbcEvent::ConnectionOpenAck(events::ConnectionOpenAck { - connection_id: connection_id.validate().unwrap(), + connection_id: ConnectionId::parse_prefixed(&connection_id).unwrap(), client_id, counterparty_client_id, - counterparty_connection_id: counterparty_connection_id.validate().unwrap(), + counterparty_connection_id: ConnectionId::parse_prefixed( + &counterparty_connection_id, + ) + .unwrap(), })], IbcVmResponse::Empty, )) diff --git a/lib/ibc-vm-rs/src/states/packet.rs b/lib/ibc-vm-rs/src/states/packet.rs index 8552c4e170..406be8114b 100644 --- a/lib/ibc-vm-rs/src/states/packet.rs +++ b/lib/ibc-vm-rs/src/states/packet.rs @@ -12,7 +12,6 @@ use unionlabs::{ ReceiptPath, }, id::{ChannelId, ClientId, ConnectionId, PortId}, - validated::ValidateT, }; use crate::{ @@ -84,10 +83,11 @@ impl Runnable for RecvPacket { .into()); } - if packet.source_channel.to_string() != channel.counterparty.channel_id { + if &packet.destination_channel != channel.counterparty.channel_id.as_ref().unwrap() + { return Err(IbcError::SourceChannelMismatch( packet.source_channel, - channel.counterparty.channel_id.validate().unwrap(), + channel.counterparty.channel_id.unwrap(), ) .into()); } @@ -100,7 +100,7 @@ impl Runnable for RecvPacket { .into(), ) .ok_or(IbcError::ConnectionNotFound( - channel.connection_hops[0].to_string(), + channel.connection_hops[0].to_string_prefixed(), ))?; if connection.state != connection::state::State::Open { @@ -176,7 +176,7 @@ impl Runnable for RecvPacket { channel_id: packet.source_channel.clone(), sequence: packet.sequence, } - .to_string(), + .ics24_commitment_path(), ], }, value: host.sha256(packet_commitment), @@ -374,7 +374,7 @@ impl Runnable for SendPacket { .into(), ) .ok_or(IbcError::ConnectionNotFound( - channel.connection_hops[0].to_string(), + channel.connection_hops[0].to_string_prefixed(), ))?; if connection.state != connection::state::State::Open { @@ -393,7 +393,7 @@ impl Runnable for SendPacket { timeout_height, timeout_timestamp, destination_port: channel.counterparty.port_id, - destination_channel: channel.counterparty.channel_id.validate().unwrap(), + destination_channel: channel.counterparty.channel_id.unwrap(), data, connection_id: channel.connection_hops[0].clone(), }, @@ -521,20 +521,8 @@ impl Runnable for SendPacket { fn packet_commitment(host: &mut T, packet: &Packet) -> Vec { let mut packet_commitment = Vec::new(); packet_commitment.extend_from_slice(packet.timeout_timestamp.to_be_bytes().as_slice()); - packet_commitment.extend_from_slice( - packet - .timeout_height - .revision_number - .to_be_bytes() - .as_slice(), - ); - packet_commitment.extend_from_slice( - packet - .timeout_height - .revision_height - .to_be_bytes() - .as_slice(), - ); + packet_commitment.extend_from_slice(packet.timeout_height.height().to_be_bytes().as_slice()); + packet_commitment.extend_from_slice(packet.timeout_height.height().to_be_bytes().as_slice()); packet_commitment.extend_from_slice(host.sha256(packet.data.clone()).as_slice()); packet_commitment } @@ -607,11 +595,11 @@ impl Runnable for Acknowledgement { .into()); } - if packet.destination_channel.to_string() != channel.counterparty.channel_id { + if &packet.destination_channel != channel.counterparty.channel_id.as_ref().unwrap() + { return Err(IbcError::DestinationChannelMismatch( packet.destination_channel, - // TODO(aeryz): make the error String so that we don't need to validate - channel.counterparty.channel_id.validate().unwrap(), + channel.counterparty.channel_id.unwrap(), ) .into()); } @@ -624,7 +612,7 @@ impl Runnable for Acknowledgement { .into(), ) .ok_or(IbcError::ConnectionNotFound( - channel.connection_hops[0].to_string(), + channel.connection_hops[0].to_string_prefixed(), ))?; if connection.state != connection::state::State::Open { @@ -688,7 +676,7 @@ impl Runnable for Acknowledgement { channel_id: packet.destination_channel, sequence: packet.sequence, } - .to_string(), + .ics24_commitment_path(), ], }, value: host.sha256(ack), diff --git a/lib/ics-008-wasm-client/src/ibc_client.rs b/lib/ics-008-wasm-client/src/ibc_client.rs index 5d883a3c42..9efdc3d05e 100644 --- a/lib/ics-008-wasm-client/src/ibc_client.rs +++ b/lib/ics-008-wasm-client/src/ibc_client.rs @@ -20,17 +20,11 @@ use crate::{ }; /// Signals that the client is not frozen -pub const ZERO_HEIGHT: Height = Height { - revision_number: 0, - revision_height: 0, -}; +pub const ZERO_HEIGHT: Height = Height::new(0); /// Signals that a client is frozen. This should be used as the `frozen_height` /// when the client is needed to be frozen. -pub const FROZEN_HEIGHT: Height = Height { - revision_number: 0, - revision_height: 1, -}; +pub const FROZEN_HEIGHT: Height = Height::new(0); pub enum StorageState { Occupied(Vec), diff --git a/lib/ics-008-wasm-client/src/storage_utils.rs b/lib/ics-008-wasm-client/src/storage_utils.rs index f851e235a8..ca298cdc11 100644 --- a/lib/ics-008-wasm-client/src/storage_utils.rs +++ b/lib/ics-008-wasm-client/src/storage_utils.rs @@ -36,7 +36,9 @@ pub const SUBSTITUTE_CLIENT_STORE_PREFIX: &str = "substitute/"; pub fn consensus_db_key(height: &Height) -> String { format!( "{}/{}-{}", - HOST_CONSENSUS_STATES_KEY, height.revision_number, height.revision_height + HOST_CONSENSUS_STATES_KEY, + height.revision(), + height.height() ) } @@ -109,10 +111,8 @@ pub fn update_client_state( latest_height: u64, ) { // TODO: this may be wrong, why reuse the same revision number, must be passed? - wasm_client_state.latest_height = Height { - revision_number: wasm_client_state.latest_height.revision_number, - revision_height: latest_height, - }; + wasm_client_state.latest_height = + Height::new_with_revision(wasm_client_state.latest_height.revision(), latest_height); save_client_state::(deps, wasm_client_state); } diff --git a/lib/ics23/src/ibc_api.rs b/lib/ics23/src/ibc_api.rs index 6d9919929b..ab536b2c78 100644 --- a/lib/ics23/src/ibc_api.rs +++ b/lib/ics23/src/ibc_api.rs @@ -169,6 +169,7 @@ mod tests { merkle_path::MerklePath, merkle_proof::MerkleProof, merkle_root::MerkleRoot, }, ics24::ConnectionPath, + id::ConnectionId, }; use super::{verify_membership, verify_non_membership, VerifyMembershipError, SDK_SPECS}; @@ -344,9 +345,26 @@ mod tests { verify_membership( &proof, &SDK_SPECS, - &MerkleRoot { hash: hex!("F7ED1D182E325EA21817DC6048C7043056F76AB044642504CE57DDC5C1B47CD3").into() }, - &[b"ibc".to_vec(), ConnectionPath { connection_id: "connection-2".parse().unwrap() }.to_string().into_bytes()], - hex!("0a0930382d7761736d2d3112140a0131120f4f524445525f554e4f524445524544180122130a0a636f6d6574626c732d301a050a03696263").into() - ).unwrap(); + &MerkleRoot { + hash: hex!("F7ED1D182E325EA21817DC6048C7043056F76AB044642504CE57DDC5C1B47CD3") + .into(), + }, + &[ + b"ibc".to_vec(), + ConnectionPath { + connection_id: ConnectionId::new(2), + } + .ics24_commitment_path() + .into_bytes(), + ], + hex!( + "0a0930382d7761736d2d3112140a0131 + 120f4f524445525f554e4f52444552454 + 4180122130a0a636f6d6574626c732d30 + 1a050a03696263" + ) + .into(), + ) + .unwrap(); } } diff --git a/lib/ics23/src/ops/hash_op.rs b/lib/ics23/src/ops/hash_op.rs index 22f9b094b3..71b7045b08 100644 --- a/lib/ics23/src/ops/hash_op.rs +++ b/lib/ics23/src/ops/hash_op.rs @@ -4,7 +4,7 @@ use unionlabs::cosmos::ics23::hash_op::HashOp; #[derive(Debug, Clone, PartialEq, thiserror::Error)] pub enum HashError { #[error( - "supported hash ops are ([Sha256, Sha512, Ripemd160, Bitcoin, Sha512256]) but found ({0})" + "supported hash ops are ([Sha256, Sha512, Ripemd160, Bitcoin, Sha512256]) but found ({0:?})" )] UnsupportedOp(HashOp), } diff --git a/lib/ics23/src/ops/inner_op.rs b/lib/ics23/src/ops/inner_op.rs index 5f2aa2f4cf..7bf7fd5341 100644 --- a/lib/ics23/src/ops/inner_op.rs +++ b/lib/ics23/src/ops/inner_op.rs @@ -2,9 +2,11 @@ use unionlabs::cosmos::ics23::{ hash_op::HashOp, inner_op::InnerOp, inner_spec::PositiveI32AsUsize, proof_spec::ProofSpec, }; -use super::{hash_op, validate_iavl_ops}; use crate::{ - ops::hash_op::HashError, + ops::{ + hash_op::{self, HashError}, + validate_iavl_ops, + }, proof_specs::{self, IAVL_PROOF_SPEC}, }; diff --git a/lib/ics23/src/ops/length_op.rs b/lib/ics23/src/ops/length_op.rs index 99482fc8e0..341d6d7eb2 100644 --- a/lib/ics23/src/ops/length_op.rs +++ b/lib/ics23/src/ops/length_op.rs @@ -8,7 +8,7 @@ pub enum ApplyError { Required32Bytes(usize), #[error("required 64 bytes, ({0})")] Required64Bytes(usize), - #[error("unsupported op ({0})")] + #[error("unsupported op ({0:?})")] UnsupportedOp(LengthOp), #[error("too many data items (0)")] TooManyDataItems(usize), diff --git a/lib/ics23/src/proof_specs.rs b/lib/ics23/src/proof_specs.rs index dd60186a19..701b894075 100644 --- a/lib/ics23/src/proof_specs.rs +++ b/lib/ics23/src/proof_specs.rs @@ -23,14 +23,14 @@ pub const IAVL_PROOF_SPEC: ProofSpec = ProofSpec { child_order: Cow::Borrowed( const { &[ - result_unwrap!(PositiveI32AsUsize::new(0)), - result_unwrap!(PositiveI32AsUsize::new(1)), + result_unwrap!(PositiveI32AsUsize::new_const(0)), + result_unwrap!(PositiveI32AsUsize::new_const(1)), ] }, ), - child_size: result_unwrap!(PositiveI32AsUsize::new(33)), - min_prefix_length: result_unwrap!(PositiveI32AsUsize::new(4)), - max_prefix_length: result_unwrap!(PositiveI32AsUsize::new(12)), + child_size: result_unwrap!(PositiveI32AsUsize::new_const(33)), + min_prefix_length: result_unwrap!(PositiveI32AsUsize::new_const(4)), + max_prefix_length: result_unwrap!(PositiveI32AsUsize::new_const(12)), empty_child: Cow::Borrowed(&[]), hash: HashOp::Sha256, }, @@ -51,14 +51,14 @@ pub const TENDERMINT_PROOF_SPEC: ProofSpec = ProofSpec { child_order: Cow::Borrowed( const { &[ - result_unwrap!(PositiveI32AsUsize::new(0)), - result_unwrap!(PositiveI32AsUsize::new(1)), + result_unwrap!(PositiveI32AsUsize::new_const(0)), + result_unwrap!(PositiveI32AsUsize::new_const(1)), ] }, ), - child_size: result_unwrap!(PositiveI32AsUsize::new(32)), - min_prefix_length: result_unwrap!(PositiveI32AsUsize::new(1)), - max_prefix_length: result_unwrap!(PositiveI32AsUsize::new(1)), + child_size: result_unwrap!(PositiveI32AsUsize::new_const(32)), + min_prefix_length: result_unwrap!(PositiveI32AsUsize::new_const(1)), + max_prefix_length: result_unwrap!(PositiveI32AsUsize::new_const(1)), empty_child: Cow::Borrowed(&[]), hash: HashOp::Sha256, }, diff --git a/lib/ics23/src/verify.rs b/lib/ics23/src/verify.rs index 6a7620469a..544214e586 100644 --- a/lib/ics23/src/verify.rs +++ b/lib/ics23/src/verify.rs @@ -414,7 +414,7 @@ mod tests { commitment::{merkle_proof::MerkleProof, merkle_root::MerkleRoot}, connection::{connection_end::ConnectionEnd, version::Version}, }, - validated::ValidateT, + id::{ClientId, ConnectionId}, }; use super::*; @@ -523,15 +523,15 @@ mod tests { }, &[b"ibc".to_vec(), key.to_vec()], ConnectionEnd { - client_id: String::from("08-wasm-0").validate().unwrap(), + client_id: ClientId::new(0), versions: vec![Version { identifier: "1".to_string(), features: vec![Order::Unordered], }], state: unionlabs::ibc::core::connection::state::State::Tryopen, counterparty: unionlabs::ibc::core::connection::counterparty::Counterparty { - client_id: "cometbls-0".to_string().validate().unwrap(), - connection_id: Some("connection-0".to_string().validate().unwrap()), + client_id: ClientId::new(0), + connection_id: Some(ConnectionId::new(0)), prefix: unionlabs::ibc::core::commitment::merkle_prefix::MerklePrefix { key_prefix: b"ibc".to_vec(), }, diff --git a/lib/linea-verifier/Cargo.toml b/lib/linea-verifier/Cargo.toml index ee722a8071..d5ed9f1248 100644 --- a/lib/linea-verifier/Cargo.toml +++ b/lib/linea-verifier/Cargo.toml @@ -12,8 +12,8 @@ workspace = true test-include = ["lib/scroll-verifier/tests"] [dependencies] +alloy-core = { workspace = true } ethereum-verifier = { workspace = true } -ethers-core = { workspace = true } gnark-mimc = { workspace = true } hex = { workspace = true } hex-literal = { workspace = true } diff --git a/lib/linea-verifier/src/lib.rs b/lib/linea-verifier/src/lib.rs index fa26403269..05ca97641a 100644 --- a/lib/linea-verifier/src/lib.rs +++ b/lib/linea-verifier/src/lib.rs @@ -118,10 +118,7 @@ mod tests { let client_state = ClientState { chain_id: 59144.into(), l1_client_id: "08-wasm-0".into(), - l1_latest_height: Height { - revision_number: 0, - revision_height: 0, - }, + l1_latest_height: Height::default(), l1_rollup_contract_address: hex!("B218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5").into(), l1_rollup_current_l2_timestamp_slot: 0x118.into(), l1_rollup_current_l2_block_number_slot: 0x119.into(), @@ -131,10 +128,9 @@ mod tests { frozen_height: Height::default(), }; let header = Header { - l1_height: Height { - revision_number: 0, - revision_height: 4946965, // execution: 5855907 - }, + l1_height: Height::new( + 4946965, // execution: 5855907 + ), l1_rollup_contract_proof: serde_json::from_str(r#" { "storage_root": "0x26a5ca50671f3feb7abdd10c729ee5136358dbaf56be37707a1e7da25ba2cb34", "proof": diff --git a/lib/macros/src/lib.rs b/lib/macros/src/lib.rs index 9c18bbf38a..038b3c50ec 100644 --- a/lib/macros/src/lib.rs +++ b/lib/macros/src/lib.rs @@ -1,8 +1,8 @@ -use std::{collections::HashMap, convert}; +use std::convert; use proc_macro::{Delimiter, Group, Punct, Spacing, TokenStream, TokenTree}; use proc_macro2::{Literal, Span}; -use quote::{format_ident, quote, quote_spanned, ToTokens}; +use quote::{format_ident, quote, ToTokens}; use syn::{ fold::Fold, parenthesized, @@ -11,7 +11,7 @@ use syn::{ punctuated::Punctuated, spanned::Spanned, Attribute, Data, DeriveInput, Expr, ExprPath, Field, Fields, GenericParam, Generics, Ident, - Item, ItemEnum, ItemStruct, LitStr, MacroDelimiter, Meta, MetaList, Path, Token, Type, Variant, + Item, ItemEnum, ItemStruct, LitStr, MacroDelimiter, Meta, MetaList, Path, Token, Variant, WhereClause, WherePredicate, }; @@ -616,7 +616,7 @@ fn mk_ethabi( type Error = crate::TryFromEthAbiBytesError<<#ident #ty_generics as TryFrom<#raw>>::Error>; fn decode(bytes: &[u8]) -> Result { - <#raw as ethers_core::abi::AbiDecode>::decode(bytes) + <#raw as alloy_core::sol_types::SolValue>::abi_decode(bytes, cfg!(debug_assertions)) .map_err(crate::TryFromEthAbiBytesError::Decode) .and_then(|proto| { proto @@ -634,7 +634,7 @@ fn mk_ethabi( #[automatically_derived] impl #impl_generics crate::encoding::Encode for #ident #ty_generics #into_where_clause { fn encode(self) -> Vec { - ethers_core::abi::AbiEncode::encode(Into::<#raw>::into(self)) + alloy_core::sol_types::SolValue::abi_encode(&Into::<#raw>::into(self)) } } }); @@ -664,7 +664,12 @@ pub fn model(meta: TokenStream, ts: TokenStream) -> TokenStream { let proto = proto.map(|from_raw| mk_proto(from_raw, ident, generics)); let ethabi = ethabi.map(|from_raw| mk_ethabi(from_raw, ident, generics)); - quote! { #proto #ethabi } + quote! { + #[cfg(feature = "proto")] + const _: () = { #proto }; + #[cfg(feature = "ethabi")] + const _: () = { #ethabi }; + } } _ => panic!(), }; @@ -684,12 +689,18 @@ pub fn model(meta: TokenStream, ts: TokenStream) -> TokenStream { let serde = (!no_serde).then(|| { quote! { - #[derive(::serde::Serialize, ::serde::Deserialize)] - #[serde( - deny_unknown_fields, - tag = "@type", - content = "@value", - rename_all = "snake_case" + #[cfg_attr( + feature = "serde", + derive(::serde::Serialize, ::serde::Deserialize) + )] + #[cfg_attr( + feature = "serde", + serde( + deny_unknown_fields, + tag = "@type", + content = "@value", + rename_all = "snake_case" + ) )] } }); @@ -701,6 +712,7 @@ pub fn model(meta: TokenStream, ts: TokenStream) -> TokenStream { ::core::cmp::PartialEq, ::core::cmp::Eq, )] + // #[cfg_attr(feature = "valuable", derive(::valuable::Valuable))] #serde } } @@ -715,10 +727,16 @@ pub fn model(meta: TokenStream, ts: TokenStream) -> TokenStream { let serde = (!no_serde).then(|| { quote! { - #[derive(::serde::Serialize, ::serde::Deserialize)] - #[serde( - deny_unknown_fields, - rename_all = "snake_case" + #[cfg_attr( + feature = "serde", + derive(::serde::Serialize, ::serde::Deserialize) + )] + #[cfg_attr( + feature = "serde", + serde( + deny_unknown_fields, + rename_all = "snake_case" + ) )] } }); @@ -730,6 +748,7 @@ pub fn model(meta: TokenStream, ts: TokenStream) -> TokenStream { ::core::cmp::PartialEq, ::core::cmp::Eq, )] + // #[cfg_attr(feature = "valuable", derive(::valuable::Valuable))] #serde } } @@ -912,168 +931,3 @@ impl Parse for FromRawAttrs { } } } - -/// NOTE: Doesn't support generics. Generics this low in the stack is a dark path I do not wish to explore again -#[proc_macro_attribute] -pub fn ibc_path(meta: TokenStream, ts: TokenStream) -> TokenStream { - let item_struct = parse_macro_input!(ts as ItemStruct); - let IbcPathMeta { path, comma: _, ty } = parse_macro_input!(meta as IbcPathMeta); - - let segments = parse_ibc_path(path.clone()); - - let Fields::Named(ref fields) = item_struct.fields else { - panic!("expected named fields") - }; - - assert_eq!( - fields - .named - .iter() - .map(|x| x.ident.as_ref().unwrap()) - .collect::>(), - segments - .iter() - .filter_map(|x| match x { - Segment::Static(_) => None, - Segment::Variable(x) => Some(x), - }) - .collect::>() - ); - - let fields_map = fields - .named - .iter() - .map(|f| (f.ident.as_ref().unwrap(), &f.ty)) - .collect::>(); - - let parse_body = segments - .iter() - .map(|x| match x { - Segment::Static(static_seg) => quote! { - match it.next() { - Some(segment) => { - if segment != #static_seg { - return Err(PathParseError::InvalidStaticSegment { - expected: #static_seg, - found: segment.to_string(), - }) - } - } - None => return Err(PathParseError::MissingStaticSegment(#static_seg)), - } - }, - Segment::Variable(variable_seg) => { - let ty = fields_map[variable_seg]; - quote! { - let #variable_seg = match it.next() { - Some(segment) => segment - .parse() - .map_err(|e: <#ty as ::core::str::FromStr>::Err| PathParseError::Parse(e.to_string()))?, - None => return Err(PathParseError::MissingSegment), - }; - } - } - }) - .collect::(); - - let display_body = segments - .iter() - .map(|x| match x { - Segment::Static(_) => quote! {}, - Segment::Variable(variable_seg) => quote_spanned! {fields_map[variable_seg].span()=> - let #variable_seg = &self.#variable_seg; - }, - }) - .collect::(); - - let field_pat = segments.iter().filter_map(|seg| match seg { - Segment::Static(_) => None, - // use the span of the input tokens - Segment::Variable(variable_seg) => Some(fields_map.get_key_value(variable_seg).unwrap().0), - }); - - let ident = &item_struct.ident; - - quote! { - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Hash, ::clap::Args)] - #[serde(deny_unknown_fields)] - #item_struct - - const _: () = { - #[automatically_derived] - impl ::core::fmt::Display for #ident { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - #display_body - - write!(f, #path) - } - } - }; - - const _: () = { - #[automatically_derived] - impl ::core::str::FromStr for #ident { - type Err = PathParseError; - - fn from_str(s: &str) -> ::core::result::Result { - let mut it = s.split('/'); - - #parse_body - - if it.next().is_some() { - return Err(PathParseError::TooManySegments); - } - - Ok(Self { #(#field_pat),* }) - } - } - }; - - const _: () = { - impl IbcPath for #ident { - type Value = #ty; - } - }; - } - .into() -} - -struct IbcPathMeta { - path: LitStr, - #[allow(unused)] - comma: Token![,], - ty: Type, -} - -impl Parse for IbcPathMeta { - fn parse(input: ParseStream) -> syn::Result { - Ok(Self { - path: input.parse()?, - comma: input.parse()?, - ty: input.parse()?, - }) - } -} - -enum Segment { - Static(String), - Variable(syn::Ident), -} - -fn parse_ibc_path(path: LitStr) -> Vec { - path.value() - .split('/') - .map(|segment| { - segment - .strip_prefix('{') - .map(|s| { - s.strip_suffix('}') - .expect("unclosed `{` in variable interpolation") - }) - .map_or_else( - || Segment::Static(segment.to_string()), - |s| Segment::Variable(Ident::new(s, path.span())), - ) - }) - .collect() -} diff --git a/lib/near/dummy-ibc-app/src/contract.rs b/lib/near/dummy-ibc-app/src/contract.rs index ab257e92fd..e259bbaf47 100644 --- a/lib/near/dummy-ibc-app/src/contract.rs +++ b/lib/near/dummy-ibc-app/src/contract.rs @@ -77,10 +77,7 @@ impl Contract { .send_packet( env::current_account_id().to_string().validate().unwrap(), source_channel, - Height { - revision_number: 0, - revision_height: 1_000_000_000, - }, + Height::new(1_000_000_000), 0, b"hello world!".to_vec(), ) diff --git a/lib/near/near-ibc-tests/src/main.rs b/lib/near/near-ibc-tests/src/main.rs index 29ce822b35..0e4ad1d1b3 100644 --- a/lib/near/near-ibc-tests/src/main.rs +++ b/lib/near/near-ibc-tests/src/main.rs @@ -327,7 +327,7 @@ async fn update_client( client_id: client_id.to_string(), client_msg: borsh::to_vec(&HeaderUpdate { new_state: convert_light_client_block_view(light_client_block), - trusted_height: latest_height.revision_height, + trusted_height: latest_height.height(), prev_state_root_proof, prev_state_root, }) diff --git a/lib/near/near-ibc/src/contract.rs b/lib/near/near-ibc/src/contract.rs index c9cb2737fe..779c148d54 100644 --- a/lib/near/near-ibc/src/contract.rs +++ b/lib/near/near-ibc/src/contract.rs @@ -90,10 +90,7 @@ impl IbcHost for Contract { } fn current_height(&self) -> Height { - Height { - revision_number: 0, - revision_height: env::block_height(), - } + Height::new(env::block_height()) } fn current_timestamp(&self) -> u64 { diff --git a/lib/near/near-light-client/src/contract.rs b/lib/near/near-light-client/src/contract.rs index 2fe1d9b48d..30b354d56c 100644 --- a/lib/near/near-light-client/src/contract.rs +++ b/lib/near/near-light-client/src/contract.rs @@ -98,10 +98,7 @@ impl Contract { } pub fn latest_height(&self) -> Height { - Height { - revision_number: 0, - revision_height: self.client_state.latest_height, - } + Height::new(self.client_state.latest_height) } #[allow(unused)] @@ -117,10 +114,7 @@ impl Contract { ) -> bool { let raw_state_proof: RawStateProof = serde_json::from_slice(&proof).unwrap(); let state_proof = raw_state_proof.parse(); - let consensus_state = self - .consensus_states - .get(&(height.revision_height + 1)) - .unwrap(); + let consensus_state = self.consensus_states.get(&(height.height() + 1)).unwrap(); let key = key_from_path(&path.key_path[1]); @@ -184,10 +178,7 @@ impl Contract { ( borsh::to_vec(&self.client_state).unwrap(), vec![( - Height { - revision_number: 0, - revision_height: header_update.new_state.inner_lite.height, - }, + Height::new(header_update.new_state.inner_lite.height), borsh::to_vec(&new_consensus_state).unwrap(), )], ) diff --git a/lib/scroll-codec/Cargo.toml b/lib/scroll-codec/Cargo.toml index e823f87e21..ae80285951 100644 --- a/lib/scroll-codec/Cargo.toml +++ b/lib/scroll-codec/Cargo.toml @@ -9,7 +9,7 @@ version = "0.1.0" workspace = true [dependencies] -ethers = { workspace = true } +alloy = { workspace = true } serde = { workspace = true, features = ["derive"] } serde-utils = { workspace = true } serde_json = { workspace = true, optional = true } diff --git a/lib/scroll-codec/src/lib.rs b/lib/scroll-codec/src/lib.rs index f244157077..07e9dd4ecb 100644 --- a/lib/scroll-codec/src/lib.rs +++ b/lib/scroll-codec/src/lib.rs @@ -11,46 +11,25 @@ use crate::batch_header::{BatchHeaderV3, BatchHeaderV3DecodeError}; pub mod batch_header; -/// See -#[derive( - Debug, - Clone, - PartialEq, - Eq, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Serialize, - Deserialize, -)] -#[ethcall(name = "finalizeBundle", abi = "finalizeBundle(bytes,bytes32,bytes32)")] -pub struct FinalizeBundle { - #[serde(with = "::serde_utils::hex_string")] - pub batch_header: ethers::core::types::Bytes, - pub post_state_root: H256, - pub withdraw_root: H256, -} +alloy::sol! { + // #[allow(clippy::pub_underscore_fields)] + + /// See + #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] + function finalizeBundle( + bytes calldata _batchHeader, + bytes32 _postStateRoot, + bytes32 _withdrawRoot + ); -/// See -#[derive( - Debug, - Clone, - PartialEq, - Eq, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Serialize, - Deserialize, -)] -#[ethcall( - name = "finalizeBundleWithProof", - abi = "finalizeBundleWithProof(bytes,bytes32,bytes32,bytes)" -)] -pub struct FinalizeBundleWithProof { - #[serde(with = "::serde_utils::hex_string")] - pub batch_header: ethers::core::types::Bytes, - pub post_state_root: H256, - pub withdraw_root: H256, - pub aggr_proof: ethers::core::types::Bytes, + /// See + #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] + function finalizeBundleWithProof( + bytes calldata _batchHeader, + bytes32 _postStateRoot, + bytes32 _withdrawRoot, + bytes calldata _aggrProof + ); } #[derive(Debug, Clone, PartialEq, thiserror::Error)] diff --git a/lib/scroll-verifier/Cargo.toml b/lib/scroll-verifier/Cargo.toml index 90e1f7ebcc..7e76716aa1 100644 --- a/lib/scroll-verifier/Cargo.toml +++ b/lib/scroll-verifier/Cargo.toml @@ -12,8 +12,8 @@ workspace = true test-include = ["lib/scroll-verifier/tests"] [dependencies] +alloy-core = { workspace = true } ethereum-verifier = { workspace = true } -ethers-core = { workspace = true } hex = { workspace = true } hex-literal = { workspace = true } rlp = { workspace = true } diff --git a/lib/scroll-verifier/src/lib.rs b/lib/scroll-verifier/src/lib.rs index 2e72baf0d0..92a1feab04 100644 --- a/lib/scroll-verifier/src/lib.rs +++ b/lib/scroll-verifier/src/lib.rs @@ -180,10 +180,7 @@ mod tests { chain_id: 534351.into(), latest_slot: 65327, latest_batch_index_slot: 156.into(), - frozen_height: Height { - revision_number: 0, - revision_height: 0, - }, + frozen_height: Height::default(), l2_contract_address: H160::new(hex!("2d567ece699eabe5afcd141edb7a4f2d0d6ce8a0")), l2_finalized_state_roots_slot: 158.into(), l2_committed_batches_slot: 157.into(), diff --git a/lib/unionlabs-tracing/Cargo.toml b/lib/unionlabs-tracing/Cargo.toml new file mode 100644 index 0000000000..7e6539589f --- /dev/null +++ b/lib/unionlabs-tracing/Cargo.toml @@ -0,0 +1,14 @@ +[package] +edition.workspace = true +license-file.workspace = true +name = "unionlabs-tracing" +repository.workspace = true +version = "0.1.0" + +[dependencies] +tracing = { workspace = true, features = ["valuable"] } +tracing-subscriber.workspace = true +valuable = "0.1.0" + +[lints] +workspace = true diff --git a/lib/unionlabs-tracing/src/lib.rs b/lib/unionlabs-tracing/src/lib.rs new file mode 100644 index 0000000000..058c4554ff --- /dev/null +++ b/lib/unionlabs-tracing/src/lib.rs @@ -0,0 +1,212 @@ +use core::fmt; +use std::fmt::Debug; + +use tracing::field::Visit; +use tracing_subscriber::{ + field::{MakeVisitor, VisitFmt, VisitOutput}, + fmt::format::{DefaultVisitor, Writer}, +}; +use valuable::{NamedValues, Slice, Valuable, Value}; + +pub struct CustomVisitor<'a> { + inner: DefaultVisitor<'a>, + res: fmt::Result, +} + +impl<'a> Visit for CustomVisitor<'a> { + fn record_value(&mut self, field: &tracing::field::Field, value: Value<'_>) { + let value_pretty_debug = ValuePrettyDebug { value, res: Ok(()) }; + self.inner.record_debug(field, &value_pretty_debug); + self.res = value_pretty_debug.res; + } + + fn record_debug(&mut self, field: &tracing::field::Field, value: &dyn std::fmt::Debug) { + self.inner.record_debug(field, value); + } +} + +impl<'a> VisitFmt for CustomVisitor<'a> { + fn writer(&mut self) -> &mut dyn fmt::Write { + self.inner.writer() + } +} + +impl<'a> VisitOutput for CustomVisitor<'a> { + fn finish(self) -> fmt::Result { + self.res + } +} + +struct ValuePrettyDebug<'a> { + value: Value<'a>, + res: fmt::Result, +} + +impl<'a> Debug for ValuePrettyDebug<'a> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + self.value.visit(&mut PrettyVisitor { + f, + prefix_with_comma: false, + res: Ok(()), + }); + + Ok(()) + } +} + +struct PrettyVisitor<'a, 'b> { + f: &'a mut std::fmt::Formatter<'b>, + prefix_with_comma: bool, + res: fmt::Result, +} + +impl<'a, 'b> valuable::Visit for PrettyVisitor<'a, 'b> { + fn visit_value(&mut self, value: Value<'_>) { + if self.prefix_with_comma { + self.res = write!(self.f, ","); + } + + match value { + Value::Bool(v) => { + self.res = write!(self.f, "{v}"); + } + Value::Char(v) => { + self.res = write!(self.f, "{v}"); + } + Value::F32(v) => { + self.res = write!(self.f, "{v}"); + } + Value::F64(v) => { + self.res = write!(self.f, "{v}"); + } + Value::I8(v) => { + self.res = write!(self.f, "{v}"); + } + Value::I16(v) => { + self.res = write!(self.f, "{v}"); + } + Value::I32(v) => { + self.res = write!(self.f, "{v}"); + } + Value::I64(v) => { + self.res = write!(self.f, "{v}"); + } + Value::I128(v) => { + self.res = write!(self.f, "{v}"); + } + Value::Isize(v) => { + self.res = write!(self.f, "{v}"); + } + Value::String(v) => { + self.res = write!(self.f, "{v:?}"); + } + Value::U8(v) => { + self.res = write!(self.f, "{v}"); + } + Value::U16(v) => { + self.res = write!(self.f, "{v}"); + } + Value::U32(v) => { + self.res = write!(self.f, "{v}"); + } + Value::U64(v) => { + self.res = write!(self.f, "{v}"); + } + Value::U128(v) => { + self.res = write!(self.f, "{v}"); + } + Value::Usize(v) => { + self.res = write!(self.f, "{v}"); + } + Value::Path(v) => { + self.res = write!(self.f, "{v:?}"); + } + Value::Error(v) => { + self.res = write!(self.f, "{v}"); + } + Value::Listable(v) => { + self.res = write!(self.f, "["); + + v.visit(self); + + self.res = write!(self.f, "]"); + } + Value::Mappable(v) => v.visit(self), + Value::Structable(v) => v.visit(self), + Value::Enumerable(v) => { + let variant = v.variant(); + let variant_name = variant.name(); + + self.res = write!(self.f, "{variant_name}:"); + + v.visit(self) + } + Value::Tuplable(v) => v.visit(self), + Value::Unit => todo!(), + _ => todo!(), + } + } + + fn visit_named_fields(&mut self, named_values: &NamedValues<'_>) { + let len = named_values.len(); + + self.res = write!(self.f, "{{"); + for (i, (k, v)) in named_values.into_iter().enumerate() { + self.res = write!(self.f, "{}=", k.name()); + v.visit(self); + if i < len - 1 { + self.res = write!(self.f, ","); + } + } + self.res = write!(self.f, "}}"); + } + + fn visit_unnamed_fields(&mut self, values: &[Value<'_>]) { + let len = values.len(); + + if len > 1 { + self.res = write!(self.f, "("); + } + for (i, v) in values.iter().enumerate() { + v.visit(self); + if i < len - 1 { + self.res = write!(self.f, ","); + } + } + if len > 1 { + self.res = write!(self.f, ")"); + } + } + + fn visit_primitive_slice(&mut self, slice: Slice<'_>) { + let len = slice.len(); + + self.res = write!(self.f, "["); + for (i, v) in slice.into_iter().enumerate() { + v.visit(self); + if i < len - 1 { + self.res = write!(self.f, ","); + } + } + self.res = write!(self.f, "]"); + } + + fn visit_entry(&mut self, key: Value<'_>, value: Value<'_>) { + key.visit(self); + self.res = write!(self.f, "="); + value.visit(self); + } +} + +pub struct MakeCustomVisitor {} + +impl<'a> MakeVisitor> for MakeCustomVisitor { + type Visitor = CustomVisitor<'a>; + + fn make_visitor(&self, target: Writer<'a>) -> Self::Visitor { + CustomVisitor { + inner: DefaultVisitor::new(target, true), + res: Ok(()), + } + } +} diff --git a/lib/unionlabs/Cargo.toml b/lib/unionlabs/Cargo.toml index db306c105c..56160e4337 100644 --- a/lib/unionlabs/Cargo.toml +++ b/lib/unionlabs/Cargo.toml @@ -12,70 +12,91 @@ test-include = [] workspace = true [dependencies] +alloy-core = { workspace = true, optional = true } bip32 = { workspace = true, features = ["secp256k1"] } bitvec = { workspace = true } chrono = { workspace = true, features = ["alloc"] } -clap = { workspace = true, features = ["derive"] } -contracts = { workspace = true, optional = true } -cosmwasm-std = { workspace = true } +cosmwasm-std = { workspace = true, optional = true } derive_more = { workspace = true, features = ["display"] } either = { workspace = true } enumorph = { workspace = true } -ethers = { workspace = true, optional = true } -ethers-contract-derive = { workspace = true, optional = true } -ethers-core = { workspace = true, optional = true } frame-support-procedural = { workspace = true } generic-array = "0.14.7" hex = { workspace = true } hex-literal = { workspace = true } +ibc-solidity = { workspace = true, optional = true, features = ["rpc"] } # TODO: Remove this feature flag k256 = { version = "0.13.1", default-features = false, features = ["schnorr"] } # needs to be brought in explicitly since bip32 doesn't expose k256/schnorr macros = { workspace = true } milagro_bls = { workspace = true } paste = { version = "1.0" } -primitive-types = { workspace = true, features = ["serde_no_std", "impl-rlp"] } -prost = { workspace = true, features = ["std"] } -protos = { workspace = true, features = ["proto_full", "serde"] } +prost = { workspace = true, optional = true, features = ["std"] } +protos = { workspace = true, features = ["proto_full"], optional = true } ripemd = { workspace = true } -rlp = { workspace = true, features = ["derive"] } +rlp = { workspace = true, features = ["derive"], optional = true } rs_merkle = "1.4.1" -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, optional = true, features = ["derive"] } serde-utils = { workspace = true } -serde_json = { workspace = true } +serde_json = { workspace = true, optional = true } sha2 = { workspace = true } sha3 = { workspace = true } -ssz = { workspace = true } +ssz = { workspace = true, optional = true } static_assertions = { workspace = true } subtle-encoding = { workspace = true, features = ["bech32-preview"] } thiserror = { workspace = true } -tracing = { workspace = true } typenum = { workspace = true, features = ["const-generics", "no_std"] } -uint = "*" wasmparser = { version = "0.113" } base64 = { workspace = true } -bcs = { workspace = true } +bcs = { workspace = true, optional = true } borsh = { workspace = true, features = ["borsh-derive"], optional = true } bs58 = "0.4" near-primitives-core = { version = "0.21", optional = true } near-sdk = { workspace = true, optional = true } +ruint = { version = "1.12.3" } schemars = { workspace = true, features = ["derive"], optional = true } serde_bytes = "0.11.6" +valuable = { workspace = true, features = ["derive", "alloc"], optional = true } [dev-dependencies] rand = "0.8.5" serde_json = { workspace = true } [features] -default = ["ethabi", "std", "stargate"] +default = ["std"] -cosmwasm = [] -ethabi = ["contracts", "ethers-core", "ethers-contract-derive", "ethers"] -grpc = ["protos/client"] -near = ["borsh", "near-sdk", "near-primitives-core"] -std = ["ethers-core/std"] +full = [ + "cosmwasm", + "ethabi", + "proto", + "bcs", + "near", + "serde", + "test_utils", + "schemars", + "stargate", + "rlp", + "valuable", + "json", + "ssz" +] -fuzzing = [] -test_utils = [] +cosmwasm = ["dep:cosmwasm-std", "dep:serde"] + +std = ["alloy-core/std", "ruint/std", "base64/std"] + +# encodings +bcs = ["dep:bcs", "protos?/serde", "serde"] +ethabi = ["dep:alloy-core", "dep:ibc-solidity"] +json = ["dep:serde_json", "dep:serde"] +proto = ["dep:protos", "dep:prost"] +rlp = ["dep:rlp", "ruint/rlp"] +serde = ["dep:serde", "protos?/serde", "ruint/serde"] +ssz = ["dep:ssz"] + +near = ["dep:borsh", "dep:near-sdk", "dep:near-primitives-core"] schemars = ["dep:schemars"] -stargate = ["cosmwasm", "cosmwasm-std/stargate"] +stargate = ["cosmwasm", "proto", "cosmwasm-std?/stargate"] +valuable = ["dep:valuable"] + +test_utils = ["full"] diff --git a/lib/unionlabs/src/aptos/account.rs b/lib/unionlabs/src/aptos/account.rs index 160cde7c8e..4bc85f8bcf 100644 --- a/lib/unionlabs/src/aptos/account.rs +++ b/lib/unionlabs/src/aptos/account.rs @@ -3,7 +3,7 @@ /// We only use the strict parsing and display functionality, and wrap our `H256` type instead of `[u8; 32]`. use core::{fmt, str::FromStr}; -use serde::{Deserialize, Serialize}; +use macros::model; use crate::{ errors::InvalidLength, @@ -13,9 +13,7 @@ use crate::{ }, }; -#[derive( - macros::Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, -)] +#[model] #[debug("AccountAddress({})", self)] pub struct AccountAddress(pub H256); diff --git a/lib/unionlabs/src/aptos/block_info.rs b/lib/unionlabs/src/aptos/block_info.rs index aae7aaf6c8..abd9a57dee 100644 --- a/lib/unionlabs/src/aptos/block_info.rs +++ b/lib/unionlabs/src/aptos/block_info.rs @@ -1,12 +1,8 @@ use macros::model; -use super::epoch_state::{EpochState, TryFromEpochStateError}; use crate::{ - errors::InvalidLength, - hash::{ - hash_v2::{Hash, HexUnprefixed}, - H256, - }, + aptos::epoch_state::EpochState, + hash::{hash_v2::HexUnprefixed, H256}, }; /// The round of a block is a consensus-internal counter, which starts with 0 and increases @@ -49,45 +45,54 @@ pub struct BlockInfo { pub next_epoch_state: Option, } -impl From for protos::union::ibc::lightclients::movement::v1::BlockInfo { - fn from(value: BlockInfo) -> Self { - Self { - epoch: value.epoch, - round: value.round, - id: value.id.into_bytes(), - executed_state_id: value.executed_state_id.into_bytes(), - version: value.version, - timestamp_usecs: value.timestamp_usecs, - next_epoch_state: value.next_epoch_state.map(Into::into), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::{block_info::BlockInfo, epoch_state::proto::TryFromEpochStateError}, + errors::InvalidLength, + hash::{hash_v2::Hash, H256}, + }; + + impl From for protos::union::ibc::lightclients::movement::v1::BlockInfo { + fn from(value: BlockInfo) -> Self { + Self { + epoch: value.epoch, + round: value.round, + id: value.id.into_bytes(), + executed_state_id: value.executed_state_id.into_bytes(), + version: value.version, + timestamp_usecs: value.timestamp_usecs, + next_epoch_state: value.next_epoch_state.map(Into::into), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromBlockInfoError { - #[error("invalid id")] - Id(#[source] InvalidLength), - #[error("invalid executed state id")] - ExecutedStateId(#[source] InvalidLength), - #[error("invalid next epoch state: {0}")] - NextEpochState(#[from] TryFromEpochStateError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromBlockInfoError { + #[error("invalid id")] + Id(#[source] InvalidLength), + #[error("invalid executed state id")] + ExecutedStateId(#[source] InvalidLength), + #[error("invalid next epoch state: {0}")] + NextEpochState(#[from] TryFromEpochStateError), + } -impl TryFrom for BlockInfo { - type Error = TryFromBlockInfoError; + impl TryFrom for BlockInfo { + type Error = TryFromBlockInfoError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::BlockInfo, - ) -> Result { - Ok(Self { - epoch: value.epoch, - round: value.round, - id: H256::try_from(value.id).map_err(TryFromBlockInfoError::Id)?, - executed_state_id: Hash::try_from(value.executed_state_id) - .map_err(TryFromBlockInfoError::ExecutedStateId)?, - version: value.version, - timestamp_usecs: value.timestamp_usecs, - next_epoch_state: value.next_epoch_state.map(TryInto::try_into).transpose()?, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::BlockInfo, + ) -> Result { + Ok(Self { + epoch: value.epoch, + round: value.round, + id: H256::try_from(value.id).map_err(TryFromBlockInfoError::Id)?, + executed_state_id: Hash::try_from(value.executed_state_id) + .map_err(TryFromBlockInfoError::ExecutedStateId)?, + version: value.version, + timestamp_usecs: value.timestamp_usecs, + next_epoch_state: value.next_epoch_state.map(TryInto::try_into).transpose()?, + }) + } } } diff --git a/lib/unionlabs/src/aptos/epoch_change.rs b/lib/unionlabs/src/aptos/epoch_change.rs index a3ae92630c..ea20581019 100644 --- a/lib/unionlabs/src/aptos/epoch_change.rs +++ b/lib/unionlabs/src/aptos/epoch_change.rs @@ -4,7 +4,7 @@ use macros::model; -use super::ledger_info::{LedgerInfoWithSignatures, TryFromLedgerInfoWithSignatures}; +use crate::aptos::ledger_info::LedgerInfoWithSignatures; /// A vector of `LedgerInfo` with contiguous increasing epoch numbers to prove a sequence of /// epoch changes from the first `LedgerInfo`'s epoch. @@ -18,40 +18,47 @@ pub struct EpochChangeProof { pub more: bool, } -impl From for protos::union::ibc::lightclients::movement::v1::EpochChangeProof { - fn from(value: EpochChangeProof) -> Self { - Self { - ledger_info_with_sigs: value - .ledger_info_with_sigs - .into_iter() - .map(Into::into) - .collect(), - more: value.more, +#[cfg(feature = "proto")] +pub mod proto { + use crate::aptos::{ + epoch_change::EpochChangeProof, ledger_info::proto::TryFromLedgerInfoWithSignatures, + }; + + impl From for protos::union::ibc::lightclients::movement::v1::EpochChangeProof { + fn from(value: EpochChangeProof) -> Self { + Self { + ledger_info_with_sigs: value + .ledger_info_with_sigs + .into_iter() + .map(Into::into) + .collect(), + more: value.more, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromEpochChangeProof { - #[error("invalid ledger info with sigs")] - LedgerInfoWithSigs(#[from] TryFromLedgerInfoWithSignatures), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromEpochChangeProof { + #[error("invalid ledger info with sigs")] + LedgerInfoWithSigs(#[from] TryFromLedgerInfoWithSignatures), + } + + impl TryFrom + for EpochChangeProof + { + type Error = TryFromEpochChangeProof; -impl TryFrom - for EpochChangeProof -{ - type Error = TryFromEpochChangeProof; - - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::EpochChangeProof, - ) -> Result { - Ok(Self { - ledger_info_with_sigs: value - .ledger_info_with_sigs - .into_iter() - .map(TryInto::try_into) - .collect::, _>>()?, - more: value.more, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::EpochChangeProof, + ) -> Result { + Ok(Self { + ledger_info_with_sigs: value + .ledger_info_with_sigs + .into_iter() + .map(TryInto::try_into) + .collect::, _>>()?, + more: value.more, + }) + } } } diff --git a/lib/unionlabs/src/aptos/epoch_state.rs b/lib/unionlabs/src/aptos/epoch_state.rs index 8a063ce2ce..71cb138ccd 100644 --- a/lib/unionlabs/src/aptos/epoch_state.rs +++ b/lib/unionlabs/src/aptos/epoch_state.rs @@ -2,12 +2,9 @@ // Parts of the project are originally copyright © Meta Platforms, Inc. // SPDX-License-Identifier: Apache-2.0 -use core::fmt; - use macros::model; -use super::validator_verifier::{TryFromValidatorVerifierError, ValidatorVerifier}; -use crate::errors::{required, MissingField}; +use crate::aptos::validator_verifier::ValidatorVerifier; /// `EpochState` represents a trusted validator set to validate messages from the specific epoch, /// it could be updated with `EpochChangeProof`. @@ -21,42 +18,42 @@ pub struct EpochState { pub verifier: ValidatorVerifier, } -impl fmt::Display for EpochState { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "EpochState [epoch: {}, validator: {:?}]", - self.epoch, self.verifier - ) - } -} - -impl From for protos::union::ibc::lightclients::movement::v1::EpochState { - fn from(value: EpochState) -> Self { - Self { - epoch: value.epoch, - verifier: Some(value.verifier.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::{ + epoch_state::EpochState, validator_verifier::proto::TryFromValidatorVerifierError, + }, + errors::{required, MissingField}, + }; + + impl From for protos::union::ibc::lightclients::movement::v1::EpochState { + fn from(value: EpochState) -> Self { + Self { + epoch: value.epoch, + verifier: Some(value.verifier.into()), + } } } -} -#[derive(Clone, Debug, PartialEq, thiserror::Error)] -pub enum TryFromEpochStateError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid verifier: {0}")] - Verifier(#[from] TryFromValidatorVerifierError), -} + #[derive(Clone, Debug, PartialEq, thiserror::Error)] + pub enum TryFromEpochStateError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid verifier: {0}")] + Verifier(#[from] TryFromValidatorVerifierError), + } -impl TryFrom for EpochState { - type Error = TryFromEpochStateError; + impl TryFrom for EpochState { + type Error = TryFromEpochStateError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::EpochState, - ) -> Result { - Ok(Self { - epoch: value.epoch, - verifier: required!(value.verifier)?.try_into()?, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::EpochState, + ) -> Result { + Ok(Self { + epoch: value.epoch, + verifier: required!(value.verifier)?.try_into()?, + }) + } } } diff --git a/lib/unionlabs/src/aptos/ledger_info.rs b/lib/unionlabs/src/aptos/ledger_info.rs index aaba17fa64..b2786e4b19 100644 --- a/lib/unionlabs/src/aptos/ledger_info.rs +++ b/lib/unionlabs/src/aptos/ledger_info.rs @@ -1,16 +1,8 @@ use macros::model; -use serde::{Deserialize, Serialize}; -use super::{ - block_info::{BlockInfo, TryFromBlockInfoError}, - signature::{AggregateSignature, TryFromAggregateSignatureError}, -}; use crate::{ - errors::{required, InvalidLength, MissingField}, - hash::{ - hash_v2::{Hash, HexUnprefixed}, - H256, - }, + aptos::{block_info::BlockInfo, signature::AggregateSignature}, + hash::{hash_v2::HexUnprefixed, H256}, }; /// Wrapper to support future upgrades, this is the data being persisted. @@ -22,7 +14,7 @@ use crate::{ ), no_serde )] -#[derive(Serialize, Deserialize)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum LedgerInfoWithSignatures { V0(LedgerInfoWithV0), } @@ -53,72 +45,85 @@ pub struct LedgerInfo { pub consensus_data_hash: H256, } -impl From - for protos::union::ibc::lightclients::movement::v1::LedgerInfoWithSignatures -{ - fn from(value: LedgerInfoWithSignatures) -> Self { - let LedgerInfoWithSignatures::V0(value) = value; - Self { - ledger_info: Some(value.ledger_info.into()), - signatures: Some(value.signatures.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::{ + block_info::proto::TryFromBlockInfoError, + ledger_info::{LedgerInfo, LedgerInfoWithSignatures, LedgerInfoWithV0}, + signature::proto::TryFromAggregateSignatureError, + }, + errors::{required, InvalidLength, MissingField}, + hash::hash_v2::Hash, + }; + + impl From + for protos::union::ibc::lightclients::movement::v1::LedgerInfoWithSignatures + { + fn from(value: LedgerInfoWithSignatures) -> Self { + let LedgerInfoWithSignatures::V0(value) = value; + Self { + ledger_info: Some(value.ledger_info.into()), + signatures: Some(value.signatures.into()), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromLedgerInfoWithSignatures { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid ledger info")] - LedgerInfo(#[from] TryFromLedgerInfo), - #[error("invalid signatures")] - Signatures(#[from] TryFromAggregateSignatureError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromLedgerInfoWithSignatures { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid ledger info")] + LedgerInfo(#[from] TryFromLedgerInfo), + #[error("invalid signatures")] + Signatures(#[from] TryFromAggregateSignatureError), + } -impl TryFrom - for LedgerInfoWithSignatures -{ - type Error = TryFromLedgerInfoWithSignatures; + impl TryFrom + for LedgerInfoWithSignatures + { + type Error = TryFromLedgerInfoWithSignatures; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::LedgerInfoWithSignatures, - ) -> Result { - Ok(Self::V0(LedgerInfoWithV0 { - ledger_info: required!(value.ledger_info)?.try_into()?, - signatures: required!(value.signatures)?.try_into()?, - })) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::LedgerInfoWithSignatures, + ) -> Result { + Ok(Self::V0(LedgerInfoWithV0 { + ledger_info: required!(value.ledger_info)?.try_into()?, + signatures: required!(value.signatures)?.try_into()?, + })) + } } -} -impl From for protos::union::ibc::lightclients::movement::v1::LedgerInfo { - fn from(value: LedgerInfo) -> Self { - Self { - commit_info: Some(value.commit_info.into()), - consensus_data_hash: value.consensus_data_hash.into_bytes(), + impl From for protos::union::ibc::lightclients::movement::v1::LedgerInfo { + fn from(value: LedgerInfo) -> Self { + Self { + commit_info: Some(value.commit_info.into()), + consensus_data_hash: value.consensus_data_hash.into_bytes(), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromLedgerInfo { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid commit info")] - CommitInfo(#[from] TryFromBlockInfoError), - #[error("invalid consensus data hash")] - ConsensusDataHash(#[source] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromLedgerInfo { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid commit info")] + CommitInfo(#[from] TryFromBlockInfoError), + #[error("invalid consensus data hash")] + ConsensusDataHash(#[source] InvalidLength), + } -impl TryFrom for LedgerInfo { - type Error = TryFromLedgerInfo; + impl TryFrom for LedgerInfo { + type Error = TryFromLedgerInfo; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::LedgerInfo, - ) -> Result { - Ok(Self { - commit_info: required!(value.commit_info)?.try_into()?, - consensus_data_hash: Hash::try_from(value.consensus_data_hash) - .map_err(TryFromLedgerInfo::ConsensusDataHash)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::LedgerInfo, + ) -> Result { + Ok(Self { + commit_info: required!(value.commit_info)?.try_into()?, + consensus_data_hash: Hash::try_from(value.consensus_data_hash) + .map_err(TryFromLedgerInfo::ConsensusDataHash)?, + }) + } } } diff --git a/lib/unionlabs/src/aptos/public_key.rs b/lib/unionlabs/src/aptos/public_key.rs index 6dde03455a..471829b192 100644 --- a/lib/unionlabs/src/aptos/public_key.rs +++ b/lib/unionlabs/src/aptos/public_key.rs @@ -1,5 +1,6 @@ use macros::model; +// TODO: Move this to the movement light client module /// A BLS12381 public key #[model( no_serde, @@ -13,64 +14,76 @@ pub struct PublicKey { pub pubkey: Vec, } -impl From for protos::union::ibc::lightclients::movement::v1::PublicKey { - fn from(value: PublicKey) -> Self { - Self { - pubkey: value.pubkey, +#[cfg(feature = "proto")] +pub mod proto { + use crate::aptos::public_key::PublicKey; + + impl From for protos::union::ibc::lightclients::movement::v1::PublicKey { + fn from(value: PublicKey) -> Self { + Self { + pubkey: value.pubkey, + } } } -} -impl From for PublicKey { - fn from(value: protos::union::ibc::lightclients::movement::v1::PublicKey) -> Self { - Self { - pubkey: value.pubkey, + impl From for PublicKey { + fn from(value: protos::union::ibc::lightclients::movement::v1::PublicKey) -> Self { + Self { + pubkey: value.pubkey, + } } } } -impl serde::Serialize for PublicKey { - fn serialize(&self, serializer: S) -> core::result::Result - where - S: ::serde::Serializer, - { - if serializer.is_human_readable() { - let s = format!("0x{}", hex::encode(&self.pubkey)); - serializer.serialize_str(&s[..]) - } else { - // See comment in deserialize_key. - serializer.serialize_newtype_struct( - "PublicKey", - serde_bytes::Bytes::new(self.pubkey.as_slice()), - ) +#[cfg(feature = "serde")] +pub mod serde { + use serde::{Deserialize, Serialize}; + + use crate::aptos::public_key::PublicKey; + + impl Serialize for PublicKey { + fn serialize(&self, serializer: S) -> core::result::Result + where + S: ::serde::Serializer, + { + if serializer.is_human_readable() { + let s = format!("0x{}", hex::encode(&self.pubkey)); + serializer.serialize_str(&s[..]) + } else { + // See comment in deserialize_key. + serializer.serialize_newtype_struct( + "PublicKey", + serde_bytes::Bytes::new(self.pubkey.as_slice()), + ) + } } } -} -impl<'de> serde::Deserialize<'de> for PublicKey { - fn deserialize(deserializer: D) -> core::result::Result - where - D: ::serde::Deserializer<'de>, - { - if deserializer.is_human_readable() { - let encoded_key = ::deserialize(deserializer)?; - let encoded_key = encoded_key.trim_start_matches("0x"); - Ok(PublicKey { - pubkey: hex::decode(encoded_key) - .map_err(::custom)?, - }) - } else { - // In order to preserve the Serde data model and help analysis tools, - // make sure to wrap our value in a container with the same name - // as the original type. - #[derive(::serde::Deserialize, Debug)] - #[serde(rename = "PublicKey")] - struct Value<'a>(&'a [u8]); + impl<'de> Deserialize<'de> for PublicKey { + fn deserialize(deserializer: D) -> core::result::Result + where + D: ::serde::Deserializer<'de>, + { + if deserializer.is_human_readable() { + let encoded_key = ::deserialize(deserializer)?; + let encoded_key = encoded_key.trim_start_matches("0x"); + Ok(PublicKey { + pubkey: hex::decode(encoded_key) + .map_err(::custom)?, + }) + } else { + // In order to preserve the Serde data model and help analysis tools, + // make sure to wrap our value in a container with the same name + // as the original type. + #[derive(::serde::Deserialize, Debug)] + #[serde(rename = "PublicKey")] + struct Value<'a>(&'a [u8]); - let value = Value::deserialize(deserializer)?; - Ok(PublicKey { - pubkey: value.0.to_vec(), - }) + let value = Value::deserialize(deserializer)?; + Ok(PublicKey { + pubkey: value.0.to_vec(), + }) + } } } } diff --git a/lib/unionlabs/src/aptos/signature.rs b/lib/unionlabs/src/aptos/signature.rs index c1a403b27b..dac6006966 100644 --- a/lib/unionlabs/src/aptos/signature.rs +++ b/lib/unionlabs/src/aptos/signature.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::{bls::BlsSignature, errors::InvalidLength}; +use crate::hash::H384; #[model(proto( raw(protos::union::ibc::lightclients::movement::v1::AggregateSignature), @@ -9,7 +9,7 @@ use crate::{bls::BlsSignature, errors::InvalidLength}; ))] pub struct AggregateSignature { pub validator_bitmask: ValidatorBitmask, - pub sig: Option, + pub sig: Option, } #[model] @@ -17,40 +17,48 @@ pub struct ValidatorBitmask { pub inner: Vec, } -impl From - for protos::union::ibc::lightclients::movement::v1::AggregateSignature -{ - fn from(value: AggregateSignature) -> Self { - Self { - validator_bitmask: value.validator_bitmask.inner, - sig: value.sig.map(Into::into).unwrap_or_default(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::signature::{AggregateSignature, ValidatorBitmask}, + errors::InvalidLength, + }; + + impl From + for protos::union::ibc::lightclients::movement::v1::AggregateSignature + { + fn from(value: AggregateSignature) -> Self { + Self { + validator_bitmask: value.validator_bitmask.inner, + sig: value.sig.map(Into::into).unwrap_or_default(), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromAggregateSignatureError { - #[error("invalid sig")] - Sig(#[from] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromAggregateSignatureError { + #[error("invalid sig")] + Sig(#[from] InvalidLength), + } + + impl TryFrom + for AggregateSignature + { + type Error = TryFromAggregateSignatureError; -impl TryFrom - for AggregateSignature -{ - type Error = TryFromAggregateSignatureError; - - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::AggregateSignature, - ) -> Result { - Ok(Self { - validator_bitmask: ValidatorBitmask { - inner: value.validator_bitmask, - }, - sig: if value.sig.is_empty() { - None - } else { - Some(value.sig.try_into()?) - }, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::AggregateSignature, + ) -> Result { + Ok(Self { + validator_bitmask: ValidatorBitmask { + inner: value.validator_bitmask, + }, + sig: if value.sig.is_empty() { + None + } else { + Some(value.sig.try_into()?) + }, + }) + } } } diff --git a/lib/unionlabs/src/aptos/sparse_merkle_proof.rs b/lib/unionlabs/src/aptos/sparse_merkle_proof.rs index 0c8446d1f3..a24d796aea 100644 --- a/lib/unionlabs/src/aptos/sparse_merkle_proof.rs +++ b/lib/unionlabs/src/aptos/sparse_merkle_proof.rs @@ -1,11 +1,8 @@ use macros::model; -use serde::{Deserialize, Serialize}; -use crate::{ - errors::InvalidLength, - hash::{hash_v2::HexUnprefixed, H256}, -}; +use crate::hash::{hash_v2::HexUnprefixed, H256}; +// TODO: Move this to the movement light client module /// A proof that can be used to authenticate an element in a Sparse Merkle Tree given trusted root /// hash. For example, `TransactionInfoToAccountProof` can be constructed on top of this structure. #[model(proto( @@ -30,63 +27,72 @@ pub struct SparseMerkleProof { pub siblings: Vec>, } -#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct SparseMerkleLeafNode { pub key: H256, pub value_hash: H256, } -impl From for protos::union::ibc::lightclients::movement::v1::SparseMerkleProof { - fn from(value: SparseMerkleProof) -> Self { - Self { - leaf: value.leaf.map(|leaf| { - protos::union::ibc::lightclients::movement::v1::SparseMerkleLeafNode { - key: leaf.key.into(), - value_hash: leaf.value_hash.into(), - } - }), - siblings: value.siblings.into_iter().map(Into::into).collect(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::sparse_merkle_proof::{SparseMerkleLeafNode, SparseMerkleProof}, + errors::InvalidLength, + }; + + impl From for protos::union::ibc::lightclients::movement::v1::SparseMerkleProof { + fn from(value: SparseMerkleProof) -> Self { + Self { + leaf: value.leaf.map(|leaf| { + protos::union::ibc::lightclients::movement::v1::SparseMerkleLeafNode { + key: leaf.key.into(), + value_hash: leaf.value_hash.into(), + } + }), + siblings: value.siblings.into_iter().map(Into::into).collect(), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromSparseMerkleProofError { - #[error("invalid siblings")] - Siblings(#[source] InvalidLength), - #[error("invalid leaf key")] - LeafKey(#[source] InvalidLength), - #[error("invalid leaf value hash")] - LeafValueHash(#[source] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromSparseMerkleProofError { + #[error("invalid siblings")] + Siblings(#[source] InvalidLength), + #[error("invalid leaf key")] + LeafKey(#[source] InvalidLength), + #[error("invalid leaf value hash")] + LeafValueHash(#[source] InvalidLength), + } -impl TryFrom - for SparseMerkleProof -{ - type Error = TryFromSparseMerkleProofError; + impl TryFrom + for SparseMerkleProof + { + type Error = TryFromSparseMerkleProofError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::SparseMerkleProof, - ) -> Result { - Ok(Self { - leaf: value.leaf.map(|leaf| SparseMerkleLeafNode { - key: leaf - .key - .try_into() - .map_err(TryFromSparseMerkleProofError::LeafKey) - .unwrap(), - value_hash: leaf - .value_hash - .try_into() - .map_err(TryFromSparseMerkleProofError::LeafValueHash) - .unwrap(), - }), - siblings: value - .siblings - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromSparseMerkleProofError::Siblings)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::SparseMerkleProof, + ) -> Result { + Ok(Self { + leaf: value.leaf.map(|leaf| SparseMerkleLeafNode { + key: leaf + .key + .try_into() + .map_err(TryFromSparseMerkleProofError::LeafKey) + .unwrap(), + value_hash: leaf + .value_hash + .try_into() + .map_err(TryFromSparseMerkleProofError::LeafValueHash) + .unwrap(), + }), + siblings: value + .siblings + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromSparseMerkleProofError::Siblings)?, + }) + } } } diff --git a/lib/unionlabs/src/aptos/state_proof.rs b/lib/unionlabs/src/aptos/state_proof.rs index 62c393389a..96381fe3af 100644 --- a/lib/unionlabs/src/aptos/state_proof.rs +++ b/lib/unionlabs/src/aptos/state_proof.rs @@ -1,18 +1,15 @@ // Copyright © Aptos Foundation // Parts of the project are originally copyright © Meta Platforms, Inc. // SPDX-License-Identifier: Apache-2.0 - use macros::model; -use sha2::Digest; -use super::{ - block_info::BlockInfo, - epoch_change::{EpochChangeProof, TryFromEpochChangeProof}, - ledger_info::{LedgerInfo, LedgerInfoWithSignatures, TryFromLedgerInfoWithSignatures}, - signature::AggregateSignature, -}; use crate::{ - errors::{required, MissingField}, + aptos::{ + block_info::BlockInfo, + epoch_change::EpochChangeProof, + ledger_info::{LedgerInfo, LedgerInfoWithSignatures}, + signature::AggregateSignature, + }, hash::hash_v2::Hash, }; @@ -64,20 +61,12 @@ impl Default for StateProof { } impl StateProof { - #[must_use] - pub fn new( - latest_li_w_sigs: LedgerInfoWithSignatures, - epoch_changes: EpochChangeProof, - ) -> Self { - Self { - latest_li_w_sigs, - epoch_changes, - } - } - + #[cfg(feature = "bcs")] #[must_use] #[allow(clippy::missing_panics_doc)] // panics are impossible pub fn hash(&self) -> [u8; 32] { + use sha2::Digest; + let mut hasher = sha2::Sha256::new(); bcs::serialize_into(&mut hasher, self).expect("unexpected serialization error"); hasher.finalize().into() @@ -90,34 +79,45 @@ impl StateProof { } } -impl From for protos::union::ibc::lightclients::movement::v1::StateProof { - fn from(value: StateProof) -> Self { - Self { - latest_li_w_sigs: Some(value.latest_li_w_sigs.into()), - epoch_changes: Some(value.epoch_changes.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::{ + epoch_change::proto::TryFromEpochChangeProof, + ledger_info::proto::TryFromLedgerInfoWithSignatures, state_proof::StateProof, + }, + errors::{required, MissingField}, + }; + + impl From for protos::union::ibc::lightclients::movement::v1::StateProof { + fn from(value: StateProof) -> Self { + Self { + latest_li_w_sigs: Some(value.latest_li_w_sigs.into()), + epoch_changes: Some(value.epoch_changes.into()), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromStateProofError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid latest ledger info with sigs")] - LatestLiWSigs(#[from] TryFromLedgerInfoWithSignatures), - #[error("invalid epoch changes")] - EpochChanges(#[from] TryFromEpochChangeProof), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromStateProofError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid latest ledger info with sigs")] + LatestLiWSigs(#[from] TryFromLedgerInfoWithSignatures), + #[error("invalid epoch changes")] + EpochChanges(#[from] TryFromEpochChangeProof), + } -impl TryFrom for StateProof { - type Error = TryFromStateProofError; + impl TryFrom for StateProof { + type Error = TryFromStateProofError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::StateProof, - ) -> Result { - Ok(Self { - latest_li_w_sigs: required!(value.latest_li_w_sigs)?.try_into()?, - epoch_changes: required!(value.epoch_changes)?.try_into()?, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::StateProof, + ) -> Result { + Ok(Self { + latest_li_w_sigs: required!(value.latest_li_w_sigs)?.try_into()?, + epoch_changes: required!(value.epoch_changes)?.try_into()?, + }) + } } } diff --git a/lib/unionlabs/src/aptos/storage_proof.rs b/lib/unionlabs/src/aptos/storage_proof.rs index 4da16ccf33..70f9846fb2 100644 --- a/lib/unionlabs/src/aptos/storage_proof.rs +++ b/lib/unionlabs/src/aptos/storage_proof.rs @@ -1,8 +1,6 @@ use macros::model; -use protos::union::ibc::lightclients::movement; -use super::sparse_merkle_proof::{SparseMerkleProof, TryFromSparseMerkleProofError}; -use crate::errors::{required, MissingField}; +use crate::aptos::sparse_merkle_proof::SparseMerkleProof; #[model(proto( raw(protos::union::ibc::lightclients::movement::v1::StorageProof), @@ -14,7 +12,8 @@ pub struct StorageProof { pub proof: SparseMerkleProof, } -#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, Eq, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum StateValue { V0(Vec), WithMetadata { @@ -32,7 +31,8 @@ impl StateValue { } } -#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize)] +#[derive(Debug, Clone, Eq, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum StateValueMetadata { V0 { deposit: u64, @@ -45,118 +45,147 @@ pub enum StateValueMetadata { }, } -impl From for movement::v1::StorageProof { - fn from(value: StorageProof) -> Self { - Self { - proof: Some(value.proof.into()), - state_value: value.state_value.map(Into::into), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::{ + sparse_merkle_proof::proto::TryFromSparseMerkleProofError, + storage_proof::{StateValue, StateValueMetadata, StorageProof}, + }, + errors::{required, MissingField}, + }; + + impl From for protos::union::ibc::lightclients::movement::v1::StorageProof { + fn from(value: StorageProof) -> Self { + Self { + proof: Some(value.proof.into()), + state_value: value.state_value.map(Into::into), + } } } -} -impl From for movement::v1::storage_proof::StateValue { - fn from(value: StateValue) -> Self { - match value { - StateValue::V0(data) => Self::V0(data), - StateValue::WithMetadata { data, metadata } => { - Self::WithMetadata(movement::v1::StateValueWithMetadata { - data, - metadata: Some(metadata.into()), - }) + impl From + for protos::union::ibc::lightclients::movement::v1::storage_proof::StateValue + { + fn from(value: StateValue) -> Self { + match value { + StateValue::V0(data) => Self::V0(data), + StateValue::WithMetadata { data, metadata } => Self::WithMetadata( + protos::union::ibc::lightclients::movement::v1::StateValueWithMetadata { + data, + metadata: Some(metadata.into()), + }, + ), } } } -} -impl From for movement::v1::state_value_with_metadata::Metadata { - fn from(value: StateValueMetadata) -> Self { - match value { - StateValueMetadata::V0 { - deposit, - creation_time_usecs, - } => Self::V0(movement::v1::StateValueMetadataV0 { - deposit, - creation_time_usecs, - }), - StateValueMetadata::V1 { - slot_deposit, - bytes_deposit, - creation_time_usecs, - } => Self::V1(movement::v1::StateValueMetadataV1 { - slot_deposit, - bytes_deposit, - creation_time_usecs, - }), + impl From + for protos::union::ibc::lightclients::movement::v1::state_value_with_metadata::Metadata + { + fn from(value: StateValueMetadata) -> Self { + match value { + StateValueMetadata::V0 { + deposit, + creation_time_usecs, + } => Self::V0( + protos::union::ibc::lightclients::movement::v1::StateValueMetadataV0 { + deposit, + creation_time_usecs, + }, + ), + StateValueMetadata::V1 { + slot_deposit, + bytes_deposit, + creation_time_usecs, + } => Self::V1( + protos::union::ibc::lightclients::movement::v1::StateValueMetadataV1 { + slot_deposit, + bytes_deposit, + creation_time_usecs, + }, + ), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromStorageProofError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid state value")] - StateValue(#[from] TryFromStateValueError), - #[error("invalid proof")] - Proof(#[from] TryFromSparseMerkleProofError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromStorageProofError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid state value")] + StateValue(#[from] TryFromStateValueError), + #[error("invalid proof")] + Proof(#[from] TryFromSparseMerkleProofError), + } -impl TryFrom for StorageProof { - type Error = TryFromStorageProofError; + impl TryFrom for StorageProof { + type Error = TryFromStorageProofError; - fn try_from(value: movement::v1::StorageProof) -> Result { - Ok(Self { - state_value: value.state_value.map(TryInto::try_into).transpose()?, - proof: required!(value.proof)?.try_into()?, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::StorageProof, + ) -> Result { + Ok(Self { + state_value: value.state_value.map(TryInto::try_into).transpose()?, + proof: required!(value.proof)?.try_into()?, + }) + } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromStateValueError { - #[error(transparent)] - MissingField(#[from] MissingField), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromStateValueError { + #[error(transparent)] + MissingField(#[from] MissingField), + } -impl TryFrom for StateValue { - type Error = TryFromStateValueError; - - fn try_from(value: movement::v1::storage_proof::StateValue) -> Result { - Ok(match value { - movement::v1::storage_proof::StateValue::V0(data) => Self::V0(data), - movement::v1::storage_proof::StateValue::WithMetadata( - movement::v1::StateValueWithMetadata { data, metadata }, - ) => Self::WithMetadata { - data, - metadata: required!(metadata)?.into(), - }, - }) + impl TryFrom + for StateValue + { + type Error = TryFromStateValueError; + + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::storage_proof::StateValue, + ) -> Result { + Ok(match value { + protos::union::ibc::lightclients::movement::v1::storage_proof::StateValue::V0(data) => Self::V0(data), + protos::union::ibc::lightclients::movement::v1::storage_proof::StateValue::WithMetadata( + protos::union::ibc::lightclients::movement::v1::StateValueWithMetadata { data, metadata }, + ) => Self::WithMetadata { + data, + metadata: required!(metadata)?.into(), + }, + }) + } } -} -impl From for StateValueMetadata { - fn from(value: movement::v1::state_value_with_metadata::Metadata) -> Self { - match value { - movement::v1::state_value_with_metadata::Metadata::V0( - movement::v1::StateValueMetadataV0 { + impl From + for StateValueMetadata + { + fn from( + value: protos::union::ibc::lightclients::movement::v1::state_value_with_metadata::Metadata, + ) -> Self { + match value { + protos::union::ibc::lightclients::movement::v1::state_value_with_metadata::Metadata::V0( + protos::union::ibc::lightclients::movement::v1::StateValueMetadataV0 { + deposit, + creation_time_usecs, + }, + ) => StateValueMetadata::V0 { deposit, creation_time_usecs, }, - ) => StateValueMetadata::V0 { - deposit, - creation_time_usecs, - }, - movement::v1::state_value_with_metadata::Metadata::V1( - movement::v1::StateValueMetadataV1 { + protos::union::ibc::lightclients::movement::v1::state_value_with_metadata::Metadata::V1( + protos::union::ibc::lightclients::movement::v1::StateValueMetadataV1 { + slot_deposit, + bytes_deposit, + creation_time_usecs, + }, + ) => StateValueMetadata::V1 { slot_deposit, bytes_deposit, creation_time_usecs, }, - ) => StateValueMetadata::V1 { - slot_deposit, - bytes_deposit, - creation_time_usecs, - }, + } } } } diff --git a/lib/unionlabs/src/aptos/transaction_info.rs b/lib/unionlabs/src/aptos/transaction_info.rs index e325dfd346..c7332d7b2a 100644 --- a/lib/unionlabs/src/aptos/transaction_info.rs +++ b/lib/unionlabs/src/aptos/transaction_info.rs @@ -1,10 +1,6 @@ use macros::model; -use serde::{Deserialize, Serialize}; -use crate::{ - errors::InvalidLength, - hash::{hash_v2::HexUnprefixed, H256}, -}; +use crate::hash::{hash_v2::HexUnprefixed, H256}; /// `TransactionInfo` is the object we store in the transaction accumulator. It consists of the /// transaction as well as the execution result of this transaction. @@ -16,7 +12,7 @@ use crate::{ ), no_serde )] -#[derive(Serialize, Deserialize)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum TransactionInfo { V0(TransactionInfoV0), } @@ -50,101 +46,96 @@ pub struct TransactionInfoV0 { pub state_cemetery_hash: Option>, } -// impl TransactionInfoV0 { -// pub fn hash(&self) -> H256 { -// let mut state = Sha3_256::new(); -// state.update( -// Sha3_256::new() -// .chain_update("APTOS::TransactionInfoV0") -// .finalize(), -// ); -// bcs::serialize_into(&mut state, &self).expect("expected to be able to serialize"); -// H256(state.finalize().into()) -// } -// } - #[model(no_serde)] -#[derive(Serialize, Deserialize)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum ExecutionStatus { - #[serde(rename = "Success")] + #[cfg_attr(feature = "serde", serde(rename = "Success"))] Success, } -impl From for protos::union::ibc::lightclients::movement::v1::TransactionInfo { - fn from(value: TransactionInfo) -> Self { - let TransactionInfo::V0(value) = value; - Self { - gas_used: value.gas_used, - transaction_hash: value.transaction_hash.into(), - event_root_hash: value.event_root_hash.into(), - state_change_hash: value.state_change_hash.into(), - state_checkpoint_hash: match value.state_checkpoint_hash { - Some(val) => val.into(), - None => Vec::default(), - }, - state_cemetery_hash: match value.state_cemetery_hash { - Some(val) => val.into(), - None => Vec::default(), - }, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::transaction_info::{ExecutionStatus, TransactionInfo, TransactionInfoV0}, + errors::InvalidLength, + }; + + impl From for protos::union::ibc::lightclients::movement::v1::TransactionInfo { + fn from(value: TransactionInfo) -> Self { + let TransactionInfo::V0(value) = value; + Self { + gas_used: value.gas_used, + transaction_hash: value.transaction_hash.into(), + event_root_hash: value.event_root_hash.into(), + state_change_hash: value.state_change_hash.into(), + state_checkpoint_hash: match value.state_checkpoint_hash { + Some(val) => val.into(), + None => Vec::default(), + }, + state_cemetery_hash: match value.state_cemetery_hash { + Some(val) => val.into(), + None => Vec::default(), + }, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromTransactionInfoError { - #[error("invalid transaction hash")] - TransactionHash(#[source] InvalidLength), - #[error("invalid event root hash")] - EventRootHash(#[source] InvalidLength), - #[error("invalid state change hash")] - StateChangeHash(#[source] InvalidLength), - #[error("invalid state checkpoint hash")] - StateCheckpointHash(#[source] InvalidLength), - #[error("invalid state cemetery hash")] - StateCemeteryHash(#[source] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromTransactionInfoError { + #[error("invalid transaction hash")] + TransactionHash(#[source] InvalidLength), + #[error("invalid event root hash")] + EventRootHash(#[source] InvalidLength), + #[error("invalid state change hash")] + StateChangeHash(#[source] InvalidLength), + #[error("invalid state checkpoint hash")] + StateCheckpointHash(#[source] InvalidLength), + #[error("invalid state cemetery hash")] + StateCemeteryHash(#[source] InvalidLength), + } -impl TryFrom for TransactionInfo { - type Error = TryFromTransactionInfoError; + impl TryFrom for TransactionInfo { + type Error = TryFromTransactionInfoError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::TransactionInfo, - ) -> Result { - Ok(Self::V0(TransactionInfoV0 { - gas_used: value.gas_used, - status: ExecutionStatus::Success, - transaction_hash: value - .transaction_hash - .try_into() - .map_err(TryFromTransactionInfoError::TransactionHash)?, - event_root_hash: value - .event_root_hash - .try_into() - .map_err(TryFromTransactionInfoError::EventRootHash)?, - state_change_hash: value - .state_change_hash - .try_into() - .map_err(TryFromTransactionInfoError::StateChangeHash)?, - state_checkpoint_hash: if value.state_checkpoint_hash.is_empty() { - None - } else { - Some( - value - .state_checkpoint_hash - .try_into() - .map_err(TryFromTransactionInfoError::StateCheckpointHash)?, - ) - }, - state_cemetery_hash: if value.state_cemetery_hash.is_empty() { - None - } else { - Some( - value - .state_cemetery_hash - .try_into() - .map_err(TryFromTransactionInfoError::StateCemeteryHash)?, - ) - }, - })) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::TransactionInfo, + ) -> Result { + Ok(Self::V0(TransactionInfoV0 { + gas_used: value.gas_used, + status: ExecutionStatus::Success, + transaction_hash: value + .transaction_hash + .try_into() + .map_err(TryFromTransactionInfoError::TransactionHash)?, + event_root_hash: value + .event_root_hash + .try_into() + .map_err(TryFromTransactionInfoError::EventRootHash)?, + state_change_hash: value + .state_change_hash + .try_into() + .map_err(TryFromTransactionInfoError::StateChangeHash)?, + state_checkpoint_hash: if value.state_checkpoint_hash.is_empty() { + None + } else { + Some( + value + .state_checkpoint_hash + .try_into() + .map_err(TryFromTransactionInfoError::StateCheckpointHash)?, + ) + }, + state_cemetery_hash: if value.state_cemetery_hash.is_empty() { + None + } else { + Some( + value + .state_cemetery_hash + .try_into() + .map_err(TryFromTransactionInfoError::StateCemeteryHash)?, + ) + }, + })) + } } } diff --git a/lib/unionlabs/src/aptos/transaction_proof.rs b/lib/unionlabs/src/aptos/transaction_proof.rs index 2705533886..ecf4da75ad 100644 --- a/lib/unionlabs/src/aptos/transaction_proof.rs +++ b/lib/unionlabs/src/aptos/transaction_proof.rs @@ -1,8 +1,7 @@ use macros::model; use crate::{ - aptos::transaction_info::{TransactionInfo, TryFromTransactionInfoError}, - errors::{required, InvalidLength, MissingField}, + aptos::transaction_info::TransactionInfo, hash::{ hash_v2::{Hash, HexUnprefixed}, H256, @@ -55,50 +54,61 @@ pub struct TransactionAccumulatorProof { #[model] pub struct Null; -impl From - for protos::union::ibc::lightclients::movement::v1::TransactionInfoWithProof -{ - fn from(value: TransactionInfoWithProof) -> Self { - Self { - ledger_info_to_transaction_info_proof: value - .ledger_info_to_transaction_info_proof - .siblings - .into_iter() - .map(Into::into) - .collect(), - transaction_info: Some(value.transaction_info.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::{ + transaction_info::proto::TryFromTransactionInfoError, + transaction_proof::{Null, TransactionAccumulatorProof, TransactionInfoWithProof}, + }, + errors::{required, InvalidLength, MissingField}, + }; + + impl From + for protos::union::ibc::lightclients::movement::v1::TransactionInfoWithProof + { + fn from(value: TransactionInfoWithProof) -> Self { + Self { + ledger_info_to_transaction_info_proof: value + .ledger_info_to_transaction_info_proof + .siblings + .into_iter() + .map(Into::into) + .collect(), + transaction_info: Some(value.transaction_info.into()), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromTransactionInfoWithProofError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid transaction proof sibling")] - InvalidTxProofSibling(#[from] InvalidLength), - #[error("invalid transaction info")] - InvalidTxInfo(#[from] TryFromTransactionInfoError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromTransactionInfoWithProofError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid transaction proof sibling")] + InvalidTxProofSibling(#[from] InvalidLength), + #[error("invalid transaction info")] + InvalidTxInfo(#[from] TryFromTransactionInfoError), + } -impl TryFrom - for TransactionInfoWithProof -{ - type Error = TryFromTransactionInfoWithProofError; + impl TryFrom + for TransactionInfoWithProof + { + type Error = TryFromTransactionInfoWithProofError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::TransactionInfoWithProof, - ) -> Result { - Ok(Self { - ledger_info_to_transaction_info_proof: TransactionAccumulatorProof { - siblings: value - .ledger_info_to_transaction_info_proof - .into_iter() - .map(TryInto::try_into) - .collect::, _>>()?, - phantom: Null, - }, - transaction_info: required!(value.transaction_info)?.try_into()?, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::TransactionInfoWithProof, + ) -> Result { + Ok(Self { + ledger_info_to_transaction_info_proof: TransactionAccumulatorProof { + siblings: value + .ledger_info_to_transaction_info_proof + .into_iter() + .map(TryInto::try_into) + .collect::, _>>()?, + phantom: Null, + }, + transaction_info: required!(value.transaction_info)?.try_into()?, + }) + } } } diff --git a/lib/unionlabs/src/aptos/validator_verifier.rs b/lib/unionlabs/src/aptos/validator_verifier.rs index e66b692960..c4582c237a 100644 --- a/lib/unionlabs/src/aptos/validator_verifier.rs +++ b/lib/unionlabs/src/aptos/validator_verifier.rs @@ -1,10 +1,7 @@ use macros::model; use super::public_key::PublicKey; -use crate::{ - aptos::account::AccountAddress, - errors::{required, InvalidLength, MissingField}, -}; +use crate::aptos::account::AccountAddress; /// Supports validation of signatures for known authors with individual voting powers. This struct /// can be used for all signature verification operations including block and network signature @@ -31,76 +28,87 @@ pub struct ValidatorConsensusInfo { pub voting_power: u64, } -impl From for protos::union::ibc::lightclients::movement::v1::ValidatorVerifier { - fn from(value: ValidatorVerifier) -> Self { - Self { - validator_infos: value.validator_infos.into_iter().map(Into::into).collect(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::{ + account::AccountAddress, + validator_verifier::{ValidatorConsensusInfo, ValidatorVerifier}, + }, + errors::{required, InvalidLength, MissingField}, + }; + + impl From for protos::union::ibc::lightclients::movement::v1::ValidatorVerifier { + fn from(value: ValidatorVerifier) -> Self { + Self { + validator_infos: value.validator_infos.into_iter().map(Into::into).collect(), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromValidatorVerifierError { - #[error("invalid validator infos: {0}")] - ValidatorInfos(#[from] TryFromValidatorConsensusInfoError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromValidatorVerifierError { + #[error("invalid validator infos: {0}")] + ValidatorInfos(#[from] TryFromValidatorConsensusInfoError), + } -impl TryFrom - for ValidatorVerifier -{ - type Error = TryFromValidatorVerifierError; + impl TryFrom + for ValidatorVerifier + { + type Error = TryFromValidatorVerifierError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::ValidatorVerifier, - ) -> Result { - Ok(Self { - validator_infos: value - .validator_infos - .into_iter() - .map(TryInto::try_into) - .collect::, _>>()?, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::ValidatorVerifier, + ) -> Result { + Ok(Self { + validator_infos: value + .validator_infos + .into_iter() + .map(TryInto::try_into) + .collect::, _>>()?, + }) + } } -} -impl From - for protos::union::ibc::lightclients::movement::v1::ValidatorConsensusInfo -{ - fn from(value: ValidatorConsensusInfo) -> Self { - Self { - address: value.address.0.into_bytes(), - public_key: Some(value.public_key.into()), - voting_power: value.voting_power, + impl From + for protos::union::ibc::lightclients::movement::v1::ValidatorConsensusInfo + { + fn from(value: ValidatorConsensusInfo) -> Self { + Self { + address: value.address.0.into_bytes(), + public_key: Some(value.public_key.into()), + voting_power: value.voting_power, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromValidatorConsensusInfoError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid address")] - Address(#[source] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromValidatorConsensusInfoError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid address")] + Address(#[source] InvalidLength), + } -impl TryFrom - for ValidatorConsensusInfo -{ - type Error = TryFromValidatorConsensusInfoError; + impl TryFrom + for ValidatorConsensusInfo + { + type Error = TryFromValidatorConsensusInfoError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::ValidatorConsensusInfo, - ) -> Result { - Ok(Self { - address: AccountAddress( - value - .address - .as_slice() - .try_into() - .map_err(TryFromValidatorConsensusInfoError::Address)?, - ), - public_key: required!(value.public_key)?.into(), - voting_power: value.voting_power, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::ValidatorConsensusInfo, + ) -> Result { + Ok(Self { + address: AccountAddress( + value + .address + .as_slice() + .try_into() + .map_err(TryFromValidatorConsensusInfoError::Address)?, + ), + public_key: required!(value.public_key)?.into(), + voting_power: value.voting_power, + }) + } } } diff --git a/lib/unionlabs/src/bls.rs b/lib/unionlabs/src/bls.rs deleted file mode 100644 index 2c33d3dd5e..0000000000 --- a/lib/unionlabs/src/bls.rs +++ /dev/null @@ -1,82 +0,0 @@ -use milagro_bls::{AmclError, G2_BYTES}; - -use crate::macros::hex_string_array_wrapper; - -const BLS_PUBLIC_KEY_BYTES_LEN: usize = 48; -const BLS_SIGNATURE_BYTES_LEN: usize = G2_BYTES; - -#[derive(Clone)] -pub struct BlsSecretKey(milagro_bls::SecretKey); - -impl TryFrom> for BlsSecretKey { - type Error = AmclError; - - fn try_from(data: Vec) -> Result { - milagro_bls::SecretKey::from_bytes(&data).map(Self) - } -} - -hex_string_array_wrapper! { - pub struct BlsPublicKey(pub [u8; BLS_PUBLIC_KEY_BYTES_LEN]); - - /// NOTE: This is not validated! - pub struct BlsSignature(pub [u8; BLS_SIGNATURE_BYTES_LEN]); -} - -impl BlsSecretKey { - #[must_use] - pub fn public_key(&self) -> BlsPublicKey { - BlsPublicKey::from(self.clone()) - } - - #[must_use] - pub fn sign(&self, msg: &[u8]) -> BlsSignature { - milagro_bls::Signature::new(msg, &self.0).into() - } -} - -impl From for BlsPublicKey { - fn from(agg_pk: milagro_bls::AggregatePublicKey) -> Self { - Self( - milagro_bls::PublicKey { - point: agg_pk.point, - } - .as_bytes(), - ) - } -} - -impl From for BlsPublicKey { - fn from(key: BlsSecretKey) -> Self { - Self(milagro_bls::PublicKey::from_secret_key(&key.0).as_bytes()) - } -} - -impl TryFrom<&BlsPublicKey> for milagro_bls::PublicKey { - type Error = AmclError; - - fn try_from(public_key: &BlsPublicKey) -> Result { - Self::from_bytes(&public_key.0) - } -} - -impl BlsSignature { - #[must_use] - pub fn into_bytes(self) -> [u8; BLS_SIGNATURE_BYTES_LEN] { - self.into() - } -} - -impl TryFrom<&BlsSignature> for milagro_bls::Signature { - type Error = AmclError; - - fn try_from(signature: &BlsSignature) -> Result { - Self::from_bytes(signature.0.as_ref()) - } -} - -impl From for BlsSignature { - fn from(signature: milagro_bls::Signature) -> Self { - signature.as_bytes().into() - } -} diff --git a/lib/unionlabs/src/bounded.rs b/lib/unionlabs/src/bounded.rs index 21540761af..79d2040e13 100644 --- a/lib/unionlabs/src/bounded.rs +++ b/lib/unionlabs/src/bounded.rs @@ -25,6 +25,7 @@ macro_rules! bounded_int { } } + #[cfg(feature = "serde")] impl serde::Serialize for $Struct { fn serialize(&self, serializer: S) -> Result where @@ -34,6 +35,7 @@ macro_rules! bounded_int { } } + #[cfg(feature = "serde")] impl<'de, const MIN: $ty, const MAX: $ty> serde::Deserialize<'de> for $Struct { fn deserialize(deserializer: D) -> Result where @@ -66,7 +68,7 @@ macro_rules! bounded_int { } impl $Struct { - pub const fn new(n: $ty) -> Result> { + pub const fn new_const(n: $ty) -> Result> { const { assert!(MIN < MAX) }; if n >= MIN && n <= MAX { @@ -79,6 +81,26 @@ macro_rules! bounded_int { }) } } + + pub fn new>(n: T) -> Result> { + const { assert!(MIN < MAX) }; + + let m = n.try_into().map_err(|_| BoundedIntError { + max: MAX, + min: MIN, + found: n, + })?; + + if m >= MIN && m <= MAX { + Ok(Self(m)) + } else { + Err(BoundedIntError { + max: MAX, + min: MIN, + found: n, + }) + } + } } impl core::str::FromStr for $Struct { @@ -135,13 +157,13 @@ macro_rules! bounded_int { #[derive(Debug, Clone, PartialEq, thiserror::Error)] #[error("expected a value between {min}..={max}, found {found}")] -pub struct BoundedIntError { +pub struct BoundedIntError { min: T, max: T, - found: T, + found: U, } -impl BoundedIntError { +impl BoundedIntError { pub fn min(&self) -> &T { &self.min } @@ -150,7 +172,7 @@ impl BoundedIntError { &self.max } - pub fn found(&self) -> &T { + pub fn found(&self) -> &U { &self.found } } diff --git a/lib/unionlabs/src/cometbls/types/canonical_vote.rs b/lib/unionlabs/src/cometbls/types/canonical_vote.rs index d5f8f34d71..397cafffef 100644 --- a/lib/unionlabs/src/cometbls/types/canonical_vote.rs +++ b/lib/unionlabs/src/cometbls/types/canonical_vote.rs @@ -17,14 +17,19 @@ pub struct CanonicalVote { pub chain_id: String, } -impl From for protos::tendermint::types::CanonicalVote { - fn from(value: CanonicalVote) -> Self { - Self { - r#type: value.ty.into(), - height: value.height.into(), - round: value.round.into(), - block_id: Some(value.block_id.into()), - chain_id: value.chain_id, +#[cfg(feature = "proto")] +pub mod proto { + use super::CanonicalVote; + + impl From for protos::tendermint::types::CanonicalVote { + fn from(value: CanonicalVote) -> Self { + Self { + r#type: value.ty.into(), + height: value.height.into(), + round: value.round.into(), + block_id: Some(value.block_id.into()), + chain_id: value.chain_id, + } } } } diff --git a/lib/unionlabs/src/cosmos/auth/base_account.rs b/lib/unionlabs/src/cosmos/auth/base_account.rs index 1ecf866d17..922a1a9a6e 100644 --- a/lib/unionlabs/src/cosmos/auth/base_account.rs +++ b/lib/unionlabs/src/cosmos/auth/base_account.rs @@ -1,9 +1,6 @@ use macros::model; -use crate::{ - cosmos::crypto::{AnyPubKey, TryFromAnyPubKeyError}, - errors::MissingField, -}; +use crate::cosmos::crypto::AnyPubKey; #[model(proto(raw(protos::cosmos::auth::v1beta1::BaseAccount), into, from))] pub struct BaseAccount { @@ -16,34 +13,44 @@ pub struct BaseAccount { pub sequence: u64, } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromBaseAccountError { - #[error(transparent)] - MissingField(MissingField), - #[error("unable to decode pub key")] - PubKey(#[from] TryFromAnyPubKeyError), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::{auth::base_account::BaseAccount, crypto::proto::TryFromAnyPubKeyError}, + errors::MissingField, + }; + + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromBaseAccountError { + #[error(transparent)] + MissingField(MissingField), + #[error("unable to decode pub key")] + PubKey(#[from] TryFromAnyPubKeyError), + } -impl TryFrom for BaseAccount { - type Error = TryFromBaseAccountError; + impl TryFrom for BaseAccount { + type Error = TryFromBaseAccountError; - fn try_from(value: protos::cosmos::auth::v1beta1::BaseAccount) -> Result { - Ok(Self { - address: value.address, - pub_key: value.pub_key.map(TryInto::try_into).transpose()?, - account_number: value.account_number, - sequence: value.sequence, - }) + fn try_from( + value: protos::cosmos::auth::v1beta1::BaseAccount, + ) -> Result { + Ok(Self { + address: value.address, + pub_key: value.pub_key.map(TryInto::try_into).transpose()?, + account_number: value.account_number, + sequence: value.sequence, + }) + } } -} -impl From for protos::cosmos::auth::v1beta1::BaseAccount { - fn from(value: BaseAccount) -> Self { - Self { - address: value.address, - pub_key: value.pub_key.map(Into::into), - account_number: value.account_number, - sequence: value.sequence, + impl From for protos::cosmos::auth::v1beta1::BaseAccount { + fn from(value: BaseAccount) -> Self { + Self { + address: value.address, + pub_key: value.pub_key.map(Into::into), + account_number: value.account_number, + sequence: value.sequence, + } } } } diff --git a/lib/unionlabs/src/cosmos/base/abci/gas_info.rs b/lib/unionlabs/src/cosmos/base/abci/gas_info.rs index 8c97ed1d1e..c382d72c61 100644 --- a/lib/unionlabs/src/cosmos/base/abci/gas_info.rs +++ b/lib/unionlabs/src/cosmos/base/abci/gas_info.rs @@ -6,20 +6,25 @@ pub struct GasInfo { pub gas_used: u64, } -impl From for GasInfo { - fn from(value: protos::cosmos::base::abci::v1beta1::GasInfo) -> Self { - Self { - gas_wanted: value.gas_wanted, - gas_used: value.gas_used, +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::base::abci::gas_info::GasInfo; + + impl From for GasInfo { + fn from(value: protos::cosmos::base::abci::v1beta1::GasInfo) -> Self { + Self { + gas_wanted: value.gas_wanted, + gas_used: value.gas_used, + } } } -} -impl From for protos::cosmos::base::abci::v1beta1::GasInfo { - fn from(value: GasInfo) -> Self { - Self { - gas_wanted: value.gas_wanted, - gas_used: value.gas_used, + impl From for protos::cosmos::base::abci::v1beta1::GasInfo { + fn from(value: GasInfo) -> Self { + Self { + gas_wanted: value.gas_wanted, + gas_used: value.gas_used, + } } } } diff --git a/lib/unionlabs/src/cosmos/base/coin.rs b/lib/unionlabs/src/cosmos/base/coin.rs index 4e01fea00d..99430c8020 100644 --- a/lib/unionlabs/src/cosmos/base/coin.rs +++ b/lib/unionlabs/src/cosmos/base/coin.rs @@ -1,5 +1,3 @@ -use core::num::ParseIntError; - use macros::model; #[model(proto(raw(protos::cosmos::base::v1beta1::Coin), into, from))] @@ -11,28 +9,35 @@ pub struct Coin { pub amount: u128, } -impl From for protos::cosmos::base::v1beta1::Coin { - fn from(value: Coin) -> Self { - Self { - denom: value.denom, - amount: value.amount.to_string(), +#[cfg(feature = "proto")] +pub mod proto { + use core::num::ParseIntError; + + use crate::cosmos::base::coin::Coin; + + impl From for protos::cosmos::base::v1beta1::Coin { + fn from(value: Coin) -> Self { + Self { + denom: value.denom, + amount: value.amount.to_string(), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromCoinError { - #[error("invalid amount")] - Amount(#[from] ParseIntError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromCoinError { + #[error("invalid amount")] + Amount(#[from] ParseIntError), + } -impl TryFrom for Coin { - type Error = TryFromCoinError; + impl TryFrom for Coin { + type Error = TryFromCoinError; - fn try_from(value: protos::cosmos::base::v1beta1::Coin) -> Result { - Ok(Self { - denom: value.denom, - amount: value.amount.parse()?, - }) + fn try_from(value: protos::cosmos::base::v1beta1::Coin) -> Result { + Ok(Self { + denom: value.denom, + amount: value.amount.parse()?, + }) + } } } diff --git a/lib/unionlabs/src/cosmos/base/query/page_response.rs b/lib/unionlabs/src/cosmos/base/query/page_response.rs index 3c3de94c82..89797c85f0 100644 --- a/lib/unionlabs/src/cosmos/base/query/page_response.rs +++ b/lib/unionlabs/src/cosmos/base/query/page_response.rs @@ -11,20 +11,25 @@ pub struct PageResponse { pub total: u64, } -impl From for PageResponse { - fn from(value: protos::cosmos::base::query::v1beta1::PageResponse) -> Self { - Self { - next_key: value.next_key, - total: value.total, +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::base::query::page_response::PageResponse; + + impl From for PageResponse { + fn from(value: protos::cosmos::base::query::v1beta1::PageResponse) -> Self { + Self { + next_key: value.next_key, + total: value.total, + } } } -} -impl From for protos::cosmos::base::query::v1beta1::PageResponse { - fn from(value: PageResponse) -> Self { - Self { - next_key: value.next_key, - total: value.total, + impl From for protos::cosmos::base::query::v1beta1::PageResponse { + fn from(value: PageResponse) -> Self { + Self { + next_key: value.next_key, + total: value.total, + } } } } diff --git a/lib/unionlabs/src/cosmos/crypto.rs b/lib/unionlabs/src/cosmos/crypto.rs index cd56022f7b..1f6750fe3f 100644 --- a/lib/unionlabs/src/cosmos/crypto.rs +++ b/lib/unionlabs/src/cosmos/crypto.rs @@ -1,18 +1,12 @@ -use core::fmt::Debug; - use macros::model; -use crate::{ - encoding::{DecodeAs, Proto}, - errors::InvalidLength, - google::protobuf::any::Any, - TryFromProtoBytesError, TypeUrl, -}; +use crate::google::protobuf::any::Any; pub mod bn254; pub mod ed25519; pub mod multisig; pub mod secp256k1; +// TODO: Remove? This is empty pub mod secp256r1; #[model(proto(raw(protos::google::protobuf::Any), into, from))] @@ -42,60 +36,6 @@ impl AnyPubKey { } } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromAnyPubKeyError { - // TODO: This is also in any.rs, find a way to generalize? - #[error( - "invalid type url `{found}`, expected one of: {}", - expected.iter().map(|x| format!("`{x}`")).collect::>().join(", ") - )] - InvalidTypeUrl { - found: String, - expected: Vec, - }, - #[error("unable to decode pub key from proto bytes")] - TryFromProto(TryFromProtoBytesError), -} - -impl TryFrom for AnyPubKey { - type Error = TryFromAnyPubKeyError; - - fn try_from(value: protos::google::protobuf::Any) -> Result { - if value.type_url == bn254::PubKey::type_url() { - bn254::PubKey::decode_as::(&value.value) - .map(Self::Bn254) - .map_err(TryFromAnyPubKeyError::TryFromProto) - } else if value.type_url == ed25519::PubKey::type_url() { - ed25519::PubKey::decode_as::(&value.value) - .map(Self::Ed25519) - .map_err(TryFromAnyPubKeyError::TryFromProto) - } else if value.type_url == secp256k1::PubKey::type_url() { - secp256k1::PubKey::decode_as::(&value.value) - .map(Self::Secp256k1) - .map_err(TryFromAnyPubKeyError::TryFromProto) - } else { - Err(TryFromAnyPubKeyError::InvalidTypeUrl { - found: value.type_url, - expected: vec![ - bn254::PubKey::type_url(), - ed25519::PubKey::type_url(), - secp256k1::PubKey::type_url(), - ], - }) - } - } -} - -impl From for protos::google::protobuf::Any { - fn from(value: AnyPubKey) -> Self { - match value { - AnyPubKey::Bn254(key) => Any(key).into(), - AnyPubKey::Ed25519(key) => Any(key).into(), - AnyPubKey::Secp256k1(key) => Any(key).into(), - } - } -} - impl From> for AnyPubKey { fn from(value: Any) -> Self { Self::Bn254(value.0) @@ -113,3 +53,68 @@ impl From> for AnyPubKey { Self::Secp256k1(value.0) } } + +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::crypto::{bn254, ed25519, secp256k1, AnyPubKey}, + encoding::{DecodeAs, Proto}, + errors::InvalidLength, + google::protobuf::any::Any, + TryFromProtoBytesError, TypeUrl, + }; + + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromAnyPubKeyError { + // TODO: This is also in any.rs, find a way to generalize? + #[error( + "invalid type url `{found}`, expected one of: {}", + expected.iter().map(|x| format!("`{x}`")).collect::>().join(", ") + )] + InvalidTypeUrl { + found: String, + expected: Vec, + }, + #[error("unable to decode pub key from proto bytes")] + TryFromProto(TryFromProtoBytesError), + } + + impl TryFrom for AnyPubKey { + type Error = TryFromAnyPubKeyError; + + fn try_from(value: protos::google::protobuf::Any) -> Result { + if value.type_url == bn254::PubKey::type_url() { + bn254::PubKey::decode_as::(&value.value) + .map(Self::Bn254) + .map_err(TryFromAnyPubKeyError::TryFromProto) + } else if value.type_url == ed25519::PubKey::type_url() { + ed25519::PubKey::decode_as::(&value.value) + .map(Self::Ed25519) + .map_err(TryFromAnyPubKeyError::TryFromProto) + } else if value.type_url == secp256k1::PubKey::type_url() { + secp256k1::PubKey::decode_as::(&value.value) + .map(Self::Secp256k1) + .map_err(TryFromAnyPubKeyError::TryFromProto) + } else { + Err(TryFromAnyPubKeyError::InvalidTypeUrl { + found: value.type_url, + expected: vec![ + bn254::PubKey::type_url(), + ed25519::PubKey::type_url(), + secp256k1::PubKey::type_url(), + ], + }) + } + } + } + + impl From for protos::google::protobuf::Any { + fn from(value: AnyPubKey) -> Self { + match value { + AnyPubKey::Bn254(key) => Any(key).into(), + AnyPubKey::Ed25519(key) => Any(key).into(), + AnyPubKey::Secp256k1(key) => Any(key).into(), + } + } + } +} diff --git a/lib/unionlabs/src/cosmos/crypto/bn254.rs b/lib/unionlabs/src/cosmos/crypto/bn254.rs index 94acbafae9..8934a780a8 100644 --- a/lib/unionlabs/src/cosmos/crypto/bn254.rs +++ b/lib/unionlabs/src/cosmos/crypto/bn254.rs @@ -1,27 +1,31 @@ use macros::model; -use crate::{errors::InvalidLength, hash::H256}; +use crate::hash::{hash_v2::Base64, H256}; #[model(proto(raw(protos::cosmos::crypto::bn254::PubKey), into, from))] pub struct PubKey { - #[serde(with = "::serde_utils::base64")] - pub key: H256, + pub key: H256, } -impl TryFrom for PubKey { - type Error = InvalidLength; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{cosmos::crypto::bn254::PubKey, errors::InvalidLength}; - fn try_from(value: protos::cosmos::crypto::bn254::PubKey) -> Result { - Ok(Self { - key: value.key.try_into()?, - }) + impl TryFrom for PubKey { + type Error = InvalidLength; + + fn try_from(value: protos::cosmos::crypto::bn254::PubKey) -> Result { + Ok(Self { + key: value.key.try_into()?, + }) + } } -} -impl From for protos::cosmos::crypto::bn254::PubKey { - fn from(value: PubKey) -> Self { - Self { - key: value.key.into(), + impl From for protos::cosmos::crypto::bn254::PubKey { + fn from(value: PubKey) -> Self { + Self { + key: value.key.into(), + } } } } diff --git a/lib/unionlabs/src/cosmos/crypto/ed25519.rs b/lib/unionlabs/src/cosmos/crypto/ed25519.rs index d78cf5ffc9..bc73cd782f 100644 --- a/lib/unionlabs/src/cosmos/crypto/ed25519.rs +++ b/lib/unionlabs/src/cosmos/crypto/ed25519.rs @@ -1,33 +1,31 @@ use macros::model; -use crate::errors::{ExpectedLength, InvalidLength}; +use crate::hash::H256; #[model(proto(raw(protos::cosmos::crypto::ed25519::PubKey), into, from))] pub struct PubKey { - #[serde(with = "::serde_utils::base64")] - pub key: [u8; 32], + pub key: H256, } -impl TryFrom for PubKey { - type Error = InvalidLength; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{cosmos::crypto::ed25519::PubKey, errors::InvalidLength}; - fn try_from(value: protos::cosmos::crypto::ed25519::PubKey) -> Result { - Ok(Self { - key: value - .key - .try_into() - .map_err(|invalid: Vec| InvalidLength { - expected: ExpectedLength::Exact(32), - found: invalid.len(), - })?, - }) + impl TryFrom for PubKey { + type Error = InvalidLength; + + fn try_from(value: protos::cosmos::crypto::ed25519::PubKey) -> Result { + Ok(Self { + key: value.key.try_into()?, + }) + } } -} -impl From for protos::cosmos::crypto::ed25519::PubKey { - fn from(value: PubKey) -> Self { - Self { - key: value.key.into(), + impl From for protos::cosmos::crypto::ed25519::PubKey { + fn from(value: PubKey) -> Self { + Self { + key: value.key.into(), + } } } } diff --git a/lib/unionlabs/src/cosmos/crypto/multisig/compact_bit_array.rs b/lib/unionlabs/src/cosmos/crypto/multisig/compact_bit_array.rs index 5b9657e46d..394d6af3b3 100644 --- a/lib/unionlabs/src/cosmos/crypto/multisig/compact_bit_array.rs +++ b/lib/unionlabs/src/cosmos/crypto/multisig/compact_bit_array.rs @@ -7,25 +7,30 @@ use macros::model; ))] pub struct CompactBitArray { pub extra_bits_stored: u32, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub elems: Vec, } -impl From for protos::cosmos::crypto::multisig::v1beta1::CompactBitArray { - fn from(value: CompactBitArray) -> Self { - Self { - extra_bits_stored: value.extra_bits_stored, - elems: value.elems, +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::crypto::multisig::compact_bit_array::CompactBitArray; + + impl From for protos::cosmos::crypto::multisig::v1beta1::CompactBitArray { + fn from(value: CompactBitArray) -> Self { + Self { + extra_bits_stored: value.extra_bits_stored, + elems: value.elems, + } } } -} -impl From for CompactBitArray { - fn from(value: protos::cosmos::crypto::multisig::v1beta1::CompactBitArray) -> Self { - Self { - extra_bits_stored: value.extra_bits_stored, - elems: value.elems, + impl From for CompactBitArray { + fn from(value: protos::cosmos::crypto::multisig::v1beta1::CompactBitArray) -> Self { + Self { + extra_bits_stored: value.extra_bits_stored, + elems: value.elems, + } } } } diff --git a/lib/unionlabs/src/cosmos/crypto/secp256k1.rs b/lib/unionlabs/src/cosmos/crypto/secp256k1.rs index 14ec02d648..ef80d26b8e 100644 --- a/lib/unionlabs/src/cosmos/crypto/secp256k1.rs +++ b/lib/unionlabs/src/cosmos/crypto/secp256k1.rs @@ -1,33 +1,31 @@ use macros::model; -use crate::errors::{ExpectedLength, InvalidLength}; +use crate::hash::hash_v2::{Base64, Hash}; #[model(proto(raw(protos::cosmos::crypto::secp256k1::PubKey), into, from))] pub struct PubKey { - #[serde(with = "::serde_utils::base64")] - pub key: [u8; 33], + pub key: Hash<33, Base64>, } -impl TryFrom for PubKey { - type Error = InvalidLength; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{cosmos::crypto::secp256k1::PubKey, errors::InvalidLength}; - fn try_from(value: protos::cosmos::crypto::secp256k1::PubKey) -> Result { - Ok(Self { - key: value - .key - .try_into() - .map_err(|invalid: Vec| InvalidLength { - expected: ExpectedLength::Exact(33), - found: invalid.len(), - })?, - }) + impl TryFrom for PubKey { + type Error = InvalidLength; + + fn try_from(value: protos::cosmos::crypto::secp256k1::PubKey) -> Result { + Ok(Self { + key: value.key.try_into()?, + }) + } } -} -impl From for protos::cosmos::crypto::secp256k1::PubKey { - fn from(value: PubKey) -> Self { - Self { - key: value.key.into(), + impl From for protos::cosmos::crypto::secp256k1::PubKey { + fn from(value: PubKey) -> Self { + Self { + key: value.key.into(), + } } } } diff --git a/lib/unionlabs/src/cosmos/ics23/batch_entry.rs b/lib/unionlabs/src/cosmos/ics23/batch_entry.rs index 77d0211a42..e4eeea40ca 100644 --- a/lib/unionlabs/src/cosmos/ics23/batch_entry.rs +++ b/lib/unionlabs/src/cosmos/ics23/batch_entry.rs @@ -1,11 +1,7 @@ use macros::model; -use crate::{ - cosmos::ics23::{ - existence_proof::{ExistenceProof, TryFromExistenceProofError}, - non_existence_proof::{NonExistenceProof, TryFromNonExistenceProofError}, - }, - errors::{required, MissingField}, +use crate::cosmos::ics23::{ + existence_proof::ExistenceProof, non_existence_proof::NonExistenceProof, }; #[model(proto(raw(protos::cosmos::ics23::v1::BatchEntry), into, from))] @@ -14,62 +10,57 @@ pub enum BatchEntry { Nonexist(NonExistenceProof), } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromBatchEntryError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid existence proof")] - Exist(#[from] TryFromExistenceProofError), - #[error("invalid non existence proof")] - Nonexist(#[from] TryFromNonExistenceProofError), -} - -impl TryFrom for BatchEntry { - type Error = TryFromBatchEntryError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::ics23::{ + batch_entry::BatchEntry, existence_proof::proto::TryFromExistenceProofError, + non_existence_proof::proto::TryFromNonExistenceProofError, + }, + errors::{required, MissingField}, + }; - fn try_from(value: protos::cosmos::ics23::v1::BatchEntry) -> Result { - match required!(value.proof)? { - protos::cosmos::ics23::v1::batch_entry::Proof::Exist(exist) => Ok(Self::Exist( - exist.try_into().map_err(TryFromBatchEntryError::Exist)?, - )), - protos::cosmos::ics23::v1::batch_entry::Proof::Nonexist(nonexist) => { - Ok(Self::Nonexist( - nonexist - .try_into() - .map_err(TryFromBatchEntryError::Nonexist)?, - )) - } - } + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromBatchEntryError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid existence proof")] + Exist(#[from] TryFromExistenceProofError), + #[error("invalid non existence proof")] + Nonexist(#[from] TryFromNonExistenceProofError), } -} -impl From for protos::cosmos::ics23::v1::BatchEntry { - fn from(value: BatchEntry) -> Self { - Self { - proof: Some(match value { - BatchEntry::Exist(exist) => { - protos::cosmos::ics23::v1::batch_entry::Proof::Exist(exist.into()) - } - BatchEntry::Nonexist(nonexist) => { - protos::cosmos::ics23::v1::batch_entry::Proof::Nonexist(nonexist.into()) + impl TryFrom for BatchEntry { + type Error = TryFromBatchEntryError; + + fn try_from(value: protos::cosmos::ics23::v1::BatchEntry) -> Result { + match required!(value.proof)? { + protos::cosmos::ics23::v1::batch_entry::Proof::Exist(exist) => Ok(Self::Exist( + exist.try_into().map_err(TryFromBatchEntryError::Exist)?, + )), + protos::cosmos::ics23::v1::batch_entry::Proof::Nonexist(nonexist) => { + Ok(Self::Nonexist( + nonexist + .try_into() + .map_err(TryFromBatchEntryError::Nonexist)?, + )) } - }), + } } } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::CosmosIcs23V1BatchEntryData { - fn from(value: BatchEntry) -> Self { - match value { - BatchEntry::Exist(exist) => contracts::glue::CosmosIcs23V1BatchEntryData { - exist: exist.into(), - ..Default::default() - }, - BatchEntry::Nonexist(nonexist) => contracts::glue::CosmosIcs23V1BatchEntryData { - nonexist: nonexist.into(), - ..Default::default() - }, + impl From for protos::cosmos::ics23::v1::BatchEntry { + fn from(value: BatchEntry) -> Self { + Self { + proof: Some(match value { + BatchEntry::Exist(exist) => { + protos::cosmos::ics23::v1::batch_entry::Proof::Exist(exist.into()) + } + BatchEntry::Nonexist(nonexist) => { + protos::cosmos::ics23::v1::batch_entry::Proof::Nonexist(nonexist.into()) + } + }), + } } } } diff --git a/lib/unionlabs/src/cosmos/ics23/batch_proof.rs b/lib/unionlabs/src/cosmos/ics23/batch_proof.rs index b8d802f296..aafd7c47ba 100644 --- a/lib/unionlabs/src/cosmos/ics23/batch_proof.rs +++ b/lib/unionlabs/src/cosmos/ics23/batch_proof.rs @@ -1,54 +1,48 @@ use macros::model; -use crate::cosmos::ics23::batch_entry::{BatchEntry, TryFromBatchEntryError}; +use crate::cosmos::ics23::batch_entry::BatchEntry; #[model(proto(raw(protos::cosmos::ics23::v1::BatchProof), into, from))] pub struct BatchProof { pub entries: Vec, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromBatchProofError { - #[error("invalid entries")] - Entries(#[from] TryFromBatchEntryError), -} - -impl TryFrom for BatchProof { - type Error = TryFromBatchProofError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::ics23::{ + batch_entry::proto::TryFromBatchEntryError, batch_proof::BatchProof, + }; - fn try_from(value: protos::cosmos::ics23::v1::BatchProof) -> Result { - Ok(Self { - entries: value - .entries - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromBatchProofError::Entries)?, - }) + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromBatchProofError { + #[error("invalid entries")] + Entries(#[from] TryFromBatchEntryError), } -} -impl From for protos::cosmos::ics23::v1::BatchProof { - fn from(value: BatchProof) -> Self { - Self { - entries: value - .entries - .into_iter() - .map(Into::into) - .collect::>(), + impl TryFrom for BatchProof { + type Error = TryFromBatchProofError; + + fn try_from(value: protos::cosmos::ics23::v1::BatchProof) -> Result { + Ok(Self { + entries: value + .entries + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromBatchProofError::Entries)?, + }) } } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::CosmosIcs23V1BatchProofData { - fn from(value: BatchProof) -> Self { - Self { - entries: value - .entries - .into_iter() - .map(Into::into) - .collect::>(), + impl From for protos::cosmos::ics23::v1::BatchProof { + fn from(value: BatchProof) -> Self { + Self { + entries: value + .entries + .into_iter() + .map(Into::into) + .collect::>(), + } } } } diff --git a/lib/unionlabs/src/cosmos/ics23/commitment_proof.rs b/lib/unionlabs/src/cosmos/ics23/commitment_proof.rs index e4a5ff5b38..74cf97a269 100644 --- a/lib/unionlabs/src/cosmos/ics23/commitment_proof.rs +++ b/lib/unionlabs/src/cosmos/ics23/commitment_proof.rs @@ -1,13 +1,8 @@ use macros::model; -use crate::{ - cosmos::ics23::{ - batch_proof::{BatchProof, TryFromBatchProofError}, - compressed_batch_proof::{CompressedBatchProof, TryFromCompressedBatchProofProofError}, - existence_proof::{ExistenceProof, TryFromExistenceProofError}, - non_existence_proof::{NonExistenceProof, TryFromNonExistenceProofError}, - }, - errors::{required, MissingField}, +use crate::cosmos::ics23::{ + batch_proof::BatchProof, compressed_batch_proof::CompressedBatchProof, + existence_proof::ExistenceProof, non_existence_proof::NonExistenceProof, }; #[model(proto(raw(protos::cosmos::ics23::v1::CommitmentProof), into, from))] @@ -18,99 +13,92 @@ pub enum CommitmentProof { CompressedBatch(CompressedBatchProof), } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromCommitmentProofError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid existence proof")] - Exist(#[from] TryFromExistenceProofError), - #[error("invalid non existence proof")] - Nonexist(#[from] TryFromNonExistenceProofError), - #[error("invalid batch proof")] - Batch(#[from] TryFromBatchProofError), - #[error("invalid compressed batch proof")] - CompressedBatch(#[from] TryFromCompressedBatchProofProofError), -} - -impl TryFrom for CommitmentProof { - type Error = TryFromCommitmentProofError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::ics23::{ + batch_proof::proto::TryFromBatchProofError, commitment_proof::CommitmentProof, + compressed_batch_proof::proto::TryFromCompressedBatchProofProofError, + existence_proof::proto::TryFromExistenceProofError, + non_existence_proof::proto::TryFromNonExistenceProofError, + }, + errors::{required, MissingField}, + }; - fn try_from(value: protos::cosmos::ics23::v1::CommitmentProof) -> Result { - match required!(value.proof)? { - protos::cosmos::ics23::v1::commitment_proof::Proof::Exist(exist) => Ok(Self::Exist( - exist - .try_into() - .map_err(TryFromCommitmentProofError::Exist)?, - )), - protos::cosmos::ics23::v1::commitment_proof::Proof::Nonexist(nonexist) => { - Ok(Self::Nonexist( - nonexist - .try_into() - .map_err(TryFromCommitmentProofError::Nonexist)?, - )) - } - protos::cosmos::ics23::v1::commitment_proof::Proof::Batch(batch) => Ok(Self::Batch( - batch - .try_into() - .map_err(TryFromCommitmentProofError::Batch)?, - )), - protos::cosmos::ics23::v1::commitment_proof::Proof::Compressed(compressed) => { - Ok(Self::CompressedBatch( - compressed - .try_into() - .map_err(TryFromCommitmentProofError::CompressedBatch)?, - )) - } - } + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromCommitmentProofError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid existence proof")] + Exist(#[from] TryFromExistenceProofError), + #[error("invalid non existence proof")] + Nonexist(#[from] TryFromNonExistenceProofError), + #[error("invalid batch proof")] + Batch(#[from] TryFromBatchProofError), + #[error("invalid compressed batch proof")] + CompressedBatch(#[from] TryFromCompressedBatchProofProofError), } -} -impl From for protos::cosmos::ics23::v1::CommitmentProof { - fn from(value: CommitmentProof) -> Self { - Self { - proof: Some(match value { - CommitmentProof::Exist(exist) => { - protos::cosmos::ics23::v1::commitment_proof::Proof::Exist(exist.into()) + impl TryFrom for CommitmentProof { + type Error = TryFromCommitmentProofError; + + fn try_from( + value: protos::cosmos::ics23::v1::CommitmentProof, + ) -> Result { + match required!(value.proof)? { + protos::cosmos::ics23::v1::commitment_proof::Proof::Exist(exist) => { + Ok(Self::Exist( + exist + .try_into() + .map_err(TryFromCommitmentProofError::Exist)?, + )) } - CommitmentProof::Nonexist(nonexist) => { - protos::cosmos::ics23::v1::commitment_proof::Proof::Nonexist(nonexist.into()) + protos::cosmos::ics23::v1::commitment_proof::Proof::Nonexist(nonexist) => { + Ok(Self::Nonexist( + nonexist + .try_into() + .map_err(TryFromCommitmentProofError::Nonexist)?, + )) } - CommitmentProof::Batch(batch) => { - protos::cosmos::ics23::v1::commitment_proof::Proof::Batch(batch.into()) + protos::cosmos::ics23::v1::commitment_proof::Proof::Batch(batch) => { + Ok(Self::Batch( + batch + .try_into() + .map_err(TryFromCommitmentProofError::Batch)?, + )) } - CommitmentProof::CompressedBatch(compressed_batch) => { - protos::cosmos::ics23::v1::commitment_proof::Proof::Compressed( - compressed_batch.into(), - ) + protos::cosmos::ics23::v1::commitment_proof::Proof::Compressed(compressed) => { + Ok(Self::CompressedBatch( + compressed + .try_into() + .map_err(TryFromCommitmentProofError::CompressedBatch)?, + )) } - }), + } } } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::CosmosIcs23V1CommitmentProofData { - fn from(value: CommitmentProof) -> Self { - match value { - CommitmentProof::Exist(exist) => contracts::glue::CosmosIcs23V1CommitmentProofData { - exist: exist.into(), - ..Default::default() - }, - CommitmentProof::Nonexist(nonexist) => { - contracts::glue::CosmosIcs23V1CommitmentProofData { - nonexist: nonexist.into(), - ..Default::default() - } - } - CommitmentProof::Batch(batch) => contracts::glue::CosmosIcs23V1CommitmentProofData { - batch: batch.into(), - ..Default::default() - }, - CommitmentProof::CompressedBatch(compressed_batch) => { - contracts::glue::CosmosIcs23V1CommitmentProofData { - compressed: compressed_batch.into(), - ..Default::default() - } + impl From for protos::cosmos::ics23::v1::CommitmentProof { + fn from(value: CommitmentProof) -> Self { + Self { + proof: Some(match value { + CommitmentProof::Exist(exist) => { + protos::cosmos::ics23::v1::commitment_proof::Proof::Exist(exist.into()) + } + CommitmentProof::Nonexist(nonexist) => { + protos::cosmos::ics23::v1::commitment_proof::Proof::Nonexist( + nonexist.into(), + ) + } + CommitmentProof::Batch(batch) => { + protos::cosmos::ics23::v1::commitment_proof::Proof::Batch(batch.into()) + } + CommitmentProof::CompressedBatch(compressed_batch) => { + protos::cosmos::ics23::v1::commitment_proof::Proof::Compressed( + compressed_batch.into(), + ) + } + }), } } } diff --git a/lib/unionlabs/src/cosmos/ics23/compressed_batch_entry.rs b/lib/unionlabs/src/cosmos/ics23/compressed_batch_entry.rs index 5e1bf182d3..d408da5b23 100644 --- a/lib/unionlabs/src/cosmos/ics23/compressed_batch_entry.rs +++ b/lib/unionlabs/src/cosmos/ics23/compressed_batch_entry.rs @@ -1,15 +1,8 @@ use macros::model; -use crate::{ - cosmos::ics23::{ - compressed_existence_proof::{ - CompressedExistenceProof, TryFromCompressedExistenceProofError, - }, - compressed_non_existence_proof::{ - CompressedNonExistenceProof, TryFromCompressedNonExistenceProofError, - }, - }, - errors::{required, MissingField}, +use crate::cosmos::ics23::{ + compressed_existence_proof::CompressedExistenceProof, + compressed_non_existence_proof::CompressedNonExistenceProof, }; #[model(proto(raw(protos::cosmos::ics23::v1::CompressedBatchEntry), into, from))] @@ -18,72 +11,68 @@ pub enum CompressedBatchEntry { Nonexist(CompressedNonExistenceProof), } -impl From for protos::cosmos::ics23::v1::CompressedBatchEntry { - fn from(value: CompressedBatchEntry) -> Self { - Self { - proof: Some(match value { - CompressedBatchEntry::Exist(exist) => { - protos::cosmos::ics23::v1::compressed_batch_entry::Proof::Exist(exist.into()) - } - CompressedBatchEntry::Nonexist(nonexist) => { - protos::cosmos::ics23::v1::compressed_batch_entry::Proof::Nonexist( - nonexist.into(), - ) - } - }), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::ics23::{ + compressed_batch_entry::CompressedBatchEntry, + compressed_existence_proof::proto::TryFromCompressedExistenceProofError, + compressed_non_existence_proof::proto::TryFromCompressedNonExistenceProofError, + }, + errors::{required, MissingField}, + }; + + impl From for protos::cosmos::ics23::v1::CompressedBatchEntry { + fn from(value: CompressedBatchEntry) -> Self { + Self { + proof: Some(match value { + CompressedBatchEntry::Exist(exist) => { + protos::cosmos::ics23::v1::compressed_batch_entry::Proof::Exist( + exist.into(), + ) + } + CompressedBatchEntry::Nonexist(nonexist) => { + protos::cosmos::ics23::v1::compressed_batch_entry::Proof::Nonexist( + nonexist.into(), + ) + } + }), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromCompressedBatchEntryProofError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid compressed existence proof")] - Exist(#[from] TryFromCompressedExistenceProofError), - #[error("invalid compressed non existence proof")] - Nonexist(#[from] TryFromCompressedNonExistenceProofError), -} - -impl TryFrom for CompressedBatchEntry { - type Error = TryFromCompressedBatchEntryProofError; - - fn try_from( - value: protos::cosmos::ics23::v1::CompressedBatchEntry, - ) -> Result { - Ok(match required!(value.proof)? { - protos::cosmos::ics23::v1::compressed_batch_entry::Proof::Exist(exist) => Self::Exist( - exist - .try_into() - .map_err(TryFromCompressedBatchEntryProofError::Exist)?, - ), - protos::cosmos::ics23::v1::compressed_batch_entry::Proof::Nonexist(nonexist) => { - Self::Nonexist( - nonexist - .try_into() - .map_err(TryFromCompressedBatchEntryProofError::Nonexist)?, - ) - } - }) + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromCompressedBatchEntryProofError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid compressed existence proof")] + Exist(#[from] TryFromCompressedExistenceProofError), + #[error("invalid compressed non existence proof")] + Nonexist(#[from] TryFromCompressedNonExistenceProofError), } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::CosmosIcs23V1CompressedBatchEntryData { - fn from(value: CompressedBatchEntry) -> Self { - match value { - CompressedBatchEntry::Exist(exist) => { - contracts::glue::CosmosIcs23V1CompressedBatchEntryData { - exist: exist.into(), - ..Default::default() + impl TryFrom for CompressedBatchEntry { + type Error = TryFromCompressedBatchEntryProofError; + + fn try_from( + value: protos::cosmos::ics23::v1::CompressedBatchEntry, + ) -> Result { + Ok(match required!(value.proof)? { + protos::cosmos::ics23::v1::compressed_batch_entry::Proof::Exist(exist) => { + Self::Exist( + exist + .try_into() + .map_err(TryFromCompressedBatchEntryProofError::Exist)?, + ) } - } - CompressedBatchEntry::Nonexist(nonexist) => { - contracts::glue::CosmosIcs23V1CompressedBatchEntryData { - nonexist: nonexist.into(), - ..Default::default() + protos::cosmos::ics23::v1::compressed_batch_entry::Proof::Nonexist(nonexist) => { + Self::Nonexist( + nonexist + .try_into() + .map_err(TryFromCompressedBatchEntryProofError::Nonexist)?, + ) } - } + }) } } } diff --git a/lib/unionlabs/src/cosmos/ics23/compressed_batch_proof.rs b/lib/unionlabs/src/cosmos/ics23/compressed_batch_proof.rs index 265c9997c7..87a8670a73 100644 --- a/lib/unionlabs/src/cosmos/ics23/compressed_batch_proof.rs +++ b/lib/unionlabs/src/cosmos/ics23/compressed_batch_proof.rs @@ -1,9 +1,6 @@ use macros::model; -use crate::cosmos::ics23::{ - compressed_batch_entry::{CompressedBatchEntry, TryFromCompressedBatchEntryProofError}, - inner_op::{InnerOp, TryFromInnerOpError}, -}; +use crate::cosmos::ics23::{compressed_batch_entry::CompressedBatchEntry, inner_op::InnerOp}; #[model(proto(raw(protos::cosmos::ics23::v1::CompressedBatchProof), into, from))] pub struct CompressedBatchProof { @@ -11,68 +8,58 @@ pub struct CompressedBatchProof { pub lookup_inners: Vec, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromCompressedBatchProofProofError { - #[error("invalid entries")] - Entries(#[from] TryFromCompressedBatchEntryProofError), - #[error("invalid lookup inners")] - LookupInners(#[from] TryFromInnerOpError), -} - -impl TryFrom for CompressedBatchProof { - type Error = TryFromCompressedBatchProofProofError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::ics23::{ + compressed_batch_entry::proto::TryFromCompressedBatchEntryProofError, + compressed_batch_proof::CompressedBatchProof, inner_op::proto::TryFromInnerOpError, + }; - fn try_from( - value: protos::cosmos::ics23::v1::CompressedBatchProof, - ) -> Result { - Ok(Self { - entries: value - .entries - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromCompressedBatchProofProofError::Entries)?, - lookup_inners: value - .lookup_inners - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromCompressedBatchProofProofError::LookupInners)?, - }) + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromCompressedBatchProofProofError { + #[error("invalid entries")] + Entries(#[from] TryFromCompressedBatchEntryProofError), + #[error("invalid lookup inners")] + LookupInners(#[from] TryFromInnerOpError), } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::CosmosIcs23V1CompressedBatchProofData { - fn from(value: CompressedBatchProof) -> Self { - Self { - entries: value - .entries - .into_iter() - .map(Into::into) - .collect::>(), - lookup_inners: value - .lookup_inners - .into_iter() - .map(Into::into) - .collect::>(), + impl TryFrom for CompressedBatchProof { + type Error = TryFromCompressedBatchProofProofError; + + fn try_from( + value: protos::cosmos::ics23::v1::CompressedBatchProof, + ) -> Result { + Ok(Self { + entries: value + .entries + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromCompressedBatchProofProofError::Entries)?, + lookup_inners: value + .lookup_inners + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromCompressedBatchProofProofError::LookupInners)?, + }) } } -} -impl From for protos::cosmos::ics23::v1::CompressedBatchProof { - fn from(value: CompressedBatchProof) -> Self { - Self { - entries: value - .entries - .into_iter() - .map(Into::into) - .collect::>(), - lookup_inners: value - .lookup_inners - .into_iter() - .map(Into::into) - .collect::>(), + impl From for protos::cosmos::ics23::v1::CompressedBatchProof { + fn from(value: CompressedBatchProof) -> Self { + Self { + entries: value + .entries + .into_iter() + .map(Into::into) + .collect::>(), + lookup_inners: value + .lookup_inners + .into_iter() + .map(Into::into) + .collect::>(), + } } } } diff --git a/lib/unionlabs/src/cosmos/ics23/compressed_existence_proof.rs b/lib/unionlabs/src/cosmos/ics23/compressed_existence_proof.rs index 10aa2522db..bdfc8c996e 100644 --- a/lib/unionlabs/src/cosmos/ics23/compressed_existence_proof.rs +++ b/lib/unionlabs/src/cosmos/ics23/compressed_existence_proof.rs @@ -1,17 +1,13 @@ use macros::model; -use crate::{ - bounded::{BoundedI32, BoundedIntError}, - cosmos::ics23::leaf_op::{LeafOp, TryFromLeafOpError}, - errors::{required, MissingField}, -}; +use crate::{bounded::BoundedI32, cosmos::ics23::leaf_op::LeafOp}; #[model(proto(raw(protos::cosmos::ics23::v1::CompressedExistenceProof), into, from))] pub struct CompressedExistenceProof { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub key: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub value: Vec, pub leaf: LeafOp, @@ -19,57 +15,57 @@ pub struct CompressedExistenceProof { pub path: Vec>, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromCompressedExistenceProofError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid leaf")] - Leaf(#[from] TryFromLeafOpError), - #[error("invalid path")] - Path(#[source] BoundedIntError), -} - -impl TryFrom for CompressedExistenceProof { - type Error = TryFromCompressedExistenceProofError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + bounded::BoundedIntError, + cosmos::ics23::{ + compressed_existence_proof::CompressedExistenceProof, + leaf_op::proto::TryFromLeafOpError, + }, + errors::{required, MissingField}, + }; - fn try_from( - value: protos::cosmos::ics23::v1::CompressedExistenceProof, - ) -> Result { - Ok(Self { - key: value.key, - value: value.value, - leaf: required!(value.leaf)? - .try_into() - .map_err(TryFromCompressedExistenceProofError::Leaf)?, - path: value - .path - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromCompressedExistenceProofError::Path)?, - }) + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromCompressedExistenceProofError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid leaf")] + Leaf(#[from] TryFromLeafOpError), + #[error("invalid path")] + Path(#[source] BoundedIntError), } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::CosmosIcs23V1CompressedExistenceProofData { - fn from(value: CompressedExistenceProof) -> Self { - Self { - key: value.key.into(), - value: value.value.into(), - leaf: value.leaf.into(), - path: value.path.into_iter().map(Into::into).collect(), + impl TryFrom for CompressedExistenceProof { + type Error = TryFromCompressedExistenceProofError; + + fn try_from( + value: protos::cosmos::ics23::v1::CompressedExistenceProof, + ) -> Result { + Ok(Self { + key: value.key, + value: value.value, + leaf: required!(value.leaf)? + .try_into() + .map_err(TryFromCompressedExistenceProofError::Leaf)?, + path: value + .path + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromCompressedExistenceProofError::Path)?, + }) } } -} -impl From for protos::cosmos::ics23::v1::CompressedExistenceProof { - fn from(value: CompressedExistenceProof) -> Self { - Self { - key: value.key, - value: value.value, - leaf: Some(value.leaf.into()), - path: value.path.into_iter().map(Into::into).collect(), + impl From for protos::cosmos::ics23::v1::CompressedExistenceProof { + fn from(value: CompressedExistenceProof) -> Self { + Self { + key: value.key, + value: value.value, + leaf: Some(value.leaf.into()), + path: value.path.into_iter().map(Into::into).collect(), + } } } } diff --git a/lib/unionlabs/src/cosmos/ics23/compressed_non_existence_proof.rs b/lib/unionlabs/src/cosmos/ics23/compressed_non_existence_proof.rs index eb9a911382..7ccaf4635c 100644 --- a/lib/unionlabs/src/cosmos/ics23/compressed_non_existence_proof.rs +++ b/lib/unionlabs/src/cosmos/ics23/compressed_non_existence_proof.rs @@ -1,11 +1,6 @@ use macros::model; -use crate::{ - cosmos::ics23::compressed_existence_proof::{ - CompressedExistenceProof, TryFromCompressedExistenceProofError, - }, - errors::MissingField, -}; +use crate::cosmos::ics23::compressed_existence_proof::CompressedExistenceProof; #[model(proto( raw(protos::cosmos::ics23::v1::CompressedNonExistenceProof), @@ -13,66 +8,64 @@ use crate::{ from ))] pub struct CompressedNonExistenceProof { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub key: Vec, pub left: Option, pub right: Option, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromCompressedNonExistenceProofError { - #[error(transparent)] - MissingField(MissingField), - #[error("left proof invalid")] - Left(#[source] TryFromCompressedExistenceProofError), - #[error("right proof invalid")] - Right(#[source] TryFromCompressedExistenceProofError), -} - -impl TryFrom - for CompressedNonExistenceProof -{ - type Error = TryFromCompressedNonExistenceProofError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::ics23::{ + compressed_existence_proof::proto::TryFromCompressedExistenceProofError, + compressed_non_existence_proof::CompressedNonExistenceProof, + }, + errors::MissingField, + }; - fn try_from( - value: protos::cosmos::ics23::v1::CompressedNonExistenceProof, - ) -> Result { - Ok(Self { - key: value.key, - left: value - .left - .map(TryInto::try_into) - .transpose() - .map_err(TryFromCompressedNonExistenceProofError::Left)?, - right: value - .right - .map(TryInto::try_into) - .transpose() - .map_err(TryFromCompressedNonExistenceProofError::Right)?, - }) + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromCompressedNonExistenceProofError { + #[error(transparent)] + MissingField(MissingField), + #[error("left proof invalid")] + Left(#[source] TryFromCompressedExistenceProofError), + #[error("right proof invalid")] + Right(#[source] TryFromCompressedExistenceProofError), } -} -#[cfg(feature = "ethabi")] -impl From - for contracts::glue::CosmosIcs23V1CompressedNonExistenceProofData -{ - fn from(value: CompressedNonExistenceProof) -> Self { - Self { - key: value.key.into(), - left: value.left.map(Into::into).unwrap_or_default(), - right: value.right.map(Into::into).unwrap_or_default(), + impl TryFrom + for CompressedNonExistenceProof + { + type Error = TryFromCompressedNonExistenceProofError; + + fn try_from( + value: protos::cosmos::ics23::v1::CompressedNonExistenceProof, + ) -> Result { + Ok(Self { + key: value.key, + left: value + .left + .map(TryInto::try_into) + .transpose() + .map_err(TryFromCompressedNonExistenceProofError::Left)?, + right: value + .right + .map(TryInto::try_into) + .transpose() + .map_err(TryFromCompressedNonExistenceProofError::Right)?, + }) } } -} -impl From for protos::cosmos::ics23::v1::CompressedNonExistenceProof { - fn from(value: CompressedNonExistenceProof) -> Self { - Self { - key: value.key, - left: value.left.map(Into::into), - right: value.right.map(Into::into), + impl From for protos::cosmos::ics23::v1::CompressedNonExistenceProof { + fn from(value: CompressedNonExistenceProof) -> Self { + Self { + key: value.key, + left: value.left.map(Into::into), + right: value.right.map(Into::into), + } } } } diff --git a/lib/unionlabs/src/cosmos/ics23/existence_proof.rs b/lib/unionlabs/src/cosmos/ics23/existence_proof.rs index 65261c4919..1c91ad0d92 100644 --- a/lib/unionlabs/src/cosmos/ics23/existence_proof.rs +++ b/lib/unionlabs/src/cosmos/ics23/existence_proof.rs @@ -2,75 +2,68 @@ use alloc::borrow::Cow; use macros::model; -use crate::{ - cosmos::ics23::{ - inner_op::{InnerOp, TryFromInnerOpError}, - leaf_op::{LeafOp, TryFromLeafOpError}, - }, - errors::{required, MissingField}, -}; +use crate::cosmos::ics23::{inner_op::InnerOp, leaf_op::LeafOp}; #[model(proto(raw(protos::cosmos::ics23::v1::ExistenceProof), into, from))] pub struct ExistenceProof { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub key: Cow<'static, [u8]>, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub value: Cow<'static, [u8]>, pub leaf: LeafOp, pub path: Vec, } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromExistenceProofError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("error decoding leaf")] - Leaf(#[from] TryFromLeafOpError), - #[error("error decoding path")] - Path(#[from] TryFromInnerOpError), -} - -impl TryFrom for ExistenceProof { - type Error = TryFromExistenceProofError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::ics23::{ + existence_proof::ExistenceProof, inner_op::proto::TryFromInnerOpError, + leaf_op::proto::TryFromLeafOpError, + }, + errors::{required, MissingField}, + }; - fn try_from(value: protos::cosmos::ics23::v1::ExistenceProof) -> Result { - Ok(Self { - key: value.key.into(), - value: value.value.into(), - leaf: required!(value.leaf)? - .try_into() - .map_err(TryFromExistenceProofError::Leaf)?, - path: value - .path - .into_iter() - .map(TryFrom::try_from) - .collect::, _>>() - .map_err(TryFromExistenceProofError::Path)?, - }) + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromExistenceProofError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("error decoding leaf")] + Leaf(#[from] TryFromLeafOpError), + #[error("error decoding path")] + Path(#[from] TryFromInnerOpError), } -} -impl From for protos::cosmos::ics23::v1::ExistenceProof { - fn from(value: ExistenceProof) -> Self { - Self { - key: value.key.into(), - value: value.value.into(), - leaf: Some(value.leaf.into()), - path: value.path.into_iter().map(Into::into).collect::>(), + impl TryFrom for ExistenceProof { + type Error = TryFromExistenceProofError; + + fn try_from(value: protos::cosmos::ics23::v1::ExistenceProof) -> Result { + Ok(Self { + key: value.key.into(), + value: value.value.into(), + leaf: required!(value.leaf)? + .try_into() + .map_err(TryFromExistenceProofError::Leaf)?, + path: value + .path + .into_iter() + .map(TryFrom::try_from) + .collect::, _>>() + .map_err(TryFromExistenceProofError::Path)?, + }) } } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::CosmosIcs23V1ExistenceProofData { - fn from(value: ExistenceProof) -> Self { - Self { - key: value.key.to_vec().into(), - value: value.value.to_vec().into(), - leaf: value.leaf.into(), - path: value.path.into_iter().map(Into::into).collect::>(), + impl From for protos::cosmos::ics23::v1::ExistenceProof { + fn from(value: ExistenceProof) -> Self { + Self { + key: value.key.into(), + value: value.value.into(), + leaf: Some(value.leaf.into()), + path: value.path.into_iter().map(Into::into).collect::>(), + } } } } diff --git a/lib/unionlabs/src/cosmos/ics23/inner_op.rs b/lib/unionlabs/src/cosmos/ics23/inner_op.rs index 265a0b135b..a2e00ec795 100644 --- a/lib/unionlabs/src/cosmos/ics23/inner_op.rs +++ b/lib/unionlabs/src/cosmos/ics23/inner_op.rs @@ -1,53 +1,47 @@ use macros::model; -use crate::{cosmos::ics23::hash_op::HashOp, errors::UnknownEnumVariant}; +use crate::cosmos::ics23::hash_op::HashOp; #[model(proto(raw(protos::cosmos::ics23::v1::InnerOp), into, from))] pub struct InnerOp { pub hash: HashOp, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub prefix: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub suffix: Vec, } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromInnerOpError { - #[error("error decoding hash")] - Hash(UnknownEnumVariant), -} - -impl TryFrom for InnerOp { - type Error = TryFromInnerOpError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{cosmos::ics23::inner_op::InnerOp, errors::UnknownEnumVariant}; - fn try_from(value: protos::cosmos::ics23::v1::InnerOp) -> Result { - Ok(Self { - hash: value.hash.try_into().map_err(TryFromInnerOpError::Hash)?, - prefix: value.prefix, - suffix: value.suffix, - }) + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromInnerOpError { + #[error("error decoding hash")] + Hash(UnknownEnumVariant), } -} -impl From for protos::cosmos::ics23::v1::InnerOp { - fn from(value: InnerOp) -> Self { - Self { - hash: value.hash.into(), - prefix: value.prefix, - suffix: value.suffix, + impl TryFrom for InnerOp { + type Error = TryFromInnerOpError; + + fn try_from(value: protos::cosmos::ics23::v1::InnerOp) -> Result { + Ok(Self { + hash: value.hash.try_into().map_err(TryFromInnerOpError::Hash)?, + prefix: value.prefix, + suffix: value.suffix, + }) } } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::CosmosIcs23V1InnerOpData { - fn from(value: InnerOp) -> Self { - Self { - hash: value.hash.into(), - prefix: value.prefix.into(), - suffix: value.suffix.into(), + impl From for protos::cosmos::ics23::v1::InnerOp { + fn from(value: InnerOp) -> Self { + Self { + hash: value.hash.into(), + prefix: value.prefix, + suffix: value.suffix, + } } } } diff --git a/lib/unionlabs/src/cosmos/ics23/inner_spec.rs b/lib/unionlabs/src/cosmos/ics23/inner_spec.rs index 8b48f9385e..f8c0a0d266 100644 --- a/lib/unionlabs/src/cosmos/ics23/inner_spec.rs +++ b/lib/unionlabs/src/cosmos/ics23/inner_spec.rs @@ -2,11 +2,7 @@ use alloc::borrow::Cow; use macros::model; -use crate::{ - bounded::{BoundedIntError, BoundedUsize}, - cosmos::ics23::hash_op::HashOp, - errors::UnknownEnumVariant, -}; +use crate::{bounded::BoundedUsize, cosmos::ics23::hash_op::HashOp}; pub type PositiveI32AsUsize = BoundedUsize<0, { i32::MAX as usize }>; @@ -16,95 +12,102 @@ pub struct InnerSpec { pub child_size: PositiveI32AsUsize, pub min_prefix_length: PositiveI32AsUsize, pub max_prefix_length: PositiveI32AsUsize, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] pub empty_child: Cow<'static, [u8]>, pub hash: HashOp, } -impl From for protos::cosmos::ics23::v1::InnerSpec { - fn from(value: InnerSpec) -> Self { - Self { - child_order: value - .child_order - .iter() - .map(|x| { - x.inner() - .try_into() - .expect("value is bounded between 0..=i32::MAX") - }) - .collect(), - child_size: value - .child_size - .inner() - .try_into() - .expect("value is bounded between 1..=i32::MAX"), - min_prefix_length: value - .min_prefix_length - .inner() - .try_into() - .expect("value is bounded between 0..=i32::MAX"), - max_prefix_length: value - .max_prefix_length - .inner() - .try_into() - .expect("value is bounded between 0..=i32::MAX"), - empty_child: value.empty_child.into(), - hash: value.hash.into(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + bounded::BoundedIntError, cosmos::ics23::inner_spec::InnerSpec, errors::UnknownEnumVariant, + }; + + impl From for protos::cosmos::ics23::v1::InnerSpec { + fn from(value: InnerSpec) -> Self { + Self { + child_order: value + .child_order + .iter() + .map(|x| { + x.inner() + .try_into() + .expect("value is bounded between 0..=i32::MAX") + }) + .collect(), + child_size: value + .child_size + .inner() + .try_into() + .expect("value is bounded between 1..=i32::MAX"), + min_prefix_length: value + .min_prefix_length + .inner() + .try_into() + .expect("value is bounded between 0..=i32::MAX"), + max_prefix_length: value + .max_prefix_length + .inner() + .try_into() + .expect("value is bounded between 0..=i32::MAX"), + empty_child: value.empty_child.into(), + hash: value.hash.into(), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromInnerSpecError { - #[error("invalid hash")] - Hash(#[from] UnknownEnumVariant), - #[error("invalid child order")] - ChildOrder(#[source] BoundedIntError), - #[error("invalid child size")] - ChildSize(#[source] BoundedIntError), - #[error("invalid min prefix length")] - MinPrefixLength(#[source] BoundedIntError), - #[error("invalid max prefix length")] - MaxPrefixLength(#[source] BoundedIntError), - #[error("negative child order")] - NegativeChildOrder, - #[error("negative child size")] - NegativeChildSize, - #[error("negative min prefix length")] - NegativeMinPrefixLength, - #[error("negative max prefix length")] - NegativeMaxPrefixLength, -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromInnerSpecError { + #[error("invalid hash")] + Hash(#[from] UnknownEnumVariant), + #[error("invalid child order")] + ChildOrder(#[source] BoundedIntError), + #[error("invalid child size")] + ChildSize(#[source] BoundedIntError), + #[error("invalid min prefix length")] + MinPrefixLength(#[source] BoundedIntError), + #[error("invalid max prefix length")] + MaxPrefixLength(#[source] BoundedIntError), + #[error("negative child order")] + NegativeChildOrder, + #[error("negative child size")] + NegativeChildSize, + #[error("negative min prefix length")] + NegativeMinPrefixLength, + #[error("negative max prefix length")] + NegativeMaxPrefixLength, + } -impl TryFrom for InnerSpec { - type Error = TryFromInnerSpecError; + impl TryFrom for InnerSpec { + type Error = TryFromInnerSpecError; - fn try_from(value: protos::cosmos::ics23::v1::InnerSpec) -> Result { - Ok(Self { - child_order: value - .child_order - .into_iter() - .map(|order| { - usize::try_from(order) - .map_err(|_| TryFromInnerSpecError::NegativeChildOrder)? - .try_into() - .map_err(TryFromInnerSpecError::ChildOrder) - }) - .collect::>()?, - child_size: usize::try_from(value.child_size) - .map_err(|_| TryFromInnerSpecError::NegativeChildSize)? - .try_into() - .map_err(TryFromInnerSpecError::ChildSize)?, - min_prefix_length: usize::try_from(value.min_prefix_length) - .map_err(|_| TryFromInnerSpecError::NegativeMinPrefixLength)? - .try_into() - .map_err(TryFromInnerSpecError::MinPrefixLength)?, - max_prefix_length: usize::try_from(value.max_prefix_length) - .map_err(|_| TryFromInnerSpecError::NegativeMaxPrefixLength)? - .try_into() - .map_err(TryFromInnerSpecError::MaxPrefixLength)?, - empty_child: value.empty_child.into(), - hash: value.hash.try_into().map_err(TryFromInnerSpecError::Hash)?, - }) + fn try_from(value: protos::cosmos::ics23::v1::InnerSpec) -> Result { + Ok(Self { + child_order: value + .child_order + .into_iter() + .map(|order| { + usize::try_from(order) + .map_err(|_| TryFromInnerSpecError::NegativeChildOrder)? + .try_into() + .map_err(TryFromInnerSpecError::ChildOrder) + }) + .collect::>()?, + child_size: usize::try_from(value.child_size) + .map_err(|_| TryFromInnerSpecError::NegativeChildSize)? + .try_into() + .map_err(TryFromInnerSpecError::ChildSize)?, + min_prefix_length: usize::try_from(value.min_prefix_length) + .map_err(|_| TryFromInnerSpecError::NegativeMinPrefixLength)? + .try_into() + .map_err(TryFromInnerSpecError::MinPrefixLength)?, + max_prefix_length: usize::try_from(value.max_prefix_length) + .map_err(|_| TryFromInnerSpecError::NegativeMaxPrefixLength)? + .try_into() + .map_err(TryFromInnerSpecError::MaxPrefixLength)?, + empty_child: value.empty_child.into(), + hash: value.hash.try_into().map_err(TryFromInnerSpecError::Hash)?, + }) + } } } diff --git a/lib/unionlabs/src/cosmos/ics23/leaf_op.rs b/lib/unionlabs/src/cosmos/ics23/leaf_op.rs index 7fd061278c..f2ace3d6af 100644 --- a/lib/unionlabs/src/cosmos/ics23/leaf_op.rs +++ b/lib/unionlabs/src/cosmos/ics23/leaf_op.rs @@ -2,10 +2,7 @@ use alloc::borrow::Cow; use macros::model; -use crate::{ - cosmos::ics23::{hash_op::HashOp, length_op::LengthOp}, - errors::UnknownEnumVariant, -}; +use crate::cosmos::ics23::{hash_op::HashOp, length_op::LengthOp}; #[model(proto(raw(protos::cosmos::ics23::v1::LeafOp), into, from))] pub struct LeafOp { @@ -13,67 +10,59 @@ pub struct LeafOp { pub prehash_key: HashOp, pub prehash_value: HashOp, pub length: LengthOp, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub prefix: Cow<'static, [u8]>, } -impl From for protos::cosmos::ics23::v1::LeafOp { - fn from(value: LeafOp) -> Self { - Self { - hash: value.hash.into(), - prehash_key: value.prehash_key.into(), - prehash_value: value.prehash_value.into(), - length: value.length.into(), - prefix: value.prefix.into(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{cosmos::ics23::leaf_op::LeafOp, errors::UnknownEnumVariant}; + + impl From for protos::cosmos::ics23::v1::LeafOp { + fn from(value: LeafOp) -> Self { + Self { + hash: value.hash.into(), + prehash_key: value.prehash_key.into(), + prehash_value: value.prehash_value.into(), + length: value.length.into(), + prefix: value.prefix.into(), + } } } -} - -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromLeafOpError { - #[error("error decoding hash")] - Hash(#[source] UnknownEnumVariant), - #[error("error decoding prehash_key")] - PrehashKey(#[source] UnknownEnumVariant), - #[error("error decoding prehash_value")] - PrehashValue(#[source] UnknownEnumVariant), - #[error("error decoding length")] - Length(#[source] UnknownEnumVariant), -} -impl TryFrom for LeafOp { - type Error = TryFromLeafOpError; - - fn try_from(value: protos::cosmos::ics23::v1::LeafOp) -> Result { - Ok(Self { - hash: value.hash.try_into().map_err(TryFromLeafOpError::Hash)?, - prehash_key: value - .prehash_key - .try_into() - .map_err(TryFromLeafOpError::PrehashKey)?, - prehash_value: value - .prehash_value - .try_into() - .map_err(TryFromLeafOpError::PrehashValue)?, - length: value - .length - .try_into() - .map_err(TryFromLeafOpError::Length)?, - prefix: value.prefix.into(), - }) + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromLeafOpError { + #[error("error decoding hash")] + Hash(#[source] UnknownEnumVariant), + #[error("error decoding prehash_key")] + PrehashKey(#[source] UnknownEnumVariant), + #[error("error decoding prehash_value")] + PrehashValue(#[source] UnknownEnumVariant), + #[error("error decoding length")] + Length(#[source] UnknownEnumVariant), } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::CosmosIcs23V1LeafOpData { - fn from(value: LeafOp) -> Self { - Self { - hash: value.hash.into(), - prehash_key: value.prehash_key.into(), - prehash_value: value.prehash_value.into(), - length: value.length.into(), - prefix: value.prefix.into_owned().into(), + impl TryFrom for LeafOp { + type Error = TryFromLeafOpError; + + fn try_from(value: protos::cosmos::ics23::v1::LeafOp) -> Result { + Ok(Self { + hash: value.hash.try_into().map_err(TryFromLeafOpError::Hash)?, + prehash_key: value + .prehash_key + .try_into() + .map_err(TryFromLeafOpError::PrehashKey)?, + prehash_value: value + .prehash_value + .try_into() + .map_err(TryFromLeafOpError::PrehashValue)?, + length: value + .length + .try_into() + .map_err(TryFromLeafOpError::Length)?, + prefix: value.prefix.into(), + }) } } } diff --git a/lib/unionlabs/src/cosmos/ics23/non_existence_proof.rs b/lib/unionlabs/src/cosmos/ics23/non_existence_proof.rs index 01c3c19eaf..d4ea82ebd0 100644 --- a/lib/unionlabs/src/cosmos/ics23/non_existence_proof.rs +++ b/lib/unionlabs/src/cosmos/ics23/non_existence_proof.rs @@ -1,66 +1,65 @@ use macros::model; -use crate::{ - cosmos::ics23::existence_proof::{ExistenceProof, TryFromExistenceProofError}, - errors::MissingField, -}; +use crate::cosmos::ics23::existence_proof::ExistenceProof; #[model(proto(raw(protos::cosmos::ics23::v1::NonExistenceProof), into, from))] pub struct NonExistenceProof { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub key: Vec, pub left: Option, pub right: Option, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromNonExistenceProofError { - #[error(transparent)] - MissingField(MissingField), - #[error("left proof invalid")] - Left(TryFromExistenceProofError), - #[error("right proof invalid")] - Right(TryFromExistenceProofError), -} - -impl TryFrom for NonExistenceProof { - type Error = TryFromNonExistenceProofError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::ics23::{ + existence_proof::proto::TryFromExistenceProofError, + non_existence_proof::NonExistenceProof, + }, + errors::MissingField, + }; - fn try_from(value: protos::cosmos::ics23::v1::NonExistenceProof) -> Result { - Ok(Self { - key: value.key, - left: value - .left - .map(TryInto::try_into) - .transpose() - .map_err(TryFromNonExistenceProofError::Left)?, - right: value - .right - .map(TryInto::try_into) - .transpose() - .map_err(TryFromNonExistenceProofError::Right)?, - }) + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromNonExistenceProofError { + #[error(transparent)] + MissingField(MissingField), + #[error("left proof invalid")] + Left(TryFromExistenceProofError), + #[error("right proof invalid")] + Right(TryFromExistenceProofError), } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::CosmosIcs23V1NonExistenceProofData { - fn from(value: NonExistenceProof) -> Self { - Self { - key: value.key.into(), - left: value.left.map(Into::into).unwrap_or_default(), - right: value.right.map(Into::into).unwrap_or_default(), + impl TryFrom for NonExistenceProof { + type Error = TryFromNonExistenceProofError; + + fn try_from( + value: protos::cosmos::ics23::v1::NonExistenceProof, + ) -> Result { + Ok(Self { + key: value.key, + left: value + .left + .map(TryInto::try_into) + .transpose() + .map_err(TryFromNonExistenceProofError::Left)?, + right: value + .right + .map(TryInto::try_into) + .transpose() + .map_err(TryFromNonExistenceProofError::Right)?, + }) } } -} -impl From for protos::cosmos::ics23::v1::NonExistenceProof { - fn from(value: NonExistenceProof) -> Self { - Self { - key: value.key, - left: value.left.map(Into::into), - right: value.right.map(Into::into), + impl From for protos::cosmos::ics23::v1::NonExistenceProof { + fn from(value: NonExistenceProof) -> Self { + Self { + key: value.key, + left: value.left.map(Into::into), + right: value.right.map(Into::into), + } } } } diff --git a/lib/unionlabs/src/cosmos/ics23/proof_spec.rs b/lib/unionlabs/src/cosmos/ics23/proof_spec.rs index 26cffecbdf..4d254f7343 100644 --- a/lib/unionlabs/src/cosmos/ics23/proof_spec.rs +++ b/lib/unionlabs/src/cosmos/ics23/proof_spec.rs @@ -2,11 +2,7 @@ use macros::model; use crate::{ bounded::BoundedUsize, - cosmos::ics23::{ - inner_spec::{InnerSpec, TryFromInnerSpecError}, - leaf_op::{LeafOp, TryFromLeafOpError}, - }, - errors::{required, MissingField}, + cosmos::ics23::{inner_spec::InnerSpec, leaf_op::LeafOp}, }; #[model(proto(raw(protos::cosmos::ics23::v1::ProofSpec), into, from))] @@ -19,120 +15,132 @@ pub struct ProofSpec { pub prehash_key_before_comparison: bool, } -impl From for protos::cosmos::ics23::v1::ProofSpec { - fn from(value: ProofSpec) -> Self { - Self { - leaf_spec: Some(value.leaf_spec.into()), - inner_spec: Some(value.inner_spec.into()), - max_depth: value.max_depth.map_or(0, |md| { - md.inner() - .try_into() - .expect("value is bounded between 1..=i32::MAX") - }), - min_depth: value.min_depth.map_or(0, |md| { - md.inner() - .try_into() - .expect("value is bounded between 1..=i32::MAX") - }), - prehash_key_before_comparison: value.prehash_key_before_comparison, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + bounded::BoundedUsize, + cosmos::ics23::{ + inner_spec::proto::TryFromInnerSpecError, leaf_op::proto::TryFromLeafOpError, + proof_spec::ProofSpec, + }, + errors::{required, MissingField}, + }; + + impl From for protos::cosmos::ics23::v1::ProofSpec { + fn from(value: ProofSpec) -> Self { + Self { + leaf_spec: Some(value.leaf_spec.into()), + inner_spec: Some(value.inner_spec.into()), + max_depth: value.max_depth.map_or(0, |md| { + md.inner() + .try_into() + .expect("value is bounded between 1..=i32::MAX") + }), + min_depth: value.min_depth.map_or(0, |md| { + md.inner() + .try_into() + .expect("value is bounded between 1..=i32::MAX") + }), + prehash_key_before_comparison: value.prehash_key_before_comparison, + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromProofSpecError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid leaf spec")] - LeafSpec(#[from] TryFromLeafOpError), - #[error("invalid inner spec")] - InnerSpec(#[from] TryFromInnerSpecError), - #[error("negative max depth")] - NegativeMinDepth, - #[error("negative min depth")] - NegativeMaxDepth, -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromProofSpecError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid leaf spec")] + LeafSpec(#[from] TryFromLeafOpError), + #[error("invalid inner spec")] + InnerSpec(#[from] TryFromInnerSpecError), + #[error("negative max depth")] + NegativeMinDepth, + #[error("negative min depth")] + NegativeMaxDepth, + } -impl TryFrom for ProofSpec { - type Error = TryFromProofSpecError; + impl TryFrom for ProofSpec { + type Error = TryFromProofSpecError; - fn try_from(value: protos::cosmos::ics23::v1::ProofSpec) -> Result { - Ok(Self { - leaf_spec: required!(value.leaf_spec)? - .try_into() - .map_err(TryFromProofSpecError::LeafSpec)?, - inner_spec: required!(value.inner_spec)? - .try_into() - .map_err(TryFromProofSpecError::InnerSpec)?, - // x is between 0..i32::MAX here, expected type is between 1..=u32::MAX, we want the - // behaviour of NonZero* here; so if the ctor fails, then we know the value is zero. - // see test below for edge case handling - max_depth: usize::try_from(value.max_depth) - .map_err(|_| TryFromProofSpecError::NegativeMaxDepth) - .map(|x| BoundedUsize::new(x).ok())?, - min_depth: usize::try_from(value.min_depth) - .map_err(|_| TryFromProofSpecError::NegativeMinDepth) - .map(|x| BoundedUsize::new(x).ok())?, - prehash_key_before_comparison: value.prehash_key_before_comparison, - }) + fn try_from(value: protos::cosmos::ics23::v1::ProofSpec) -> Result { + Ok(Self { + leaf_spec: required!(value.leaf_spec)? + .try_into() + .map_err(TryFromProofSpecError::LeafSpec)?, + inner_spec: required!(value.inner_spec)? + .try_into() + .map_err(TryFromProofSpecError::InnerSpec)?, + // x is between 0..i32::MAX here, expected type is between 1..=u32::MAX, we want the + // behaviour of NonZero* here; so if the ctor fails, then we know the value is zero. + // see test below for edge case handling + max_depth: usize::try_from(value.max_depth) + .map_err(|_| TryFromProofSpecError::NegativeMaxDepth) + .map(|x| BoundedUsize::new(x).ok())?, + min_depth: usize::try_from(value.min_depth) + .map_err(|_| TryFromProofSpecError::NegativeMinDepth) + .map(|x| BoundedUsize::new(x).ok())?, + prehash_key_before_comparison: value.prehash_key_before_comparison, + }) + } } -} -#[cfg(test)] -mod tests { - use super::*; + #[cfg(test)] + pub(crate) mod tests { + use super::*; - #[test] - fn min_max_depth_conversion_works() { - let proto = protos::cosmos::ics23::v1::ProofSpec { - leaf_spec: Some(protos::cosmos::ics23::v1::LeafOp { - hash: 1, - prehash_key: 1, - prehash_value: 1, - length: 1, - prefix: [].into(), - }), - inner_spec: Some(protos::cosmos::ics23::v1::InnerSpec { - child_order: [].into(), - child_size: 1, - min_prefix_length: 1, - max_prefix_length: 1, - empty_child: [].into(), - hash: 1, - }), - max_depth: 1, - min_depth: 1, - prehash_key_before_comparison: false, - }; + #[test] + fn min_max_depth_conversion_works() { + let proto = protos::cosmos::ics23::v1::ProofSpec { + leaf_spec: Some(protos::cosmos::ics23::v1::LeafOp { + hash: 1, + prehash_key: 1, + prehash_value: 1, + length: 1, + prefix: [].into(), + }), + inner_spec: Some(protos::cosmos::ics23::v1::InnerSpec { + child_order: [].into(), + child_size: 1, + min_prefix_length: 1, + max_prefix_length: 1, + empty_child: [].into(), + hash: 1, + }), + max_depth: 1, + min_depth: 1, + prehash_key_before_comparison: false, + }; - let cvt = ProofSpec::try_from(proto.clone()).unwrap(); - assert_eq!(cvt.max_depth, Some(BoundedUsize::new(1).unwrap())); - assert_eq!(cvt.min_depth, Some(BoundedUsize::new(1).unwrap())); + let cvt = ProofSpec::try_from(proto.clone()).unwrap(); + assert_eq!(cvt.max_depth, Some(BoundedUsize::new(1).unwrap())); + assert_eq!(cvt.min_depth, Some(BoundedUsize::new(1).unwrap())); - let proto = protos::cosmos::ics23::v1::ProofSpec { - max_depth: 0, - min_depth: 0, - ..proto - }; + let proto = protos::cosmos::ics23::v1::ProofSpec { + max_depth: 0, + min_depth: 0, + ..proto + }; - let cvt = ProofSpec::try_from(proto.clone()).unwrap(); - assert_eq!(cvt.max_depth, None); - assert_eq!(cvt.min_depth, None); + let cvt = ProofSpec::try_from(proto.clone()).unwrap(); + assert_eq!(cvt.max_depth, None); + assert_eq!(cvt.min_depth, None); - let proto = protos::cosmos::ics23::v1::ProofSpec { - max_depth: i32::MAX, - min_depth: i32::MAX, - ..proto - }; + let proto = protos::cosmos::ics23::v1::ProofSpec { + max_depth: i32::MAX, + min_depth: i32::MAX, + ..proto + }; - let cvt = ProofSpec::try_from(proto.clone()).unwrap(); - assert_eq!( - cvt.max_depth, - Some(BoundedUsize::new(i32::MAX.try_into().unwrap()).unwrap()) - ); - assert_eq!( - cvt.min_depth, - Some(BoundedUsize::new(i32::MAX.try_into().unwrap()).unwrap()) - ); + let cvt = ProofSpec::try_from(proto.clone()).unwrap(); + assert_eq!( + cvt.max_depth, + Some(BoundedUsize::new_const(i32::MAX.try_into().unwrap()).unwrap()) + ); + assert_eq!( + cvt.min_depth, + Some(BoundedUsize::new_const(i32::MAX.try_into().unwrap()).unwrap()) + ); + } } } diff --git a/lib/unionlabs/src/cosmos/staking/commission.rs b/lib/unionlabs/src/cosmos/staking/commission.rs index 87c0256705..221339a474 100644 --- a/lib/unionlabs/src/cosmos/staking/commission.rs +++ b/lib/unionlabs/src/cosmos/staking/commission.rs @@ -1,9 +1,7 @@ use macros::model; use crate::{ - cosmos::staking::commission_rates::CommissionRates, - errors::{required, MissingField}, - google::protobuf::timestamp::{Timestamp, TryFromTimestampError}, + cosmos::staking::commission_rates::CommissionRates, google::protobuf::timestamp::Timestamp, }; #[model(proto(raw(protos::cosmos::staking::v1beta1::Commission), into, from))] @@ -14,30 +12,41 @@ pub struct Commission { pub update_time: Timestamp, } -#[derive(Debug)] -pub enum TryFromCommissionError { - MissingField(MissingField), - Timestamp(TryFromTimestampError), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::staking::commission::Commission, + errors::{required, MissingField}, + google::protobuf::timestamp::proto::TryFromTimestampError, + }; + + #[derive(Debug)] + pub enum TryFromCommissionError { + MissingField(MissingField), + Timestamp(TryFromTimestampError), + } -impl TryFrom for Commission { - type Error = TryFromCommissionError; + impl TryFrom for Commission { + type Error = TryFromCommissionError; - fn try_from(value: protos::cosmos::staking::v1beta1::Commission) -> Result { - Ok(Self { - commission_rates: required!(value.commission_rates)?.into(), - update_time: required!(value.update_time)? - .try_into() - .map_err(TryFromCommissionError::Timestamp)?, - }) + fn try_from( + value: protos::cosmos::staking::v1beta1::Commission, + ) -> Result { + Ok(Self { + commission_rates: required!(value.commission_rates)?.into(), + update_time: required!(value.update_time)? + .try_into() + .map_err(TryFromCommissionError::Timestamp)?, + }) + } } -} -impl From for protos::cosmos::staking::v1beta1::Commission { - fn from(value: Commission) -> Self { - Self { - commission_rates: Some(value.commission_rates.into()), - update_time: Some(value.update_time.into()), + impl From for protos::cosmos::staking::v1beta1::Commission { + fn from(value: Commission) -> Self { + Self { + commission_rates: Some(value.commission_rates.into()), + update_time: Some(value.update_time.into()), + } } } } diff --git a/lib/unionlabs/src/cosmos/staking/commission_rates.rs b/lib/unionlabs/src/cosmos/staking/commission_rates.rs index bb97b0b67d..599679719f 100644 --- a/lib/unionlabs/src/cosmos/staking/commission_rates.rs +++ b/lib/unionlabs/src/cosmos/staking/commission_rates.rs @@ -10,22 +10,27 @@ pub struct CommissionRates { pub max_change_rate: String, } -impl From for CommissionRates { - fn from(value: protos::cosmos::staking::v1beta1::CommissionRates) -> Self { - Self { - rate: value.rate, - max_rate: value.max_rate, - max_change_rate: value.max_change_rate, +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::staking::commission_rates::CommissionRates; + + impl From for CommissionRates { + fn from(value: protos::cosmos::staking::v1beta1::CommissionRates) -> Self { + Self { + rate: value.rate, + max_rate: value.max_rate, + max_change_rate: value.max_change_rate, + } } } -} -impl From for protos::cosmos::staking::v1beta1::CommissionRates { - fn from(value: CommissionRates) -> Self { - Self { - rate: value.rate, - max_rate: value.max_rate, - max_change_rate: value.max_change_rate, + impl From for protos::cosmos::staking::v1beta1::CommissionRates { + fn from(value: CommissionRates) -> Self { + Self { + rate: value.rate, + max_rate: value.max_rate, + max_change_rate: value.max_change_rate, + } } } } diff --git a/lib/unionlabs/src/cosmos/staking/description.rs b/lib/unionlabs/src/cosmos/staking/description.rs index d83809f7e0..e92824343f 100644 --- a/lib/unionlabs/src/cosmos/staking/description.rs +++ b/lib/unionlabs/src/cosmos/staking/description.rs @@ -14,26 +14,31 @@ pub struct Description { pub details: String, } -impl From for Description { - fn from(value: protos::cosmos::staking::v1beta1::Description) -> Self { - Self { - moniker: value.moniker, - identity: value.identity, - website: value.website, - security_contact: value.security_contact, - details: value.details, +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::staking::description::Description; + + impl From for Description { + fn from(value: protos::cosmos::staking::v1beta1::Description) -> Self { + Self { + moniker: value.moniker, + identity: value.identity, + website: value.website, + security_contact: value.security_contact, + details: value.details, + } } } -} -impl From for protos::cosmos::staking::v1beta1::Description { - fn from(value: Description) -> Self { - Self { - moniker: value.moniker, - identity: value.identity, - website: value.website, - security_contact: value.security_contact, - details: value.details, + impl From for protos::cosmos::staking::v1beta1::Description { + fn from(value: Description) -> Self { + Self { + moniker: value.moniker, + identity: value.identity, + website: value.website, + security_contact: value.security_contact, + details: value.details, + } } } } diff --git a/lib/unionlabs/src/cosmos/staking/query_validators_response.rs b/lib/unionlabs/src/cosmos/staking/query_validators_response.rs index df7bf47b9f..d277325b84 100644 --- a/lib/unionlabs/src/cosmos/staking/query_validators_response.rs +++ b/lib/unionlabs/src/cosmos/staking/query_validators_response.rs @@ -1,9 +1,6 @@ use macros::model; -use crate::cosmos::{ - base::query::page_response::PageResponse, - staking::validator::{TryFromValidatorError, Validator}, -}; +use crate::cosmos::{base::query::page_response::PageResponse, staking::validator::Validator}; #[model(proto(raw(protos::cosmos::staking::v1beta1::QueryValidatorsResponse), into))] pub struct QueryValidatorsResponse { @@ -11,27 +8,34 @@ pub struct QueryValidatorsResponse { pub pagination: Option, } -#[derive(Debug)] -pub enum TryFromQueryValidatorsResponseError { - Validators(TryFromValidatorError), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::staking::{ + query_validators_response::QueryValidatorsResponse, validator::proto::TryFromValidatorError, + }; + + #[derive(Debug)] + pub enum TryFromQueryValidatorsResponseError { + Validators(TryFromValidatorError), + } -impl TryFrom - for QueryValidatorsResponse -{ - type Error = TryFromQueryValidatorsResponseError; + impl TryFrom + for QueryValidatorsResponse + { + type Error = TryFromQueryValidatorsResponseError; - fn try_from( - value: protos::cosmos::staking::v1beta1::QueryValidatorsResponse, - ) -> Result { - Ok(Self { - validators: value - .validators - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromQueryValidatorsResponseError::Validators)?, - pagination: value.pagination.map(Into::into), - }) + fn try_from( + value: protos::cosmos::staking::v1beta1::QueryValidatorsResponse, + ) -> Result { + Ok(Self { + validators: value + .validators + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromQueryValidatorsResponseError::Validators)?, + pagination: value.pagination.map(Into::into), + }) + } } } diff --git a/lib/unionlabs/src/cosmos/staking/validator.rs b/lib/unionlabs/src/cosmos/staking/validator.rs index 99e274c97b..8d8030781a 100644 --- a/lib/unionlabs/src/cosmos/staking/validator.rs +++ b/lib/unionlabs/src/cosmos/staking/validator.rs @@ -1,18 +1,11 @@ -use core::num::TryFromIntError; - use macros::model; use crate::{ cosmos::{ - crypto::{AnyPubKey, TryFromAnyPubKeyError}, - staking::{ - bond_status::BondStatus, - commission::{Commission, TryFromCommissionError}, - description::Description, - }, + crypto::AnyPubKey, + staking::{bond_status::BondStatus, commission::Commission, description::Description}, }, - errors::{required, MissingField, UnknownEnumVariant}, - google::protobuf::timestamp::{Timestamp, TryFromTimestampError}, + google::protobuf::timestamp::Timestamp, }; #[model(proto(raw(protos::cosmos::staking::v1beta1::Validator), into, from))] @@ -50,66 +43,82 @@ pub struct Validator { pub unbonding_ids: Vec, } -#[derive(Debug)] -pub enum TryFromValidatorError { - MissingField(MissingField), - ConsensusPubKey(TryFromAnyPubKeyError), - BondStatus(UnknownEnumVariant), - UnbondingHeight(TryFromIntError), - Commission(TryFromCommissionError), - Timestamp(TryFromTimestampError), -} +#[cfg(feature = "proto")] +pub mod proto { + use core::num::TryFromIntError; -impl TryFrom for Validator { - type Error = TryFromValidatorError; + use crate::{ + cosmos::{ + crypto::proto::TryFromAnyPubKeyError, + staking::{commission::proto::TryFromCommissionError, validator::Validator}, + }, + errors::{required, MissingField, UnknownEnumVariant}, + google::protobuf::timestamp::proto::TryFromTimestampError, + }; - fn try_from(value: protos::cosmos::staking::v1beta1::Validator) -> Result { - Ok(Self { - operator_address: value.operator_address, - consensus_pubkey: required!(value.consensus_pubkey)? - .try_into() - .map_err(TryFromValidatorError::ConsensusPubKey)?, - jailed: value.jailed, - status: value - .status - .try_into() - .map_err(TryFromValidatorError::BondStatus)?, - tokens: value.tokens, - delegator_shares: value.delegator_shares, - description: required!(value.description)?.into(), - unbonding_height: value - .unbonding_height - .try_into() - .map_err(TryFromValidatorError::UnbondingHeight)?, - unbonding_time: required!(value.unbonding_time)? - .try_into() - .map_err(TryFromValidatorError::Timestamp)?, - commission: required!(value.commission)? - .try_into() - .map_err(TryFromValidatorError::Commission)?, - min_self_delegation: value.min_self_delegation, - unbonding_on_hold_ref_count: value.unbonding_on_hold_ref_count, - unbonding_ids: value.unbonding_ids, - }) + #[derive(Debug)] + pub enum TryFromValidatorError { + MissingField(MissingField), + ConsensusPubKey(TryFromAnyPubKeyError), + BondStatus(UnknownEnumVariant), + UnbondingHeight(TryFromIntError), + Commission(TryFromCommissionError), + Timestamp(TryFromTimestampError), + } + + impl TryFrom for Validator { + type Error = TryFromValidatorError; + + fn try_from( + value: protos::cosmos::staking::v1beta1::Validator, + ) -> Result { + Ok(Self { + operator_address: value.operator_address, + consensus_pubkey: required!(value.consensus_pubkey)? + .try_into() + .map_err(TryFromValidatorError::ConsensusPubKey)?, + jailed: value.jailed, + status: value + .status + .try_into() + .map_err(TryFromValidatorError::BondStatus)?, + tokens: value.tokens, + delegator_shares: value.delegator_shares, + description: required!(value.description)?.into(), + unbonding_height: value + .unbonding_height + .try_into() + .map_err(TryFromValidatorError::UnbondingHeight)?, + unbonding_time: required!(value.unbonding_time)? + .try_into() + .map_err(TryFromValidatorError::Timestamp)?, + commission: required!(value.commission)? + .try_into() + .map_err(TryFromValidatorError::Commission)?, + min_self_delegation: value.min_self_delegation, + unbonding_on_hold_ref_count: value.unbonding_on_hold_ref_count, + unbonding_ids: value.unbonding_ids, + }) + } } -} -impl From for protos::cosmos::staking::v1beta1::Validator { - fn from(value: Validator) -> Self { - Self { - operator_address: value.operator_address, - consensus_pubkey: Some(value.consensus_pubkey.into()), - jailed: value.jailed, - status: value.status.into(), - tokens: value.tokens, - delegator_shares: value.delegator_shares, - description: Some(value.description.into()), - unbonding_height: value.unbonding_height.into(), - unbonding_time: Some(value.unbonding_time.into()), - commission: Some(value.commission.into()), - min_self_delegation: value.min_self_delegation, - unbonding_on_hold_ref_count: value.unbonding_on_hold_ref_count, - unbonding_ids: value.unbonding_ids, + impl From for protos::cosmos::staking::v1beta1::Validator { + fn from(value: Validator) -> Self { + Self { + operator_address: value.operator_address, + consensus_pubkey: Some(value.consensus_pubkey.into()), + jailed: value.jailed, + status: value.status.into(), + tokens: value.tokens, + delegator_shares: value.delegator_shares, + description: Some(value.description.into()), + unbonding_height: value.unbonding_height.into(), + unbonding_time: Some(value.unbonding_time.into()), + commission: Some(value.commission.into()), + min_self_delegation: value.min_self_delegation, + unbonding_on_hold_ref_count: value.unbonding_on_hold_ref_count, + unbonding_ids: value.unbonding_ids, + } } } } diff --git a/lib/unionlabs/src/cosmos/tx/auth_info.rs b/lib/unionlabs/src/cosmos/tx/auth_info.rs index c59702649d..a2343859ec 100644 --- a/lib/unionlabs/src/cosmos/tx/auth_info.rs +++ b/lib/unionlabs/src/cosmos/tx/auth_info.rs @@ -1,12 +1,6 @@ use macros::model; -use crate::{ - cosmos::tx::{ - fee::{Fee, TryFromFeeError}, - signer_info::{SignerInfo, TryFromSignerInfoError}, - }, - errors::{required, MissingField}, -}; +use crate::cosmos::tx::{fee::Fee, signer_info::SignerInfo}; #[model(proto(raw(protos::cosmos::tx::v1beta1::AuthInfo), into, from))] pub struct AuthInfo { @@ -14,37 +8,48 @@ pub struct AuthInfo { pub fee: Fee, } -impl From for protos::cosmos::tx::v1beta1::AuthInfo { - fn from(value: AuthInfo) -> Self { - Self { - signer_infos: value.signer_infos.into_iter().map(Into::into).collect(), - fee: Some(value.fee.into()), - ..Default::default() +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::tx::{ + auth_info::AuthInfo, fee::proto::TryFromFeeError, + signer_info::proto::TryFromSignerInfoError, + }, + errors::{required, MissingField}, + }; + + impl From for protos::cosmos::tx::v1beta1::AuthInfo { + fn from(value: AuthInfo) -> Self { + Self { + signer_infos: value.signer_infos.into_iter().map(Into::into).collect(), + fee: Some(value.fee.into()), + ..Default::default() + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromAuthInfoError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid signer info")] - SignerInfo(#[from] TryFromSignerInfoError), - #[error("invalid fee")] - Fee(#[from] TryFromFeeError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromAuthInfoError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid signer info")] + SignerInfo(#[from] TryFromSignerInfoError), + #[error("invalid fee")] + Fee(#[from] TryFromFeeError), + } -impl TryFrom for AuthInfo { - type Error = TryFromAuthInfoError; + impl TryFrom for AuthInfo { + type Error = TryFromAuthInfoError; - fn try_from(value: protos::cosmos::tx::v1beta1::AuthInfo) -> Result { - Ok(Self { - signer_infos: value - .signer_infos - .into_iter() - .map(TryInto::try_into) - .collect::>()?, - fee: required!(value.fee)?.try_into()?, - }) + fn try_from(value: protos::cosmos::tx::v1beta1::AuthInfo) -> Result { + Ok(Self { + signer_infos: value + .signer_infos + .into_iter() + .map(TryInto::try_into) + .collect::>()?, + fee: required!(value.fee)?.try_into()?, + }) + } } } diff --git a/lib/unionlabs/src/cosmos/tx/fee.rs b/lib/unionlabs/src/cosmos/tx/fee.rs index 0908674c37..96368be560 100644 --- a/lib/unionlabs/src/cosmos/tx/fee.rs +++ b/lib/unionlabs/src/cosmos/tx/fee.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::cosmos::base::coin::{Coin, TryFromCoinError}; +use crate::cosmos::base::coin::Coin; #[model(proto(raw(protos::cosmos::tx::v1beta1::Fee), into, from))] pub struct Fee { @@ -19,36 +19,41 @@ pub struct Fee { pub granter: String, } -impl From for protos::cosmos::tx::v1beta1::Fee { - fn from(value: Fee) -> Self { - Self { - amount: value.amount.into_iter().map(Into::into).collect(), - gas_limit: value.gas_limit, - payer: value.payer, - granter: value.granter, +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::{base::coin::proto::TryFromCoinError, tx::fee::Fee}; + + impl From for protos::cosmos::tx::v1beta1::Fee { + fn from(value: Fee) -> Self { + Self { + amount: value.amount.into_iter().map(Into::into).collect(), + gas_limit: value.gas_limit, + payer: value.payer, + granter: value.granter, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromFeeError { - #[error("invalid amount")] - Amount(#[from] TryFromCoinError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromFeeError { + #[error("invalid amount")] + Amount(#[from] TryFromCoinError), + } -impl TryFrom for Fee { - type Error = TryFromFeeError; + impl TryFrom for Fee { + type Error = TryFromFeeError; - fn try_from(value: protos::cosmos::tx::v1beta1::Fee) -> Result { - Ok(Self { - amount: value - .amount - .into_iter() - .map(TryInto::try_into) - .collect::>()?, - gas_limit: value.gas_limit, - payer: value.payer, - granter: value.granter, - }) + fn try_from(value: protos::cosmos::tx::v1beta1::Fee) -> Result { + Ok(Self { + amount: value + .amount + .into_iter() + .map(TryInto::try_into) + .collect::>()?, + gas_limit: value.gas_limit, + payer: value.payer, + granter: value.granter, + }) + } } } diff --git a/lib/unionlabs/src/cosmos/tx/mode_info.rs b/lib/unionlabs/src/cosmos/tx/mode_info.rs index d404d92e09..1cefb19ec2 100644 --- a/lib/unionlabs/src/cosmos/tx/mode_info.rs +++ b/lib/unionlabs/src/cosmos/tx/mode_info.rs @@ -1,10 +1,7 @@ use macros::model; -use crate::{ - cosmos::{ - crypto::multisig::compact_bit_array::CompactBitArray, tx::signing::sign_info::SignMode, - }, - errors::{required, MissingField, UnknownEnumVariant}, +use crate::cosmos::{ + crypto::multisig::compact_bit_array::CompactBitArray, tx::signing::sign_info::SignMode, }; #[model(proto(raw(protos::cosmos::tx::v1beta1::ModeInfo), into, from))] @@ -18,61 +15,71 @@ pub enum ModeInfo { }, } -impl From for protos::cosmos::tx::v1beta1::ModeInfo { - fn from(value: ModeInfo) -> Self { - protos::cosmos::tx::v1beta1::ModeInfo { - sum: Some(match value { - ModeInfo::Single { mode } => protos::cosmos::tx::v1beta1::mode_info::Sum::Single( - protos::cosmos::tx::v1beta1::mode_info::Single { mode: mode.into() }, - ), - ModeInfo::Multi { - bitarray, - mode_infos, - } => protos::cosmos::tx::v1beta1::mode_info::Sum::Multi( - protos::cosmos::tx::v1beta1::mode_info::Multi { - bitarray: Some(bitarray.into()), - mode_infos: mode_infos.into_iter().map(Into::into).collect(), - }, - ), - }), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::tx::mode_info::ModeInfo, + errors::{required, MissingField, UnknownEnumVariant}, + }; + + impl From for protos::cosmos::tx::v1beta1::ModeInfo { + fn from(value: ModeInfo) -> Self { + protos::cosmos::tx::v1beta1::ModeInfo { + sum: Some(match value { + ModeInfo::Single { mode } => { + protos::cosmos::tx::v1beta1::mode_info::Sum::Single( + protos::cosmos::tx::v1beta1::mode_info::Single { mode: mode.into() }, + ) + } + ModeInfo::Multi { + bitarray, + mode_infos, + } => protos::cosmos::tx::v1beta1::mode_info::Sum::Multi( + protos::cosmos::tx::v1beta1::mode_info::Multi { + bitarray: Some(bitarray.into()), + mode_infos: mode_infos.into_iter().map(Into::into).collect(), + }, + ), + }), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromModeInfoError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid single mode")] - SingleMode(#[source] UnknownEnumVariant), - #[error("invalid multi mode info")] - MultiModeInfo(#[source] Box), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromModeInfoError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid single mode")] + SingleMode(#[source] UnknownEnumVariant), + #[error("invalid multi mode info")] + MultiModeInfo(#[source] Box), + } -impl TryFrom for ModeInfo { - type Error = TryFromModeInfoError; + impl TryFrom for ModeInfo { + type Error = TryFromModeInfoError; - fn try_from(value: protos::cosmos::tx::v1beta1::ModeInfo) -> Result { - Ok(match required!(value.sum)? { - protos::cosmos::tx::v1beta1::mode_info::Sum::Single( - protos::cosmos::tx::v1beta1::mode_info::Single { mode }, - ) => Self::Single { - mode: mode.try_into().map_err(TryFromModeInfoError::SingleMode)?, - }, - protos::cosmos::tx::v1beta1::mode_info::Sum::Multi( - protos::cosmos::tx::v1beta1::mode_info::Multi { - bitarray, - mode_infos, + fn try_from(value: protos::cosmos::tx::v1beta1::ModeInfo) -> Result { + Ok(match required!(value.sum)? { + protos::cosmos::tx::v1beta1::mode_info::Sum::Single( + protos::cosmos::tx::v1beta1::mode_info::Single { mode }, + ) => Self::Single { + mode: mode.try_into().map_err(TryFromModeInfoError::SingleMode)?, }, - ) => Self::Multi { - bitarray: bitarray.ok_or(MissingField("bitarray"))?.into(), - mode_infos: mode_infos - .into_iter() - .map(TryInto::try_into) - .collect::>() - .map_err(Box::new) - .map_err(TryFromModeInfoError::MultiModeInfo)?, - }, - }) + protos::cosmos::tx::v1beta1::mode_info::Sum::Multi( + protos::cosmos::tx::v1beta1::mode_info::Multi { + bitarray, + mode_infos, + }, + ) => Self::Multi { + bitarray: required!(bitarray)?.into(), + mode_infos: mode_infos + .into_iter() + .map(TryInto::try_into) + .collect::>() + .map_err(Box::new) + .map_err(TryFromModeInfoError::MultiModeInfo)?, + }, + }) + } } } diff --git a/lib/unionlabs/src/cosmos/tx/sign_doc.rs b/lib/unionlabs/src/cosmos/tx/sign_doc.rs index 0b2ae57fbf..3fa7915c32 100644 --- a/lib/unionlabs/src/cosmos/tx/sign_doc.rs +++ b/lib/unionlabs/src/cosmos/tx/sign_doc.rs @@ -16,24 +16,29 @@ pub struct SignDoc { pub account_number: u64, } -impl From for protos::cosmos::tx::v1beta1::SignDoc { - fn from(value: SignDoc) -> Self { - Self { - body_bytes: value.body_bytes, - auth_info_bytes: value.auth_info_bytes, - chain_id: value.chain_id, - account_number: value.account_number, +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::tx::sign_doc::SignDoc; + + impl From for protos::cosmos::tx::v1beta1::SignDoc { + fn from(value: SignDoc) -> Self { + Self { + body_bytes: value.body_bytes, + auth_info_bytes: value.auth_info_bytes, + chain_id: value.chain_id, + account_number: value.account_number, + } } } -} -impl From for SignDoc { - fn from(value: protos::cosmos::tx::v1beta1::SignDoc) -> Self { - Self { - body_bytes: value.body_bytes, - auth_info_bytes: value.auth_info_bytes, - chain_id: value.chain_id, - account_number: value.account_number, + impl From for SignDoc { + fn from(value: protos::cosmos::tx::v1beta1::SignDoc) -> Self { + Self { + body_bytes: value.body_bytes, + auth_info_bytes: value.auth_info_bytes, + chain_id: value.chain_id, + account_number: value.account_number, + } } } } diff --git a/lib/unionlabs/src/cosmos/tx/signer_info.rs b/lib/unionlabs/src/cosmos/tx/signer_info.rs index de1b60796a..e15ad0cb11 100644 --- a/lib/unionlabs/src/cosmos/tx/signer_info.rs +++ b/lib/unionlabs/src/cosmos/tx/signer_info.rs @@ -1,12 +1,6 @@ use macros::model; -use crate::{ - cosmos::{ - crypto::{AnyPubKey, TryFromAnyPubKeyError}, - tx::mode_info::{ModeInfo, TryFromModeInfoError}, - }, - errors::{required, MissingField}, -}; +use crate::cosmos::{crypto::AnyPubKey, tx::mode_info::ModeInfo}; #[model(proto(raw(protos::cosmos::tx::v1beta1::SignerInfo), into, from))] pub struct SignerInfo { @@ -15,34 +9,45 @@ pub struct SignerInfo { pub sequence: u64, } -impl From for protos::cosmos::tx::v1beta1::SignerInfo { - fn from(value: SignerInfo) -> Self { - Self { - public_key: value.public_key.map(Into::into), - mode_info: Some(value.mode_info.into()), - sequence: value.sequence, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::{ + crypto::proto::TryFromAnyPubKeyError, + tx::{mode_info::proto::TryFromModeInfoError, signer_info::SignerInfo}, + }, + errors::{required, MissingField}, + }; + + impl From for protos::cosmos::tx::v1beta1::SignerInfo { + fn from(value: SignerInfo) -> Self { + Self { + public_key: value.public_key.map(Into::into), + mode_info: Some(value.mode_info.into()), + sequence: value.sequence, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromSignerInfoError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid public key")] - PublicKey(#[from] TryFromAnyPubKeyError), - #[error("invalid mode info")] - ModeInfo(#[from] TryFromModeInfoError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromSignerInfoError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid public key")] + PublicKey(#[from] TryFromAnyPubKeyError), + #[error("invalid mode info")] + ModeInfo(#[from] TryFromModeInfoError), + } -impl TryFrom for SignerInfo { - type Error = TryFromSignerInfoError; + impl TryFrom for SignerInfo { + type Error = TryFromSignerInfoError; - fn try_from(value: protos::cosmos::tx::v1beta1::SignerInfo) -> Result { - Ok(Self { - public_key: value.public_key.map(TryInto::try_into).transpose()?, - mode_info: required!(value.mode_info)?.try_into()?, - sequence: value.sequence, - }) + fn try_from(value: protos::cosmos::tx::v1beta1::SignerInfo) -> Result { + Ok(Self { + public_key: value.public_key.map(TryInto::try_into).transpose()?, + mode_info: required!(value.mode_info)?.try_into()?, + sequence: value.sequence, + }) + } } } diff --git a/lib/unionlabs/src/cosmos/tx/tx.rs b/lib/unionlabs/src/cosmos/tx/tx.rs index a520c6d480..97ededbc5a 100644 --- a/lib/unionlabs/src/cosmos/tx/tx.rs +++ b/lib/unionlabs/src/cosmos/tx/tx.rs @@ -1,12 +1,6 @@ use macros::model; -use crate::{ - cosmos::tx::{ - auth_info::{AuthInfo, TryFromAuthInfoError}, - tx_body::TxBody, - }, - errors::{required, MissingField}, -}; +use crate::cosmos::tx::{auth_info::AuthInfo, tx_body::TxBody}; #[model(proto(raw(protos::cosmos::tx::v1beta1::Tx), into, from))] pub struct Tx { @@ -15,32 +9,40 @@ pub struct Tx { pub signatures: Vec>, } -impl From for protos::cosmos::tx::v1beta1::Tx { - fn from(value: Tx) -> Self { - Self { - body: Some(value.body.into()), - auth_info: Some(value.auth_info.into()), - signatures: value.signatures, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::tx::{auth_info::proto::TryFromAuthInfoError, tx::Tx}, + errors::{required, MissingField}, + }; + + impl From for protos::cosmos::tx::v1beta1::Tx { + fn from(value: Tx) -> Self { + Self { + body: Some(value.body.into()), + auth_info: Some(value.auth_info.into()), + signatures: value.signatures, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromTxError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid auth info")] - AuthInfo(#[from] TryFromAuthInfoError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromTxError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid auth info")] + AuthInfo(#[from] TryFromAuthInfoError), + } -impl TryFrom for Tx { - type Error = TryFromTxError; + impl TryFrom for Tx { + type Error = TryFromTxError; - fn try_from(value: protos::cosmos::tx::v1beta1::Tx) -> Result { - Ok(Self { - body: required!(value.body)?.into(), - auth_info: required!(value.auth_info)?.try_into()?, - signatures: value.signatures, - }) + fn try_from(value: protos::cosmos::tx::v1beta1::Tx) -> Result { + Ok(Self { + body: required!(value.body)?.into(), + auth_info: required!(value.auth_info)?.try_into()?, + signatures: value.signatures, + }) + } } } diff --git a/lib/unionlabs/src/cosmos/tx/tx_body.rs b/lib/unionlabs/src/cosmos/tx/tx_body.rs index 31c92b5bbe..7109c310cf 100644 --- a/lib/unionlabs/src/cosmos/tx/tx_body.rs +++ b/lib/unionlabs/src/cosmos/tx/tx_body.rs @@ -11,42 +11,47 @@ pub struct TxBody { pub non_critical_extension_options: Vec, } -impl From for protos::cosmos::tx::v1beta1::TxBody { - fn from(value: TxBody) -> Self { - Self { - messages: value.messages.into_iter().map(Into::into).collect(), - memo: value.memo, - timeout_height: value.timeout_height, - extension_options: value - .extension_options - .into_iter() - .map(Into::into) - .collect(), - non_critical_extension_options: value - .non_critical_extension_options - .into_iter() - .map(Into::into) - .collect(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::tx::tx_body::TxBody; + + impl From for protos::cosmos::tx::v1beta1::TxBody { + fn from(value: TxBody) -> Self { + Self { + messages: value.messages.into_iter().map(Into::into).collect(), + memo: value.memo, + timeout_height: value.timeout_height, + extension_options: value + .extension_options + .into_iter() + .map(Into::into) + .collect(), + non_critical_extension_options: value + .non_critical_extension_options + .into_iter() + .map(Into::into) + .collect(), + } } } -} -impl From for TxBody { - fn from(value: protos::cosmos::tx::v1beta1::TxBody) -> Self { - Self { - messages: value.messages.into_iter().map(Into::into).collect(), - memo: value.memo, - timeout_height: value.timeout_height, - extension_options: value - .extension_options - .into_iter() - .map(Into::into) - .collect(), - non_critical_extension_options: value - .non_critical_extension_options - .into_iter() - .map(Into::into) - .collect(), + impl From for TxBody { + fn from(value: protos::cosmos::tx::v1beta1::TxBody) -> Self { + Self { + messages: value.messages.into_iter().map(Into::into).collect(), + memo: value.memo, + timeout_height: value.timeout_height, + extension_options: value + .extension_options + .into_iter() + .map(Into::into) + .collect(), + non_critical_extension_options: value + .non_critical_extension_options + .into_iter() + .map(Into::into) + .collect(), + } } } } diff --git a/lib/unionlabs/src/cosmos/tx/tx_raw.rs b/lib/unionlabs/src/cosmos/tx/tx_raw.rs index 50984bfb85..a3f530a509 100644 --- a/lib/unionlabs/src/cosmos/tx/tx_raw.rs +++ b/lib/unionlabs/src/cosmos/tx/tx_raw.rs @@ -14,22 +14,27 @@ pub struct TxRaw { pub signatures: Vec>, } -impl From for protos::cosmos::tx::v1beta1::TxRaw { - fn from(value: TxRaw) -> Self { - Self { - body_bytes: value.body_bytes, - auth_info_bytes: value.auth_info_bytes, - signatures: value.signatures, +#[cfg(feature = "proto")] +pub mod proto { + use crate::cosmos::tx::tx_raw::TxRaw; + + impl From for protos::cosmos::tx::v1beta1::TxRaw { + fn from(value: TxRaw) -> Self { + Self { + body_bytes: value.body_bytes, + auth_info_bytes: value.auth_info_bytes, + signatures: value.signatures, + } } } -} -impl From for TxRaw { - fn from(value: protos::cosmos::tx::v1beta1::TxRaw) -> Self { - Self { - body_bytes: value.body_bytes, - auth_info_bytes: value.auth_info_bytes, - signatures: value.signatures, + impl From for TxRaw { + fn from(value: protos::cosmos::tx::v1beta1::TxRaw) -> Self { + Self { + body_bytes: value.body_bytes, + auth_info_bytes: value.auth_info_bytes, + signatures: value.signatures, + } } } } diff --git a/lib/unionlabs/src/cosmwasm/wasm/msg_execute_contract.rs b/lib/unionlabs/src/cosmwasm/wasm/msg_execute_contract.rs index b0d2525343..e7444b42ae 100644 --- a/lib/unionlabs/src/cosmwasm/wasm/msg_execute_contract.rs +++ b/lib/unionlabs/src/cosmwasm/wasm/msg_execute_contract.rs @@ -3,7 +3,7 @@ use macros::model; use crate::cosmos::base::coin::Coin; /// `MsgExecuteContract` submits the given message data to a smart contract -#[model(proto(raw(protos::cosmwasm::wasm::v1::MsgExecuteContract), from))] +#[model(proto(raw(protos::cosmwasm::wasm::v1::MsgExecuteContract)))] pub struct MsgExecuteContract { /// Sender is the that actor that signed the messages // TODO: bech32 encoded address @@ -16,14 +16,3 @@ pub struct MsgExecuteContract { /// Funds coins that are transferred to the contract on execution pub funds: Vec, } - -impl From for protos::cosmwasm::wasm::v1::MsgExecuteContract { - fn from(value: MsgExecuteContract) -> Self { - Self { - sender: value.sender, - contract: value.contract, - msg: value.msg, - funds: value.funds.into_iter().map(Into::into).collect(), - } - } -} diff --git a/lib/unionlabs/src/cosmwasm/wasm/union/custom_query.rs b/lib/unionlabs/src/cosmwasm/wasm/union/custom_query.rs index f5c18c3a4e..baa9bfa6f5 100644 --- a/lib/unionlabs/src/cosmwasm/wasm/union/custom_query.rs +++ b/lib/unionlabs/src/cosmwasm/wasm/union/custom_query.rs @@ -2,7 +2,7 @@ use core::fmt::Debug; use cosmwasm_std::{Binary, Deps, QueryRequest}; -use crate::{bls::BlsPublicKey, ibc::core::client::height::Height, ics24::Path}; +use crate::hash::H384; #[derive(thiserror::Error, Debug, PartialEq, Clone)] pub enum Error { @@ -13,11 +13,11 @@ pub enum Error { AggregatePublicKeys(String), #[error("invalid public key is returned from `aggregate_public_key`")] InvalidAggregatePublicKey, - #[error("abci query for {path} failed: {err}")] - ABCI { path: Path, err: String }, + #[error("abci query for `{path}` failed: {err}")] + Abci { path: String, err: String }, } -#[derive(serde::Serialize, serde::Deserialize, Clone)] +#[derive(Clone, serde::Serialize, serde::Deserialize)] #[serde(rename_all = "snake_case")] pub enum UnionCustomQuery { AggregateVerify { @@ -51,8 +51,8 @@ pub fn query_fast_aggregate_verify( pub fn query_aggregate_public_keys( deps: Deps, - public_keys: Vec, -) -> Result { + public_keys: Vec, +) -> Result { let request: QueryRequest = QueryRequest::Custom(UnionCustomQuery::Aggregate { public_keys: public_keys.into_iter().map(|x| Binary(x.into())).collect(), @@ -70,6 +70,7 @@ pub fn query_aggregate_public_keys( #[cfg(feature = "stargate")] use { + crate::ibc::core::client::height::Height, crate::{ encoding::{Decode, DecodeAs, Proto}, google::protobuf::any::Any, @@ -82,12 +83,12 @@ use { #[allow(clippy::missing_panics_doc)] #[cfg(feature = "stargate")] -pub fn query_ibc_abci(deps: Deps, env: &Env, path: Path) -> Result +pub fn query_ibc_abci(deps: Deps, env: &Env, path: String) -> Result where Any: Decode, { let query = protos::cosmos::base::tendermint::v1beta1::AbciQueryRequest { - data: path.clone().to_string().into_bytes(), + data: path.clone().into_bytes(), path: "store/ibc/key".to_string(), height: env .block @@ -101,28 +102,28 @@ where path: "/cosmos.base.tendermint.v1beta1.Service/ABCIQuery".into(), data: query.encode_to_vec().into(), }) - .map_err(|e| Error::ABCI { + .map_err(|e| Error::Abci { path: path.clone(), err: format!("{e:?}"), })?; let abci_response_data = match deps.querier.raw_query(&raw) { - SystemResult::Err(system_err) => Err(Error::ABCI { + SystemResult::Err(system_err) => Err(Error::Abci { path: path.clone(), err: format!("Querier system error: {system_err}"), }), - SystemResult::Ok(ContractResult::Err(contract_err)) => Err(Error::ABCI { + SystemResult::Ok(ContractResult::Err(contract_err)) => Err(Error::Abci { path: path.clone(), err: format!("Querier contract error: {contract_err}"), }), SystemResult::Ok(ContractResult::Ok(value)) => Ok(value), }?; let abci_response = - AbciQueryResponse::decode(abci_response_data.as_ref()).map_err(|e| Error::ABCI { + AbciQueryResponse::decode(abci_response_data.as_ref()).map_err(|e| Error::Abci { path: path.clone(), err: format!("AbciQueryResponse decoding: {e:?}"), })?; let Any(value) = - Any::::decode_as::(&abci_response.value).map_err(|e| Error::ABCI { + Any::::decode_as::(&abci_response.value).map_err(|e| Error::Abci { path, err: format!("AnyProto decoding: {e:?}"), })?; @@ -134,22 +135,17 @@ where pub fn query_consensus_state( deps: Deps, env: &Env, - // TODO: Use ClientId here - client_id: String, + client_id: crate::id::ClientId, + client_type: &str, height: Height, ) -> Result where Any: Decode, { - use crate::validated::ValidateT; - query_ibc_abci::( deps, env, - Path::ClientConsensusState(ClientConsensusStatePath { - client_id: client_id.validate().expect("invalid client id"), - height, - }), + ClientConsensusStatePath { client_id, height }.ics24_commitment_path(client_type), ) } @@ -158,19 +154,15 @@ where pub fn query_client_state( deps: Deps, env: &Env, - // TODO: Use ClientId here - client_id: String, + client_id: crate::id::ClientId, + client_type: &str, ) -> Result where Any: Decode, { - use crate::validated::ValidateT; - query_ibc_abci::( deps, env, - Path::ClientState(ClientStatePath { - client_id: client_id.validate().expect("invalid client id"), - }), + ClientStatePath { client_id }.ics24_commitment_path(client_type), ) } diff --git a/lib/unionlabs/src/encoding.rs b/lib/unionlabs/src/encoding.rs index 373dd1f254..5a7b410847 100644 --- a/lib/unionlabs/src/encoding.rs +++ b/lib/unionlabs/src/encoding.rs @@ -2,21 +2,28 @@ use core::fmt::Debug; pub trait Encoding: Send + Sync {} +#[cfg(feature = "ethabi")] pub enum EthAbi {} +#[cfg(feature = "ethabi")] impl Encoding for EthAbi {} +#[cfg(feature = "proto")] pub enum Proto {} +#[cfg(feature = "proto")] impl Encoding for Proto {} +// TODO: Feature gate this +#[cfg(feature = "ssz")] pub enum Ssz {} +#[cfg(feature = "ssz")] impl Encoding for Ssz {} +#[cfg(feature = "json")] pub enum Json {} +#[cfg(feature = "json")] impl Encoding for Json {} -pub enum Bcs {} -impl Encoding for Bcs {} - +#[cfg(feature = "json")] impl Encode for T where T: serde::Serialize, @@ -26,6 +33,7 @@ where } } +#[cfg(feature = "json")] impl Decode for T where T: serde::de::DeserializeOwned, @@ -37,9 +45,17 @@ where } } +#[cfg(feature = "json")] static_assertions::assert_impl_all!(u8: Encode); +#[cfg(feature = "json")] static_assertions::assert_impl_all!(&u8: Encode); +#[cfg(feature = "bcs")] +pub enum Bcs {} +#[cfg(feature = "bcs")] +impl Encoding for Bcs {} + +#[cfg(feature = "bcs")] impl Encode for T where T: serde::Serialize, @@ -49,6 +65,7 @@ where } } +#[cfg(feature = "bcs")] impl Decode for T where T: serde::de::DeserializeOwned, @@ -60,7 +77,9 @@ where } } +#[cfg(feature = "bcs")] static_assertions::assert_impl_all!(u8: Encode); +#[cfg(feature = "bcs")] static_assertions::assert_impl_all!(&u8: Encode); pub trait Encode: Sized { diff --git a/lib/unionlabs/src/errors.rs b/lib/unionlabs/src/errors.rs index b604b05225..9006b09611 100644 --- a/lib/unionlabs/src/errors.rs +++ b/lib/unionlabs/src/errors.rs @@ -5,6 +5,7 @@ use core::fmt::Debug; pub struct UnknownEnumVariant(pub T); /// A protobuf field was none unexpectedly. +#[cfg(feature = "proto")] #[derive(Debug, Clone, PartialEq, thiserror::Error)] #[error("missing field `{0}`")] pub struct MissingField(pub &'static str); @@ -12,22 +13,23 @@ pub struct MissingField(pub &'static str); /// For fields that are "fake options" from prost, for use in `TryFrom<::Proto>`. /// /// `Self::Error` is expected to have a `MissingField(`[`MissingField`]`)` variant. +#[cfg(feature = "proto")] macro_rules! required { ($struct_var:ident.$field:ident) => { $struct_var .$field - .ok_or(::MissingField(MissingField(stringify!( - $field - )))) + .ok_or(::MissingField(crate::errors::MissingField( + stringify!($field), + ))) }; ($field:ident) => { - $field.ok_or(::MissingField(MissingField(stringify!( - $field - )))) + $field.ok_or(::MissingField(crate::errors::MissingField( + stringify!($field), + ))) }; } -// https://stackoverflow.com/questions/26731243/how-do-i-use-a-macro-across-module-files +#[cfg(feature = "proto")] pub(crate) use required; // Expected one length, but found another. @@ -41,15 +43,15 @@ pub struct InvalidLength { #[derive(Debug, Clone, PartialEq, Eq, derive_more::Display)] pub enum ExpectedLength { - #[display(fmt = "exactly {_0}")] + #[display("exactly {_0}")] Exact(usize), - #[display(fmt = "less than {_0}")] + #[display("less than {_0}")] LessThan(usize), - #[display(fmt = "between ({_0}, {_1})")] + #[display("between ({_0}, {_1})")] Between(usize, usize), - #[display(fmt = "greater than or equal to ({_0})")] + #[display("greater than or equal to ({_0})")] Gte(usize), - #[display(fmt = "either {_0} or {_1}")] + #[display("either {_0} or {_1}")] Either(usize, usize), } diff --git a/lib/unionlabs/src/ethereum.rs b/lib/unionlabs/src/ethereum.rs index 0ae8da5295..1feef3ede7 100644 --- a/lib/unionlabs/src/ethereum.rs +++ b/lib/unionlabs/src/ethereum.rs @@ -26,8 +26,8 @@ pub const IBC_HANDLER_COMMITMENTS_SLOT: U256 = U256::from_limbs([0, 0, 0, 0]); /// /// key: `keccak256(keccak256(abi.encode_packed(path)) || slot)` #[must_use = "calculating the commitment key has no effect"] -pub fn ibc_commitment_key(path: &str, slot: U256) -> U256 { - Slot::Mapping(&Slot::Offset(slot), MappingKey::Bytes32(keccak256(path))).slot() +pub fn ibc_commitment_key(key: H256, slot: U256) -> U256 { + Slot::Mapping(&Slot::Offset(slot), MappingKey::Bytes32(keccak256(key))).slot() } hex_string_array_wrapper! { @@ -37,20 +37,8 @@ hex_string_array_wrapper! { pub struct Domain(pub [u8; 32]); } -#[rustfmt::skip] impl DomainType { - pub const BEACON_PROPOSER: Self = Self(hex!("00000000")); - pub const BEACON_ATTESTER: Self = Self(hex!("01000000")); - pub const RANDAO: Self = Self(hex!("02000000")); - pub const DEPOSIT: Self = Self(hex!("03000000")); - pub const VOLUNTARY_EXIT: Self = Self(hex!("04000000")); - pub const SELECTION_PROOF: Self = Self(hex!("05000000")); - pub const AGGREGATE_AND_PROOF: Self = Self(hex!("06000000")); - pub const SYNC_COMMITTEE: Self = Self(hex!("07000000")); - pub const SYNC_COMMITTEE_SELECTION_PROOF: Self = Self(hex!("08000000")); - pub const CONTRIBUTION_AND_PROOF: Self = Self(hex!("09000000")); - pub const BLS_TO_EXECUTION_CHANGE: Self = Self(hex!("0A000000")); - pub const APPLICATION_MASK: Self = Self(hex!("00000001")); + pub const SYNC_COMMITTEE: Self = Self(hex!("07000000")); } #[cfg(test)] @@ -58,7 +46,7 @@ mod tests { use hex_literal::hex; use super::*; - use crate::{ics24::ConnectionPath, validated::ValidateT}; + use crate::{ics24::ConnectionPath, id::ConnectionId}; #[test] fn commitment_key() { @@ -67,14 +55,14 @@ mod tests { U256::from_be_bytes(hex!( "55c4893838cf8a468bfdb0c63e25a4c924d9b7ad283fc335d5f527d29b2fcfc7" )), - "connection-100", + ConnectionId::new(100), 0, ), ( U256::from_be_bytes(hex!( "f39538e1f0ca1c5f5ecdf1bb05f67c173f2d0f75b41fbb5be884f6aab2ebae91" )), - "connection-1", + ConnectionId::new(1), 5, ), ]; @@ -82,10 +70,7 @@ mod tests { for (expected, connection_id, slot) in commitments { assert_eq!( ibc_commitment_key( - &ConnectionPath { - connection_id: connection_id.to_owned().validate().unwrap() - } - .to_string(), + ConnectionPath { connection_id }.commitments_key(), U256::from(slot), ), expected diff --git a/lib/unionlabs/src/ethereum/beacon.rs b/lib/unionlabs/src/ethereum/beacon.rs index 1d12c549f9..442c372f3f 100644 --- a/lib/unionlabs/src/ethereum/beacon.rs +++ b/lib/unionlabs/src/ethereum/beacon.rs @@ -25,6 +25,7 @@ pub mod voluntary_exit; pub mod withdrawal; #[cfg(test)] +// #[cfg(feature = "ssz")] mod tests { use core::str::FromStr; @@ -132,13 +133,8 @@ mod tests { dbg!(U256::from_str("77").unwrap()); assert_eq!( - finality_update - .finalized_header - .execution - .base_fee_per_gas - .0 - .as_u128(), - 77 + finality_update.finalized_header.execution.base_fee_per_gas, + U256::from(77) ); serde_json::from_str::>(r#"{"sync_committee_bits":"0xffffffff","sync_committee_signature":"0xb13181bcd13a1e9450452290926985eea1b005a11310c69487f646980f84b3597fbd09d9406093f0cf918e2d6304291406330abb3e90b0d4406e1f902cc49e2faea2df7f6311069d438b4fc23466fe3436bf53caa39461e18fb0b236d446c5a0"}"#).unwrap(); diff --git a/lib/unionlabs/src/ethereum/beacon/attestation.rs b/lib/unionlabs/src/ethereum/beacon/attestation.rs index 56d9b3288e..4afe7e6a39 100644 --- a/lib/unionlabs/src/ethereum/beacon/attestation.rs +++ b/lib/unionlabs/src/ethereum/beacon/attestation.rs @@ -1,25 +1,27 @@ use macros::model; -use ssz::{types::BitList, Ssz}; - -use crate::{ - bls::BlsSignature, - ethereum::{beacon::attestation_data::AttestationData, config::MAX_VALIDATORS_PER_COMMITTEE}, +#[cfg(feature = "ssz")] +use { + crate::ethereum::config::MAX_VALIDATORS_PER_COMMITTEE, + ssz::{types::BitList, Ssz}, }; +use crate::{ethereum::beacon::attestation_data::AttestationData, hash::H768}; + /// +#[cfg(feature = "ssz")] #[model] #[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct Attestation { pub aggregation_bits: BitList, pub data: AttestationData, - pub signature: BlsSignature, + pub signature: H768, } #[model] pub struct UnboundedAttestation { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] pub aggregation_bits: Vec, pub data: AttestationData, - pub signature: BlsSignature, + pub signature: H768, } diff --git a/lib/unionlabs/src/ethereum/beacon/attestation_data.rs b/lib/unionlabs/src/ethereum/beacon/attestation_data.rs index 5523d9e494..71c79ba7aa 100644 --- a/lib/unionlabs/src/ethereum/beacon/attestation_data.rs +++ b/lib/unionlabs/src/ethereum/beacon/attestation_data.rs @@ -1,15 +1,14 @@ use macros::model; -use ssz::Ssz; use crate::{ethereum::beacon::checkpoint::Checkpoint, hash::H256}; /// #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct AttestationData { - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub slot: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub index: u64, /// LMD GHOST vote pub beacon_block_root: H256, diff --git a/lib/unionlabs/src/ethereum/beacon/attester_slashing.rs b/lib/unionlabs/src/ethereum/beacon/attester_slashing.rs index 0253d8a09d..1aa53ce254 100644 --- a/lib/unionlabs/src/ethereum/beacon/attester_slashing.rs +++ b/lib/unionlabs/src/ethereum/beacon/attester_slashing.rs @@ -1,15 +1,16 @@ use macros::model; -use ssz::Ssz; +use crate::ethereum::beacon::indexed_attestation::UnboundedIndexedAttestation; +#[cfg(feature = "ssz")] use crate::ethereum::{ - beacon::indexed_attestation::{IndexedAttestation, UnboundedIndexedAttestation}, - config::MAX_VALIDATORS_PER_COMMITTEE, + beacon::indexed_attestation::IndexedAttestation, config::MAX_VALIDATORS_PER_COMMITTEE, }; /// +#[cfg(feature = "ssz")] #[model] -#[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[derive(::ssz::Ssz)] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct AttesterSlashing { pub attestation_1: IndexedAttestation, pub attestation_2: IndexedAttestation, diff --git a/lib/unionlabs/src/ethereum/beacon/beacon_block.rs b/lib/unionlabs/src/ethereum/beacon/beacon_block.rs index 62d018f012..5d74bec588 100644 --- a/lib/unionlabs/src/ethereum/beacon/beacon_block.rs +++ b/lib/unionlabs/src/ethereum/beacon/beacon_block.rs @@ -1,25 +1,30 @@ use macros::model; -use ssz::Ssz; - -use crate::{ - ethereum::{ - beacon::beacon_block_body::{BeaconBlockBody, UnboundedBeaconBlockBody}, - config::{ - BYTES_PER_LOGS_BLOOM, DEPOSIT_CONTRACT_TREE_DEPTH, MAX_ATTESTATIONS, - MAX_ATTESTER_SLASHINGS, MAX_BLOB_COMMITMENTS_PER_BLOCK, MAX_BLS_TO_EXECUTION_CHANGES, - MAX_BYTES_PER_TRANSACTION, MAX_DEPOSITS, MAX_EXTRA_DATA_BYTES, MAX_PROPOSER_SLASHINGS, - MAX_TRANSACTIONS_PER_PAYLOAD, MAX_VALIDATORS_PER_COMMITTEE, MAX_VOLUNTARY_EXITS, - MAX_WITHDRAWALS_PER_PAYLOAD, SYNC_COMMITTEE_SIZE, +#[cfg(feature = "ssz")] +use { + crate::{ + ethereum::{ + beacon::beacon_block_body::BeaconBlockBody, + config::{ + BYTES_PER_LOGS_BLOOM, DEPOSIT_CONTRACT_TREE_DEPTH, MAX_ATTESTATIONS, + MAX_ATTESTER_SLASHINGS, MAX_BLOB_COMMITMENTS_PER_BLOCK, + MAX_BLS_TO_EXECUTION_CHANGES, MAX_BYTES_PER_TRANSACTION, MAX_DEPOSITS, + MAX_EXTRA_DATA_BYTES, MAX_PROPOSER_SLASHINGS, MAX_TRANSACTIONS_PER_PAYLOAD, + MAX_VALIDATORS_PER_COMMITTEE, MAX_VOLUNTARY_EXITS, MAX_WITHDRAWALS_PER_PAYLOAD, + SYNC_COMMITTEE_SIZE, + }, }, + ibc::lightclients::ethereum::beacon_block_header::BeaconBlockHeader, }, - hash::H256, - ibc::lightclients::ethereum::beacon_block_header::BeaconBlockHeader, + ssz::Ssz, }; +use crate::{ethereum::beacon::beacon_block_body::UnboundedBeaconBlockBody, hash::H256}; + /// +#[cfg(feature = "ssz")] #[model] #[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct BeaconBlock< C: MAX_PROPOSER_SLASHINGS + MAX_VALIDATORS_PER_COMMITTEE @@ -37,15 +42,16 @@ pub struct BeaconBlock< + MAX_BLOB_COMMITMENTS_PER_BLOCK + SYNC_COMMITTEE_SIZE, > { - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub slot: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub proposer_index: u64, pub parent_root: H256, pub state_root: H256, pub body: BeaconBlockBody, } +#[cfg(feature = "ssz")] impl< C: MAX_PROPOSER_SLASHINGS + MAX_VALIDATORS_PER_COMMITTEE @@ -78,9 +84,9 @@ impl< #[model] pub struct UnboundedBeaconBlock { - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub slot: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub proposer_index: u64, pub parent_root: H256, pub state_root: H256, diff --git a/lib/unionlabs/src/ethereum/beacon/beacon_block_body.rs b/lib/unionlabs/src/ethereum/beacon/beacon_block_body.rs index adb51a5782..9c45db4e04 100644 --- a/lib/unionlabs/src/ethereum/beacon/beacon_block_body.rs +++ b/lib/unionlabs/src/ethereum/beacon/beacon_block_body.rs @@ -1,36 +1,44 @@ use macros::model; -use ssz::{types::List, Ssz}; +#[cfg(feature = "ssz")] +use { + crate::{ + ethereum::{ + beacon::{ + attestation::Attestation, attester_slashing::AttesterSlashing, deposit::Deposit, + execution_payload::ExecutionPayload, + }, + config::{ + BYTES_PER_LOGS_BLOOM, DEPOSIT_CONTRACT_TREE_DEPTH, MAX_ATTESTATIONS, + MAX_ATTESTER_SLASHINGS, MAX_BLOB_COMMITMENTS_PER_BLOCK, + MAX_BLS_TO_EXECUTION_CHANGES, MAX_BYTES_PER_TRANSACTION, MAX_DEPOSITS, + MAX_EXTRA_DATA_BYTES, MAX_PROPOSER_SLASHINGS, MAX_TRANSACTIONS_PER_PAYLOAD, + MAX_VALIDATORS_PER_COMMITTEE, MAX_VOLUNTARY_EXITS, MAX_WITHDRAWALS_PER_PAYLOAD, + SYNC_COMMITTEE_SIZE, + }, + }, + ibc::lightclients::ethereum::sync_aggregate::SyncAggregate, + }, + ssz::{types::List, Ssz}, +}; use crate::{ - bls::BlsSignature, - ethereum::{ - beacon::{ - attestation::{Attestation, UnboundedAttestation}, - attester_slashing::{AttesterSlashing, UnboundedAttesterSlashing}, - deposit::{Deposit, UnboundedDeposit}, - eth1_data::Eth1Data, - execution_payload::{ExecutionPayload, UnboundedExecutionPayload}, - kzg_commitment::KZGCommitment, - proposer_slashing::ProposerSlashing, - signed_bls_to_execution_change::SignedBlsToExecutionChange, - signed_voluntary_exit::SignedVoluntaryExit, - }, - config::{ - BYTES_PER_LOGS_BLOOM, DEPOSIT_CONTRACT_TREE_DEPTH, MAX_ATTESTATIONS, - MAX_ATTESTER_SLASHINGS, MAX_BLOB_COMMITMENTS_PER_BLOCK, MAX_BLS_TO_EXECUTION_CHANGES, - MAX_BYTES_PER_TRANSACTION, MAX_DEPOSITS, MAX_EXTRA_DATA_BYTES, MAX_PROPOSER_SLASHINGS, - MAX_TRANSACTIONS_PER_PAYLOAD, MAX_VALIDATORS_PER_COMMITTEE, MAX_VOLUNTARY_EXITS, - MAX_WITHDRAWALS_PER_PAYLOAD, SYNC_COMMITTEE_SIZE, - }, + ethereum::beacon::{ + attestation::UnboundedAttestation, attester_slashing::UnboundedAttesterSlashing, + deposit::UnboundedDeposit, eth1_data::Eth1Data, + execution_payload::UnboundedExecutionPayload, kzg_commitment::KZGCommitment, + proposer_slashing::ProposerSlashing, + signed_bls_to_execution_change::SignedBlsToExecutionChange, + signed_voluntary_exit::SignedVoluntaryExit, }, - hash::H256, - ibc::lightclients::ethereum::sync_aggregate::{SyncAggregate, UnboundedSyncAggregate}, + hash::{H256, H768}, + ibc::lightclients::ethereum::sync_aggregate::UnboundedSyncAggregate, }; /// +#[cfg(feature = "ssz")] #[model] #[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct BeaconBlockBody< C: MAX_PROPOSER_SLASHINGS + MAX_VALIDATORS_PER_COMMITTEE @@ -48,7 +56,7 @@ pub struct BeaconBlockBody< + MAX_BLOB_COMMITMENTS_PER_BLOCK + SYNC_COMMITTEE_SIZE, > { - pub randao_reveal: BlsSignature, + pub randao_reveal: H768, pub eth1_data: Eth1Data, pub graffiti: H256, pub proposer_slashings: List, @@ -64,7 +72,7 @@ pub struct BeaconBlockBody< #[model] pub struct UnboundedBeaconBlockBody { - pub randao_reveal: BlsSignature, + pub randao_reveal: H768, pub eth1_data: Eth1Data, pub graffiti: H256, pub proposer_slashings: Vec, diff --git a/lib/unionlabs/src/ethereum/beacon/bls_to_execution_change.rs b/lib/unionlabs/src/ethereum/beacon/bls_to_execution_change.rs index a9b7939e6b..ad1c204d03 100644 --- a/lib/unionlabs/src/ethereum/beacon/bls_to_execution_change.rs +++ b/lib/unionlabs/src/ethereum/beacon/bls_to_execution_change.rs @@ -1,13 +1,12 @@ use macros::model; -use ssz::Ssz; -use crate::{bls::BlsPublicKey, hash::H160}; +use crate::hash::{hash_v2::Hash, H160}; #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct BlsToExecutionChange { - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub validator_index: u64, - pub from_bls_pubkey: BlsPublicKey, + pub from_bls_pubkey: Hash<48>, pub to_execution_address: H160, } diff --git a/lib/unionlabs/src/ethereum/beacon/checkpoint.rs b/lib/unionlabs/src/ethereum/beacon/checkpoint.rs index 889eb658ae..518e7b7a9d 100644 --- a/lib/unionlabs/src/ethereum/beacon/checkpoint.rs +++ b/lib/unionlabs/src/ethereum/beacon/checkpoint.rs @@ -1,13 +1,13 @@ use macros::model; -use ssz::Ssz; + use crate::hash::H256; /// #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct Checkpoint { - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub epoch: u64, pub root: H256, } diff --git a/lib/unionlabs/src/ethereum/beacon/deposit.rs b/lib/unionlabs/src/ethereum/beacon/deposit.rs index 91cae4fd58..4dc697b4b4 100644 --- a/lib/unionlabs/src/ethereum/beacon/deposit.rs +++ b/lib/unionlabs/src/ethereum/beacon/deposit.rs @@ -1,15 +1,14 @@ use macros::model; -use ssz::{types::Vector, Ssz}; +#[cfg(feature = "ssz")] +use {crate::ethereum::config::DEPOSIT_CONTRACT_TREE_DEPTH, ssz::types::Vector}; -use crate::{ - ethereum::{beacon::deposit_data::DepositData, config::DEPOSIT_CONTRACT_TREE_DEPTH}, - hash::H256, -}; +use crate::{ethereum::beacon::deposit_data::DepositData, hash::H256}; /// +#[cfg(feature = "ssz")] #[model] -#[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[derive(::ssz::Ssz)] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct Deposit { /// Merkle path to deposit root pub proof: Vector, diff --git a/lib/unionlabs/src/ethereum/beacon/deposit_data.rs b/lib/unionlabs/src/ethereum/beacon/deposit_data.rs index dfdc925596..937706b7a4 100644 --- a/lib/unionlabs/src/ethereum/beacon/deposit_data.rs +++ b/lib/unionlabs/src/ethereum/beacon/deposit_data.rs @@ -1,19 +1,15 @@ use macros::model; -use ssz::Ssz; -use crate::{ - bls::{BlsPublicKey, BlsSignature}, - hash::H256, -}; +use crate::hash::{H256, H384, H768}; /// #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct DepositData { - pub pubkey: BlsPublicKey, + pub pubkey: H384, pub withdrawal_credentials: H256, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub amount: u64, /// Signing over `DepositMessage` - pub signature: BlsSignature, + pub signature: H768, } diff --git a/lib/unionlabs/src/ethereum/beacon/eth1_data.rs b/lib/unionlabs/src/ethereum/beacon/eth1_data.rs index fd3a2434c0..736386adc7 100644 --- a/lib/unionlabs/src/ethereum/beacon/eth1_data.rs +++ b/lib/unionlabs/src/ethereum/beacon/eth1_data.rs @@ -1,15 +1,14 @@ use macros::model; -use ssz::Ssz; + use crate::hash::H256; /// #[model] -#[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct Eth1Data { pub deposit_root: H256, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub deposit_count: u64, pub block_hash: H256, } diff --git a/lib/unionlabs/src/ethereum/beacon/execution_payload.rs b/lib/unionlabs/src/ethereum/beacon/execution_payload.rs index b277090931..f7f122de3d 100644 --- a/lib/unionlabs/src/ethereum/beacon/execution_payload.rs +++ b/lib/unionlabs/src/ethereum/beacon/execution_payload.rs @@ -1,23 +1,27 @@ use macros::model; -use ssz::{ - types::{List, Vector}, - Ssz, -}; - -use crate::{ - ethereum::{ - beacon::withdrawal::Withdrawal, - config::{ +#[cfg(feature = "ssz")] +use { + crate::{ + ethereum::config::{ BYTES_PER_LOGS_BLOOM, MAX_BYTES_PER_TRANSACTION, MAX_EXTRA_DATA_BYTES, MAX_TRANSACTIONS_PER_PAYLOAD, MAX_WITHDRAWALS_PER_PAYLOAD, }, + ibc::lightclients::ethereum::execution_payload_header::ExecutionPayloadHeader, + }, + ssz::{ + types::{List, Vector}, + Ssz, }, +}; + +use crate::{ + ethereum::beacon::withdrawal::Withdrawal, hash::{H160, H256}, - ibc::lightclients::ethereum::execution_payload_header::ExecutionPayloadHeader, uint::U256, }; /// +#[cfg(feature = "ssz")] #[model] #[derive(Ssz)] pub struct ExecutionPayload< @@ -32,36 +36,37 @@ pub struct ExecutionPayload< pub fee_recipient: H160, pub state_root: H256, pub receipts_root: H256, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] pub logs_bloom: Vector, /// 'difficulty' in the yellow paper pub prev_randao: H256, /// 'number' in the yellow paper - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub block_number: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub gas_limit: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub gas_used: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub timestamp: u64, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] pub extra_data: List, pub base_fee_per_gas: U256, /// Extra payload fields /// Hash of execution block pub block_hash: H256, - #[serde(with = "::serde_utils::hex_string_list")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string_list"))] pub transactions: List, C::MAX_TRANSACTIONS_PER_PAYLOAD>, pub withdrawals: List, // blob_gas_used: uint64 # [New in Deneb:EIP4844] - #[serde(default, with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(default, with = "::serde_utils::string"))] pub blob_gas_used: u64, // excess_blob_gas: uint64 # [New in Deneb:EIP4844] - #[serde(default, with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(default, with = "::serde_utils::string"))] pub excess_blob_gas: u64, } +#[cfg(feature = "ssz")] impl< C: BYTES_PER_LOGS_BLOOM + MAX_EXTRA_DATA_BYTES @@ -101,35 +106,35 @@ pub struct UnboundedExecutionPayload { pub fee_recipient: H160, pub state_root: H256, pub receipts_root: H256, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub logs_bloom: Vec, /// 'difficulty' in the yellow paper pub prev_randao: H256, /// 'number' in the yellow paper - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub block_number: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub gas_limit: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub gas_used: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub timestamp: u64, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub extra_data: Vec, pub base_fee_per_gas: U256, /// Extra payload fields /// Hash of execution block pub block_hash: H256, - #[serde(with = "::serde_utils::hex_string_list")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string_list"))] #[debug(wrap = ::serde_utils::fmt::DebugListAsHex)] pub transactions: Vec>, pub withdrawals: Vec, // blob_gas_used: uint64 # [New in Deneb:EIP4844] - #[serde(default, with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(default, with = "::serde_utils::string"))] pub blob_gas_used: u64, // excess_blob_gas: uint64 # [New in Deneb:EIP4844] - #[serde(default, with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(default, with = "::serde_utils::string"))] pub excess_blob_gas: u64, } diff --git a/lib/unionlabs/src/ethereum/beacon/fork_data.rs b/lib/unionlabs/src/ethereum/beacon/fork_data.rs index 99be4e8218..7dbe5051dd 100644 --- a/lib/unionlabs/src/ethereum/beacon/fork_data.rs +++ b/lib/unionlabs/src/ethereum/beacon/fork_data.rs @@ -1,10 +1,9 @@ use macros::model; -use ssz::Ssz; use crate::{ethereum::Version, hash::H256}; #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct ForkData { pub current_version: Version, pub genesis_validators_root: H256, diff --git a/lib/unionlabs/src/ethereum/beacon/genesis_data.rs b/lib/unionlabs/src/ethereum/beacon/genesis_data.rs index d59c0bfd79..e382ae5449 100644 --- a/lib/unionlabs/src/ethereum/beacon/genesis_data.rs +++ b/lib/unionlabs/src/ethereum/beacon/genesis_data.rs @@ -5,7 +5,7 @@ use crate::{ethereum::Version, hash::H256}; #[model] pub struct GenesisData { pub genesis_validators_root: H256, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub genesis_time: u64, pub genesis_fork_version: Version, } diff --git a/lib/unionlabs/src/ethereum/beacon/indexed_attestation.rs b/lib/unionlabs/src/ethereum/beacon/indexed_attestation.rs index a7928a7ad3..92b1f954d0 100644 --- a/lib/unionlabs/src/ethereum/beacon/indexed_attestation.rs +++ b/lib/unionlabs/src/ethereum/beacon/indexed_attestation.rs @@ -1,24 +1,23 @@ use macros::model; -use ssz::{types::List, Ssz}; +#[cfg(feature = "ssz")] +use {crate::ethereum::config::MAX_VALIDATORS_PER_COMMITTEE, ssz::types::List, ssz::Ssz}; -use crate::{ - bls::BlsSignature, - ethereum::{beacon::attestation_data::AttestationData, config::MAX_VALIDATORS_PER_COMMITTEE}, -}; +use crate::{ethereum::beacon::attestation_data::AttestationData, hash::H768}; /// +#[cfg(feature = "ssz")] #[model] #[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct IndexedAttestation { pub attesting_indices: List, pub data: AttestationData, - pub signature: BlsSignature, + pub signature: H768, } #[model] pub struct UnboundedIndexedAttestation { pub attesting_indices: Vec, pub data: AttestationData, - pub signature: BlsSignature, + pub signature: H768, } diff --git a/lib/unionlabs/src/ethereum/beacon/light_client_bootstrap.rs b/lib/unionlabs/src/ethereum/beacon/light_client_bootstrap.rs index fb99d3b3be..9fd9d7a726 100644 --- a/lib/unionlabs/src/ethereum/beacon/light_client_bootstrap.rs +++ b/lib/unionlabs/src/ethereum/beacon/light_client_bootstrap.rs @@ -1,31 +1,32 @@ use macros::model; -use ssz::{types::Vector, Ssz}; -use typenum::U; use crate::{ - ethereum::config::{ - consts::{floorlog2, CURRENT_SYNC_COMMITTEE_INDEX}, - BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE, - }, + ethereum::config::consts::{floorlog2, CURRENT_SYNC_COMMITTEE_INDEX}, hash::H256, ibc::lightclients::ethereum::{ - light_client_header::{LightClientHeader, UnboundedLightClientHeader}, - sync_committee::{SyncCommittee, UnboundedSyncCommittee}, + light_client_header::UnboundedLightClientHeader, sync_committee::UnboundedSyncCommittee, + }, +}; +#[cfg(feature = "ssz")] +use crate::{ + ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE}, + ibc::lightclients::ethereum::{ + light_client_header::LightClientHeader, sync_committee::SyncCommittee, }, }; /// +#[cfg(feature = "ssz")] #[model] -#[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[derive(::ssz::Ssz)] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct LightClientBootstrap< C: SYNC_COMMITTEE_SIZE + BYTES_PER_LOGS_BLOOM + MAX_EXTRA_DATA_BYTES, > { pub header: LightClientHeader, /// Current sync committee corresponding to `beacon_header.state_root` pub current_sync_committee: SyncCommittee, - // TODO: Update tree_hash to support const generic arrays - pub current_sync_committee_branch: Vector>, + pub current_sync_committee_branch: [H256; floorlog2(CURRENT_SYNC_COMMITTEE_INDEX)], } #[model] @@ -33,6 +34,5 @@ pub struct UnboundedLightClientBootstrap { pub header: UnboundedLightClientHeader, /// Current sync committee corresponding to `beacon_header.state_root` pub current_sync_committee: UnboundedSyncCommittee, - // TODO: Update tree_hash to support const generic arrays - pub current_sync_committee_branch: Vector>, + pub current_sync_committee_branch: [H256; floorlog2(CURRENT_SYNC_COMMITTEE_INDEX)], } diff --git a/lib/unionlabs/src/ethereum/beacon/light_client_finality_update.rs b/lib/unionlabs/src/ethereum/beacon/light_client_finality_update.rs index 3e385cc25d..e53cb1a7dd 100644 --- a/lib/unionlabs/src/ethereum/beacon/light_client_finality_update.rs +++ b/lib/unionlabs/src/ethereum/beacon/light_client_finality_update.rs @@ -1,21 +1,24 @@ use macros::model; -use ssz::Ssz; use crate::{ - ethereum::config::{ - consts::{floorlog2, FINALIZED_ROOT_INDEX}, - BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE, - }, + ethereum::config::consts::{floorlog2, FINALIZED_ROOT_INDEX}, hash::H256, ibc::lightclients::ethereum::{ - light_client_header::{LightClientHeader, UnboundedLightClientHeader}, - sync_aggregate::{SyncAggregate, UnboundedSyncAggregate}, + light_client_header::UnboundedLightClientHeader, sync_aggregate::UnboundedSyncAggregate, + }, +}; +#[cfg(feature = "ssz")] +use crate::{ + ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE}, + ibc::lightclients::ethereum::{ + light_client_header::LightClientHeader, sync_aggregate::SyncAggregate, }, }; +#[cfg(feature = "ssz")] #[model] -#[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[derive(::ssz::Ssz)] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct LightClientFinalityUpdate< C: SYNC_COMMITTEE_SIZE + BYTES_PER_LOGS_BLOOM + MAX_EXTRA_DATA_BYTES, > { @@ -27,7 +30,7 @@ pub struct LightClientFinalityUpdate< /// Sync committee aggregate signature pub sync_aggregate: SyncAggregate, /// Slot at which the aggregate signature was created (untrusted) - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub signature_slot: u64, } @@ -41,6 +44,6 @@ pub struct UnboundedLightClientFinalityUpdate { /// Sync committee aggregate signature pub sync_aggregate: UnboundedSyncAggregate, /// Slot at which the aggregate signature was created (untrusted) - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub signature_slot: u64, } diff --git a/lib/unionlabs/src/ethereum/beacon/proposer_slashing.rs b/lib/unionlabs/src/ethereum/beacon/proposer_slashing.rs index a1f88bf574..a339ff441b 100644 --- a/lib/unionlabs/src/ethereum/beacon/proposer_slashing.rs +++ b/lib/unionlabs/src/ethereum/beacon/proposer_slashing.rs @@ -1,11 +1,10 @@ use macros::model; -use ssz::Ssz; use crate::ethereum::beacon::signed_beacon_block_header::SignedBeaconBlockHeader; /// #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct ProposerSlashing { pub signed_header_1: SignedBeaconBlockHeader, pub signed_header_2: SignedBeaconBlockHeader, diff --git a/lib/unionlabs/src/ethereum/beacon/signed_beacon_block.rs b/lib/unionlabs/src/ethereum/beacon/signed_beacon_block.rs index efc9703616..d51f4e9786 100644 --- a/lib/unionlabs/src/ethereum/beacon/signed_beacon_block.rs +++ b/lib/unionlabs/src/ethereum/beacon/signed_beacon_block.rs @@ -1,24 +1,23 @@ use macros::model; -use ssz::Ssz; -use crate::{ - bls::BlsSignature, - ethereum::{ - beacon::beacon_block::{BeaconBlock, UnboundedBeaconBlock}, - config::{ - BYTES_PER_LOGS_BLOOM, DEPOSIT_CONTRACT_TREE_DEPTH, MAX_ATTESTATIONS, - MAX_ATTESTER_SLASHINGS, MAX_BLOB_COMMITMENTS_PER_BLOCK, MAX_BLS_TO_EXECUTION_CHANGES, - MAX_BYTES_PER_TRANSACTION, MAX_DEPOSITS, MAX_EXTRA_DATA_BYTES, MAX_PROPOSER_SLASHINGS, - MAX_TRANSACTIONS_PER_PAYLOAD, MAX_VALIDATORS_PER_COMMITTEE, MAX_VOLUNTARY_EXITS, - MAX_WITHDRAWALS_PER_PAYLOAD, SYNC_COMMITTEE_SIZE, - }, +#[cfg(feature = "ssz")] +use crate::ethereum::{ + beacon::beacon_block::BeaconBlock, + config::{ + BYTES_PER_LOGS_BLOOM, DEPOSIT_CONTRACT_TREE_DEPTH, MAX_ATTESTATIONS, + MAX_ATTESTER_SLASHINGS, MAX_BLOB_COMMITMENTS_PER_BLOCK, MAX_BLS_TO_EXECUTION_CHANGES, + MAX_BYTES_PER_TRANSACTION, MAX_DEPOSITS, MAX_EXTRA_DATA_BYTES, MAX_PROPOSER_SLASHINGS, + MAX_TRANSACTIONS_PER_PAYLOAD, MAX_VALIDATORS_PER_COMMITTEE, MAX_VOLUNTARY_EXITS, + MAX_WITHDRAWALS_PER_PAYLOAD, SYNC_COMMITTEE_SIZE, }, }; +use crate::{ethereum::beacon::beacon_block::UnboundedBeaconBlock, hash::H768}; /// +#[cfg(feature = "ssz")] #[model] -#[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[derive(::ssz::Ssz)] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct SignedBeaconBlock< C: MAX_PROPOSER_SLASHINGS + MAX_VALIDATORS_PER_COMMITTEE @@ -37,11 +36,11 @@ pub struct SignedBeaconBlock< + SYNC_COMMITTEE_SIZE, > { pub message: BeaconBlock, - pub signature: BlsSignature, + pub signature: H768, } #[model] pub struct UnboundedSignedBeaconBlock { pub message: UnboundedBeaconBlock, - pub signature: BlsSignature, + pub signature: H768, } diff --git a/lib/unionlabs/src/ethereum/beacon/signed_beacon_block_header.rs b/lib/unionlabs/src/ethereum/beacon/signed_beacon_block_header.rs index 9e838c71ba..2e8986f53d 100644 --- a/lib/unionlabs/src/ethereum/beacon/signed_beacon_block_header.rs +++ b/lib/unionlabs/src/ethereum/beacon/signed_beacon_block_header.rs @@ -1,14 +1,11 @@ use macros::model; -use ssz::Ssz; -use crate::{ - bls::BlsSignature, ibc::lightclients::ethereum::beacon_block_header::BeaconBlockHeader, -}; +use crate::{hash::H768, ibc::lightclients::ethereum::beacon_block_header::BeaconBlockHeader}; /// #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct SignedBeaconBlockHeader { pub message: BeaconBlockHeader, - pub signature: BlsSignature, + pub signature: H768, } diff --git a/lib/unionlabs/src/ethereum/beacon/signed_bls_to_execution_change.rs b/lib/unionlabs/src/ethereum/beacon/signed_bls_to_execution_change.rs index ee5a4983e6..84509b98af 100644 --- a/lib/unionlabs/src/ethereum/beacon/signed_bls_to_execution_change.rs +++ b/lib/unionlabs/src/ethereum/beacon/signed_bls_to_execution_change.rs @@ -1,11 +1,10 @@ use macros::model; -use ssz::Ssz; -use crate::{bls::BlsSignature, ethereum::beacon::bls_to_execution_change::BlsToExecutionChange}; +use crate::{ethereum::beacon::bls_to_execution_change::BlsToExecutionChange, hash::H768}; #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct SignedBlsToExecutionChange { message: BlsToExecutionChange, - signature: BlsSignature, + signature: H768, } diff --git a/lib/unionlabs/src/ethereum/beacon/signed_voluntary_exit.rs b/lib/unionlabs/src/ethereum/beacon/signed_voluntary_exit.rs index 01874962fe..a24c47a886 100644 --- a/lib/unionlabs/src/ethereum/beacon/signed_voluntary_exit.rs +++ b/lib/unionlabs/src/ethereum/beacon/signed_voluntary_exit.rs @@ -1,12 +1,11 @@ use macros::model; -use ssz::Ssz; -use crate::{bls::BlsSignature, ethereum::beacon::voluntary_exit::VoluntaryExit}; +use crate::{ethereum::beacon::voluntary_exit::VoluntaryExit, hash::H768}; /// #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct SignedVoluntaryExit { pub message: VoluntaryExit, - pub signature: BlsSignature, + pub signature: H768, } diff --git a/lib/unionlabs/src/ethereum/beacon/signing_data.rs b/lib/unionlabs/src/ethereum/beacon/signing_data.rs index 74269d96f7..3a08fd60ca 100644 --- a/lib/unionlabs/src/ethereum/beacon/signing_data.rs +++ b/lib/unionlabs/src/ethereum/beacon/signing_data.rs @@ -1,11 +1,10 @@ use macros::model; -use ssz::Ssz; use crate::{ethereum::Domain, hash::H256}; /// #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct SigningData { pub object_root: H256, pub domain: Domain, diff --git a/lib/unionlabs/src/ethereum/beacon/voluntary_exit.rs b/lib/unionlabs/src/ethereum/beacon/voluntary_exit.rs index 54651cfa66..53a5363c22 100644 --- a/lib/unionlabs/src/ethereum/beacon/voluntary_exit.rs +++ b/lib/unionlabs/src/ethereum/beacon/voluntary_exit.rs @@ -1,13 +1,12 @@ use macros::model; -use ssz::Ssz; /// #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct VoluntaryExit { /// Earliest epoch when voluntary exit can be processed - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub epoch: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub validator_index: u64, } diff --git a/lib/unionlabs/src/ethereum/beacon/withdrawal.rs b/lib/unionlabs/src/ethereum/beacon/withdrawal.rs index 2ab20c5371..febe505243 100644 --- a/lib/unionlabs/src/ethereum/beacon/withdrawal.rs +++ b/lib/unionlabs/src/ethereum/beacon/withdrawal.rs @@ -1,16 +1,15 @@ use macros::model; -use ssz::Ssz; use crate::hash::H160; #[model] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] pub struct Withdrawal { - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub index: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub validator_index: u64, pub address: H160, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub amount: u64, } diff --git a/lib/unionlabs/src/ethereum/config.rs b/lib/unionlabs/src/ethereum/config.rs index 9fbe108683..621e2d53ac 100644 --- a/lib/unionlabs/src/ethereum/config.rs +++ b/lib/unionlabs/src/ethereum/config.rs @@ -3,7 +3,6 @@ use core::{ str::FromStr, }; -use serde::{Deserialize, Serialize}; use typenum::{NonZero, Unsigned}; use crate::{ @@ -19,8 +18,12 @@ pub struct Minimal; #[derive(Debug, Clone, PartialEq, Eq, Default)] pub struct Mainnet; -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)] -#[serde(rename_all = "snake_case")] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr( + feature = "serde", + derive(::serde::Serialize, ::serde::Deserialize), + serde(rename_all = "snake_case") +)] pub enum PresetBaseKind { Minimal, Mainnet, @@ -167,7 +170,8 @@ pub mod consts { pub mod preset { #[allow(non_snake_case)] - #[derive(Debug, Default, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] + #[derive(Debug, Default, Clone, PartialEq, Eq)] + #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] pub struct Preset { /// Misc /// --------------------------------------------------------------- @@ -264,7 +268,12 @@ pub mod preset { }; } -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +#[derive(Debug, Clone, PartialEq)] +#[cfg_attr( + feature = "serde", + derive(::serde::Serialize, ::serde::Deserialize), + serde(rename_all = "snake_case") +)] pub struct Config { pub preset: preset::Preset, pub fork_parameters: ForkParameters, diff --git a/lib/unionlabs/src/events.rs b/lib/unionlabs/src/events.rs index 4eb6cca599..e3e9a9b476 100644 --- a/lib/unionlabs/src/events.rs +++ b/lib/unionlabs/src/events.rs @@ -1,4 +1,4 @@ -use core::{num::NonZeroU64, str::FromStr}; +use core::num::NonZeroU64; use macros::apply; @@ -24,8 +24,18 @@ macro_rules! event { )+ } ) => { - #[derive(::macros::Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, enumorph::Enumorph)] - #[serde(tag = "@type", content = "@value", rename_all = "snake_case")] + #[derive( + ::macros::Debug, + Clone, + PartialEq, + Eq, + enumorph::Enumorph + )] + #[cfg_attr( + feature = "serde", + derive(serde::Serialize, serde::Deserialize), + serde(tag = "@type", content = "@value", rename_all = "snake_case") + )] pub enum $Enum { $( $Struct($Struct), @@ -33,6 +43,7 @@ macro_rules! event { } impl IbcEvent { + #[cfg(feature = "proto")] #[must_use] pub fn try_from_tendermint_event( event: crate::tendermint::abci::event::Event, @@ -55,22 +66,33 @@ macro_rules! event { } $( - #[derive(::macros::Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] - #[serde(deny_unknown_fields)] + #[derive(::macros::Debug, Clone, PartialEq, Eq)] + #[cfg_attr( + feature = "serde", + derive(serde::Serialize, serde::Deserialize), + serde(deny_unknown_fields) + )] pub struct $Struct { $( $(#[doc = $doc])* - $(#[serde($serde)])? + $(#[cfg_attr( + feature = "serde", + serde($serde) + )])? $(#[debug($debug)])? pub $field: $field_ty, )+ } + #[cfg(feature = "proto")] impl TryFrom for $Struct { type Error = TryFromTendermintEventError; fn try_from(value: crate::tendermint::abci::event::Event) -> Result { + #[allow(unused, reason = "used in some of the implementations but not all")] + use core::str::FromStr; + const DEPRECATED: &[&'static str] = &[$($($dep),+)?]; if value.ty != $tag { @@ -112,8 +134,9 @@ macro_rules! event { )) }, )+ - // TODO(aeryz): this is newly added to cosmos-sdk, until we understand what to do with this, ignore + // auto injected by the cosmos sdk "msg_index" => {} + "authz_msg_index" => {} key => { if !DEPRECATED.contains(&key) { return Err(TryFromTendermintEventError::UnknownAttribute(attr.key)) @@ -169,29 +192,29 @@ pub enum TryFromTendermintEventError { pub enum IbcEvent { #[event(tag = "create_client")] CreateClient { - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] client_id: ClientId, // TODO: Figure out if there's a better type we can use than string client_type: String, - #[parse(Height::from_str)] + #[parse(Height::from_str_allow_zero_revision)] consensus_height: Height, }, #[event(tag = "update_client", deprecated("consensus_height", "header"))] UpdateClient { - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] client_id: ClientId, client_type: String, - #[parse(|s: &str| s.split(',').map(Height::from_str).collect::>())] + #[parse(|s: &str| s.split(',').map(Height::from_str_allow_zero_revision).collect::>())] consensus_heights: Vec, }, #[event(tag = "client_misbehaviour")] ClientMisbehaviour { - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] client_id: ClientId, client_type: String, - #[parse(Height::from_str)] + #[parse(Height::from_str_allow_zero_revision)] consensus_height: Height, }, @@ -200,47 +223,47 @@ pub enum IbcEvent { #[event(tag = "connection_open_init", deprecated("counterparty_connection_id"))] ConnectionOpenInit { - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] client_id: ClientId, - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] counterparty_client_id: ClientId, }, #[event(tag = "connection_open_try")] ConnectionOpenTry { - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] client_id: ClientId, - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] counterparty_client_id: ClientId, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] counterparty_connection_id: ConnectionId, }, #[event(tag = "connection_open_ack")] ConnectionOpenAck { - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] client_id: ClientId, - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] counterparty_client_id: ClientId, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] counterparty_connection_id: ConnectionId, }, #[event(tag = "connection_open_confirm")] ConnectionOpenConfirm { - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] client_id: ClientId, - #[parse(ClientId::from_str)] + #[parse(|s| ClientId::parse_prefixed(s).map(|(_ty, id)| id))] counterparty_client_id: ClientId, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] counterparty_connection_id: ConnectionId, }, @@ -248,11 +271,11 @@ pub enum IbcEvent { ChannelOpenInit { #[parse(PortId::from_str)] port_id: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] channel_id: ChannelId, #[parse(PortId::from_str)] counterparty_port_id: PortId, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, version: String, }, @@ -261,13 +284,13 @@ pub enum IbcEvent { ChannelOpenTry { #[parse(PortId::from_str)] port_id: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] channel_id: ChannelId, #[parse(PortId::from_str)] counterparty_port_id: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] counterparty_channel_id: ChannelId, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, version: String, }, @@ -276,13 +299,13 @@ pub enum IbcEvent { ChannelOpenAck { #[parse(PortId::from_str)] port_id: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] channel_id: ChannelId, #[parse(PortId::from_str)] counterparty_port_id: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] counterparty_channel_id: ChannelId, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, }, @@ -290,13 +313,13 @@ pub enum IbcEvent { ChannelOpenConfirm { #[parse(PortId::from_str)] port_id: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] channel_id: ChannelId, #[parse(PortId::from_str)] counterparty_port_id: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] counterparty_channel_id: ChannelId, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, }, @@ -309,7 +332,7 @@ pub enum IbcEvent { #[serde(with = "::serde_utils::hex_string")] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] packet_data_hex: Vec, - #[parse(Height::from_str)] + #[parse(Height::from_str_allow_zero_revision)] packet_timeout_height: Height, #[parse(u64::from_str)] packet_timeout_timestamp: u64, @@ -317,17 +340,17 @@ pub enum IbcEvent { packet_sequence: NonZeroU64, #[parse(PortId::from_str)] packet_src_port: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] packet_src_channel: ChannelId, #[parse(PortId::from_str)] packet_dst_port: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] packet_dst_channel: ChannelId, #[parse(hex::decode)] #[serde(with = "::serde_utils::hex_string")] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] packet_ack_hex: Vec, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, }, @@ -337,7 +360,7 @@ pub enum IbcEvent { #[serde(with = "::serde_utils::hex_string")] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] packet_data_hex: Vec, - #[parse(Height::from_str)] + #[parse(Height::from_str_allow_zero_revision)] packet_timeout_height: Height, #[parse(u64::from_str)] packet_timeout_timestamp: u64, @@ -345,15 +368,15 @@ pub enum IbcEvent { packet_sequence: NonZeroU64, #[parse(PortId::from_str)] packet_src_port: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] packet_src_channel: ChannelId, #[parse(PortId::from_str)] packet_dst_port: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] packet_dst_channel: ChannelId, #[parse(Order::from_str)] packet_channel_ordering: Order, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, }, @@ -363,8 +386,7 @@ pub enum IbcEvent { #[serde(with = "::serde_utils::hex_string")] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] packet_data_hex: Vec, - #[parse(Height::from_str)] - // TODO: Make this generic height instead of concrete + #[parse(Height::from_str_allow_zero_revision)] packet_timeout_height: Height, #[parse(u64::from_str)] packet_timeout_timestamp: u64, @@ -372,21 +394,21 @@ pub enum IbcEvent { packet_sequence: NonZeroU64, #[parse(PortId::from_str)] packet_src_port: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] packet_src_channel: ChannelId, #[parse(PortId::from_str)] packet_dst_port: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] packet_dst_channel: ChannelId, #[parse(Order::from_str)] packet_channel_ordering: Order, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, }, #[event(tag = "acknowledge_packet", deprecated("packet_connection"))] AcknowledgePacket { - #[parse(Height::from_str)] + #[parse(Height::from_str_allow_zero_revision)] packet_timeout_height: Height, #[parse(u64::from_str)] packet_timeout_timestamp: u64, @@ -394,21 +416,21 @@ pub enum IbcEvent { packet_sequence: NonZeroU64, #[parse(PortId::from_str)] packet_src_port: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] packet_src_channel: ChannelId, #[parse(PortId::from_str)] packet_dst_port: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] packet_dst_channel: ChannelId, #[parse(Order::from_str)] packet_channel_ordering: Order, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, }, #[event(tag = "timeout_packet")] TimeoutPacket { - #[parse(Height::from_str)] + #[parse(Height::from_str_allow_zero_revision)] packet_timeout_height: Height, #[parse(u64::from_str)] packet_timeout_timestamp: u64, @@ -416,15 +438,15 @@ pub enum IbcEvent { packet_sequence: NonZeroU64, #[parse(PortId::from_str)] packet_src_port: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] packet_src_channel: ChannelId, #[parse(PortId::from_str)] packet_dst_port: PortId, - #[parse(ChannelId::from_str)] + #[parse(ChannelId::parse_prefixed)] packet_dst_channel: ChannelId, #[parse(Order::from_str)] packet_channel_ordering: Order, - #[parse(ConnectionId::from_str)] + #[parse(ConnectionId::parse_prefixed)] connection_id: ConnectionId, }, } @@ -462,6 +484,7 @@ mod tests { ConnectionOpenConfirm, CreateClient, TryFromTendermintEventError, UpdateClient, }, ibc::core::client::height::{Height, HeightFromStrError}, + id::{ClientId, ConnectionId}, tendermint::abci::{event::Event, event_attribute::EventAttribute}, }; @@ -494,10 +517,10 @@ mod tests { ], }), Ok(ConnectionOpenConfirm { - connection_id: "connection-11".parse().unwrap(), - client_id: "08-wasm-1".parse().unwrap(), - counterparty_client_id: "cometbls-new-0".parse().unwrap(), - counterparty_connection_id: "connection-6".parse().unwrap(), + connection_id: ConnectionId::new(11), + client_id: ClientId::new(1), + counterparty_client_id: ClientId::new(0), + counterparty_connection_id: ConnectionId::new(6), }) ); } @@ -507,7 +530,7 @@ mod tests { let attributes = vec![ EventAttribute { key: "client_id".to_string(), - value: "client_id".to_string(), + value: "client_id-1".to_string(), index: true, }, EventAttribute { @@ -534,12 +557,9 @@ mod tests { }; let expected_event = UpdateClient { - client_id: "client_id".parse().unwrap(), + client_id: ClientId::new(1), client_type: "client_type".to_string(), - consensus_heights: vec![Height { - revision_number: 1, - revision_height: 1, - }], + consensus_heights: vec![Height::new_with_revision(1, 1)], }; assert_eq!( @@ -690,7 +710,7 @@ mod tests { assert_eq!( CreateClient::try_from(create_client_event).unwrap(), CreateClient { - client_id: client_id.parse().unwrap(), + client_id: ClientId::new(0), client_type: client_type.to_owned(), consensus_height: consensus_height.parse().unwrap(), } diff --git a/lib/unionlabs/src/google/protobuf/any.rs b/lib/unionlabs/src/google/protobuf/any.rs index 9cb92aa98f..cac9c01e9b 100644 --- a/lib/unionlabs/src/google/protobuf/any.rs +++ b/lib/unionlabs/src/google/protobuf/any.rs @@ -1,298 +1,242 @@ -use core::{fmt::Debug, marker::PhantomData}; +use core::fmt::Debug; -use frame_support_procedural::DebugNoBound; use macros::model; -use prost::Message; -use serde::{ - de::{self, Visitor}, - ser::SerializeStruct, - Deserialize, Serialize, -}; - -use crate::{ - encoding::{Decode, DecodeErrorOf, Encode, Proto}, - TryFromProtoBytesError, TypeUrl, -}; /// Wrapper type to indicate that a type is to be serialized as an Any. #[derive(Debug, Clone, PartialEq)] pub struct Any(pub T); -/// Provides a way to convert a type `T` into an [`Any`], even if `T` is itself an [`Any`]. -/// -/// ```rust -/// # use unionlabs::google::protobuf::duration::Duration; -/// # use unionlabs::google::protobuf::any::{Any, IntoAny}; -/// -/// let duration = Duration::new(1, 2).expect("valid duration"); -/// let _: Any = duration.into_any(); -/// let _: Any = Any(duration).into_any(); -/// ``` -pub trait IntoAny { - type T: Encode + TypeUrl; - fn into_any(self) -> Any; -} - -impl> IntoAny for T { - type T = T; - - fn into_any(self) -> Any { - Any(self) - } -} - -impl> IntoAny for Any { - type T = T; - - fn into_any(self) -> Any { - self - } -} - #[model] pub struct RawAny { pub type_url: String, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub value: Vec, } -impl From for RawAny { - fn from(value: protos::google::protobuf::Any) -> Self { - Self { - type_url: value.type_url, - value: value.value.to_vec(), - } - } -} - -impl From for protos::google::protobuf::Any { - fn from(value: RawAny) -> Self { - Self { - type_url: value.type_url, - value: value.value.into(), - } - } -} - -/// TODO(unionlabs/union#876): Properly implement google.protobuf.Any json serde -impl<'de, T> Deserialize<'de> for Any -where - T: Deserialize<'de> + TypeUrl, -{ - fn deserialize(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - struct AnyVisitor(PhantomData); - - impl<'de, T> Visitor<'de> for AnyVisitor - where - T: Deserialize<'de> + TypeUrl, - { - type Value = Any; - - fn expecting(&self, formatter: &mut core::fmt::Formatter) -> core::fmt::Result { - write!( - formatter, - "a google.protobuf.Any containing {}", - T::type_url() - ) - } - - fn visit_map(self, mut map: A) -> Result - where - A: serde::de::MapAccess<'de>, - { - const EXPECTED_MSG: &str = "Object with fields type_url and data"; +#[cfg(feature = "proto")] +pub mod proto { + use frame_support_procedural::DebugNoBound; + use prost::Message; - let mut type_url: Option<&str> = None; - let mut data: Option = None; + use crate::{ + encoding::{Decode, DecodeErrorOf, Encode, Proto}, + google::protobuf::any::{Any, RawAny}, + TryFromProtoBytesError, TypeUrl, + }; - for _ in 0..2 { - match map - .next_key::<&str>()? - .ok_or(de::Error::invalid_length(0, &EXPECTED_MSG))? - { - "type_url" => { - let _ = type_url.insert(map.next_value()?); - } - "data" => { - let _ = data.insert(map.next_value()?); - } - unknown => { - return Err(de::Error::unknown_field(unknown, &["type_url", "data"])) - } - } - } - - match (type_url, data) { - (None, None) => Err(de::Error::invalid_length(0, &EXPECTED_MSG)), - (None, Some(_)) => Err(de::Error::missing_field("type_url")), - (Some(_), None) => Err(de::Error::missing_field("data")), - (Some(_), Some(data)) => Ok(Any(data)), - } + impl From for RawAny { + fn from(value: protos::google::protobuf::Any) -> Self { + Self { + type_url: value.type_url, + value: value.value.to_vec(), } } - - deserializer.deserialize_struct("Any", &["type_url", "data"], AnyVisitor::(PhantomData)) } -} -impl Serialize for Any -where - T: Serialize + TypeUrl, -{ - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - let mut s = serializer.serialize_struct("Any", 2)?; - s.serialize_field("type_url", &T::type_url())?; - s.serialize_field("data", &self.0)?; - s.end() + impl From for protos::google::protobuf::Any { + fn from(value: RawAny) -> Self { + Self { + type_url: value.type_url, + value: value.value.into(), + } + } } -} -impl + TypeUrl> From> for protos::google::protobuf::Any { - fn from(val: Any) -> Self { - protos::google::protobuf::Any { - type_url: T::type_url().to_string(), - value: val.0.encode().into(), + impl + TypeUrl> From> for protos::google::protobuf::Any { + fn from(val: Any) -> Self { + protos::google::protobuf::Any { + type_url: T::type_url().to_string(), + value: val.0.encode().into(), + } } } -} -impl + TypeUrl> Encode for Any { - fn encode(self) -> Vec { - protos::google::protobuf::Any::from(self).encode_to_vec() + impl + TypeUrl> Encode for Any { + fn encode(self) -> Vec { + protos::google::protobuf::Any::from(self).encode_to_vec() + } } -} - -// NOTE: In order for IntoAny to work, Any cannot implement TypeUrl. If nested Anys are required, you're crazy and I'm not helping you -// impl TypeUrl for protos::google::protobuf::Any { -// const TYPE_URL: &'static str = "/google.protobuf.Any"; -// } - -#[derive(DebugNoBound, thiserror::Error)] -pub enum TryFromAnyError + TypeUrl> { - #[error( + // NOTE: In order for IntoAny to work, Any cannot implement TypeUrl. If nested Anys are required, you're crazy and I'm not helping you + // impl TypeUrl for protos::google::protobuf::Any { + // const TYPE_URL: &'static str = "/google.protobuf.Any"; + // } + + #[derive(DebugNoBound, thiserror::Error)] + pub enum TryFromAnyError + TypeUrl> { + #[error( "incorrect type url, expected `{expected}` but found `{found}`", expected = T::type_url() )] - IncorrectTypeUrl { found: String }, - #[error("unable to decode inner type")] - Decode(#[source] DecodeErrorOf), -} + IncorrectTypeUrl { found: String }, + #[error("unable to decode inner type")] + Decode(#[source] DecodeErrorOf), + } -impl + TypeUrl> PartialEq - for TryFromAnyError -{ - fn eq(&self, other: &Self) -> bool { - match (self, other) { - ( - TryFromAnyError::IncorrectTypeUrl { found: this }, - TryFromAnyError::IncorrectTypeUrl { found: other }, - ) => this == other, - (TryFromAnyError::Decode(this), TryFromAnyError::Decode(other)) => this == other, - _ => false, + impl + TypeUrl> PartialEq + for TryFromAnyError + { + fn eq(&self, other: &Self) -> bool { + match (self, other) { + ( + TryFromAnyError::IncorrectTypeUrl { found: this }, + TryFromAnyError::IncorrectTypeUrl { found: other }, + ) => this == other, + (TryFromAnyError::Decode(this), TryFromAnyError::Decode(other)) => this == other, + _ => false, + } } } -} -impl + TypeUrl> Clone for TryFromAnyError { - fn clone(&self) -> Self { - match self { - TryFromAnyError::IncorrectTypeUrl { found } => TryFromAnyError::IncorrectTypeUrl { - found: found.clone(), - }, - TryFromAnyError::Decode(err) => TryFromAnyError::Decode(err.clone()), + impl + TypeUrl> Clone for TryFromAnyError { + fn clone(&self) -> Self { + match self { + TryFromAnyError::IncorrectTypeUrl { found } => TryFromAnyError::IncorrectTypeUrl { + found: found.clone(), + }, + TryFromAnyError::Decode(err) => TryFromAnyError::Decode(err.clone()), + } } } -} -impl TryFrom for Any -where - T: Decode + TypeUrl, -{ - type Error = TryFromAnyError; - - fn try_from(value: protos::google::protobuf::Any) -> Result { - if value.type_url == T::type_url() { - T::decode(&value.value) - .map_err(TryFromAnyError::Decode) - .map(Any) - } else { - Err(TryFromAnyError::IncorrectTypeUrl { - found: value.type_url, - }) + impl TryFrom for Any + where + T: Decode + TypeUrl, + { + type Error = TryFromAnyError; + + fn try_from(value: protos::google::protobuf::Any) -> Result { + if value.type_url == T::type_url() { + T::decode(&value.value) + .map_err(TryFromAnyError::Decode) + .map(Any) + } else { + Err(TryFromAnyError::IncorrectTypeUrl { + found: value.type_url, + }) + } } } -} - -impl Decode for Any -where - T: Decode + TypeUrl, -{ - type Error = TryFromProtoBytesError>; - fn decode(bytes: &[u8]) -> Result { - ::decode(bytes) - .map_err(TryFromProtoBytesError::Decode) - .and_then(|proto| { - proto - .try_into() - .map_err(TryFromProtoBytesError::TryFromProto) - }) + impl Decode for Any + where + T: Decode + TypeUrl, + { + type Error = TryFromProtoBytesError>; + + fn decode(bytes: &[u8]) -> Result { + ::decode(bytes) + .map_err(TryFromProtoBytesError::Decode) + .and_then(|proto| { + proto + .try_into() + .map_err(TryFromProtoBytesError::TryFromProto) + }) + } } -} -// for use with raw prost generated types -#[must_use] -pub fn mk_any(t: &T) -> protos::google::protobuf::Any { - let bz = t.encode_to_vec(); - protos::google::protobuf::Any { - type_url: T::type_url(), - value: bz.into(), + // for use with raw prost generated types + #[must_use] + pub fn mk_any(t: &T) -> protos::google::protobuf::Any { + let bz = t.encode_to_vec(); + protos::google::protobuf::Any { + type_url: T::type_url(), + value: bz.into(), + } } } -#[cfg(test)] -mod tests { - use super::*; +/// TODO(unionlabs/union#876): Properly implement google.protobuf.Any json serde +#[cfg(all(feature = "serde", feature = "proto"))] // needs TypeUrl so gate behind proto as well as serde +mod serde { + use core::marker::PhantomData; - #[test] - fn test_flatten() { - use crate::google::protobuf::{duration::Duration, timestamp::Timestamp}; + use serde::{de, ser::SerializeStruct, Deserialize, Serialize}; - trait Foo { - type Bar; - } + use crate::{google::protobuf::any::Any, TypeUrl}; - struct A; - struct B; + impl<'de, T> Deserialize<'de> for Any + where + T: Deserialize<'de> + crate::TypeUrl, + { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + struct AnyVisitor(PhantomData); - impl Foo for A { - type Bar = Timestamp; - } + impl<'de, T> serde::de::Visitor<'de> for AnyVisitor + where + T: Deserialize<'de> + crate::TypeUrl, + { + type Value = Any; + + fn expecting(&self, formatter: &mut core::fmt::Formatter) -> core::fmt::Result { + write!( + formatter, + "a google.protobuf.Any containing {}", + T::type_url() + ) + } - impl Foo for B { - type Bar = Any; + fn visit_map(self, mut map: A) -> Result + where + A: serde::de::MapAccess<'de>, + { + const EXPECTED_MSG: &str = "Object with fields type_url and data"; + + let mut type_url: Option<&str> = None; + let mut data: Option = None; + + for _ in 0..2 { + match map + .next_key::<&str>()? + .ok_or(de::Error::invalid_length(0, &EXPECTED_MSG))? + { + "type_url" => { + let _ = type_url.insert(map.next_value()?); + } + "data" => { + let _ = data.insert(map.next_value()?); + } + unknown => { + return Err(de::Error::unknown_field( + unknown, + &["type_url", "data"], + )) + } + } + } + + match (type_url, data) { + (None, None) => Err(de::Error::invalid_length(0, &EXPECTED_MSG)), + (None, Some(_)) => Err(de::Error::missing_field("type_url")), + (Some(_), None) => Err(de::Error::missing_field("data")), + (Some(_), Some(data)) => Ok(Any(data)), + } + } + } + + deserializer.deserialize_struct( + "Any", + &["type_url", "data"], + AnyVisitor::(PhantomData), + ) } + } - fn wrap_any_one_level(bar: T::Bar) -> Any<::T> + impl Serialize for Any + where + T: Serialize + TypeUrl, + { + fn serialize(&self, serializer: S) -> Result where - T: Foo, - T::Bar: IntoAny, + S: serde::Serializer, { - bar.into_any() + let mut s = serializer.serialize_struct("Any", 2)?; + s.serialize_field("type_url", &T::type_url())?; + s.serialize_field("data", &self.0)?; + s.end() } - - let _: Any = wrap_any_one_level::(Timestamp { - seconds: crate::bounded::BoundedI64::new(1).unwrap(), - nanos: crate::bounded::BoundedI32::new(2).unwrap(), - }); - - let _: Any = wrap_any_one_level::(Any(Duration::new(3, 4).unwrap())); } } diff --git a/lib/unionlabs/src/google/protobuf/duration.rs b/lib/unionlabs/src/google/protobuf/duration.rs index 7fec825a5e..cb31c30056 100644 --- a/lib/unionlabs/src/google/protobuf/duration.rs +++ b/lib/unionlabs/src/google/protobuf/duration.rs @@ -6,10 +6,6 @@ use core::{ }; use macros::model; -use serde::{ - de::{self, Unexpected}, - Deserialize, Serialize, -}; use crate::{ bounded::{BoundedI128, BoundedI32, BoundedI64, BoundedIntError}, @@ -68,15 +64,16 @@ impl Neg for Duration { } } -impl<'de> Deserialize<'de> for Duration { +#[cfg(feature = "serde")] +impl<'de> serde::Deserialize<'de> for Duration { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { String::deserialize(deserializer).and_then(|str| { str.parse().map_err(|_| { - de::Error::invalid_value( - Unexpected::Str(&str), + serde::de::Error::invalid_value( + serde::de::Unexpected::Str(&str), &"a valid protobuf duration string (`[.]s`)", ) }) @@ -84,7 +81,8 @@ impl<'de> Deserialize<'de> for Duration { } } -impl Serialize for Duration { +#[cfg(feature = "serde")] +impl serde::Serialize for Duration { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, @@ -210,21 +208,23 @@ impl Duration { #[allow(overlapping_range_endpoints)] // false positive, report upstream match (seconds, nanos) { (0, _) => { - let nanos = result_try!(SubZeroNanos::new(nanos), DurationError::Nanos); + let nanos = result_try!(SubZeroNanos::new_const(nanos), DurationError::Nanos); Ok(Self::new_private(0, nanos.inner())) } // negative seconds, negative or zero nanos (..=-1, ..=0) => { - let seconds = result_try!(NegativeSeconds::new(seconds), DurationError::Seconds); - let nanos = result_try!(NegativeNanos::new(nanos), DurationError::Nanos); + let seconds = + result_try!(NegativeSeconds::new_const(seconds), DurationError::Seconds); + let nanos = result_try!(NegativeNanos::new_const(nanos), DurationError::Nanos); Ok(Self::new_private(seconds.inner(), nanos.inner())) } // positive seconds, positive or zero nanos (1.., 0..) => { - let seconds = result_try!(PositiveSeconds::new(seconds), DurationError::Seconds); - let nanos = result_try!(PositiveNanos::new(nanos), DurationError::Nanos); + let seconds = + result_try!(PositiveSeconds::new_const(seconds), DurationError::Seconds); + let nanos = result_try!(PositiveNanos::new_const(nanos), DurationError::Nanos); Ok(Self::new_private(seconds.inner(), nanos.inner())) } @@ -240,7 +240,7 @@ impl Duration { // false positive (fixed in newer versions) // https://github.com/rust-lang/rust-clippy/pull/10811 #[allow(clippy::match_wild_err_arm)] - match BoundedI128::new(inner) { + match BoundedI128::new_const(inner) { Ok(ok) => Self(ok), Err(_) => { unreachable!() @@ -257,11 +257,8 @@ impl Duration { value >= DURATION_MIN_SECONDS as i128 && value <= DURATION_MAX_SECONDS as i128 ); - // false positive (fixed in newer versions) - // https://github.com/rust-lang/rust-clippy/pull/10811 - #[allow(clippy::match_wild_err_arm)] #[allow(clippy::cast_possible_truncation)] // invariant checked above - match BoundedI64::new(value as i64) { + match BoundedI64::new_const(value as i64) { Ok(ok) => ok, Err(_) => { unreachable!() @@ -279,7 +276,7 @@ impl Duration { // false positive (fixed in newer versions) // https://github.com/rust-lang/rust-clippy/pull/10811 #[allow(clippy::cast_possible_truncation)] // invariant checked above - match BoundedI32::new(value as i32) { + match BoundedI32::new_const(value as i32) { Ok(ok) => ok, Err(_) => { unreachable!() @@ -316,39 +313,25 @@ impl Duration { } } -impl From for protos::google::protobuf::Duration { - fn from(value: Duration) -> Self { - Self { - seconds: value.seconds().inner(), - nanos: value.nanos().inner(), - } - } -} - -impl TryFrom for Duration { - type Error = DurationError; - - fn try_from(value: protos::google::protobuf::Duration) -> Result { - Self::new(value.seconds, value.nanos) - } -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::google::protobuf::duration::{Duration, DurationError}; -#[cfg(feature = "ethabi")] -impl From for contracts::glue::GoogleProtobufDurationData { - fn from(value: Duration) -> Self { - Self { - seconds: value.seconds().inner(), - nanos: value.nanos().inner(), + impl From for protos::google::protobuf::Duration { + fn from(value: Duration) -> Self { + Self { + seconds: value.seconds().inner(), + nanos: value.nanos().inner(), + } } } -} -#[cfg(feature = "ethabi")] -impl TryFrom for Duration { - type Error = DurationError; + impl TryFrom for Duration { + type Error = DurationError; - fn try_from(value: contracts::glue::GoogleProtobufDurationData) -> Result { - Self::new(value.seconds, value.nanos) + fn try_from(value: protos::google::protobuf::Duration) -> Result { + Self::new(value.seconds, value.nanos) + } } } diff --git a/lib/unionlabs/src/google/protobuf/timestamp.rs b/lib/unionlabs/src/google/protobuf/timestamp.rs index 5b9c0c2f44..609523dd6a 100644 --- a/lib/unionlabs/src/google/protobuf/timestamp.rs +++ b/lib/unionlabs/src/google/protobuf/timestamp.rs @@ -2,10 +2,6 @@ use core::{cmp::Ordering, fmt::Display, num::TryFromIntError, ops::Neg, str::Fro use chrono::{DateTime, NaiveDateTime, SecondsFormat, TimeZone, Utc}; use macros::model; -use serde::{ - de::{self, Unexpected}, - Deserialize, Serialize, -}; use crate::{ bounded::{BoundedI128, BoundedI32, BoundedI64, BoundedIntError}, @@ -25,11 +21,7 @@ pub type ValidTimestampUnixNanos = BoundedI128< { (TIMESTAMP_SECONDS_MAX as i128 * NANOS_PER_SECOND as i128) + NANOS_MAX as i128 }, >; -#[model( - proto(raw(protos::google::protobuf::Timestamp), into, from), - ethabi(raw(contracts::glue::GoogleProtobufTimestampData), into, from), - no_serde -)] +#[model(proto(raw(protos::google::protobuf::Timestamp), into, from), no_serde)] #[debug("Timestamp({})", self)] #[derive(Copy)] pub struct Timestamp { @@ -48,9 +40,11 @@ impl Default for Timestamp { pub const MIN_TIMESTAMP: Timestamp = Timestamp { seconds: result_unwrap!( - BoundedI64::::new(TIMESTAMP_SECONDS_MIN) + BoundedI64::::new_const( + TIMESTAMP_SECONDS_MIN + ) ), - nanos: result_unwrap!(BoundedI32::<0, NANOS_MAX>::new(0)), + nanos: result_unwrap!(BoundedI32::<0, NANOS_MAX>::new_const(0)), }; impl Ord for Timestamp { @@ -67,44 +61,59 @@ impl PartialOrd for Timestamp { } } -#[derive(Serialize, Deserialize)] -#[serde(rename = "Timestamp")] -struct TimestampSerde { - pub seconds: BoundedI64, - pub nanos: BoundedI32<0, NANOS_MAX>, -} +#[cfg(feature = "serde")] +mod serde { + use serde::{ + de::{self, Unexpected}, + Deserialize, Serialize, + }; + + use crate::{ + bounded::{BoundedI32, BoundedI64}, + google::protobuf::timestamp::{ + Timestamp, NANOS_MAX, TIMESTAMP_SECONDS_MAX, TIMESTAMP_SECONDS_MIN, + }, + }; + + #[derive(Serialize, Deserialize)] + #[serde(rename = "Timestamp")] + pub(crate) struct TimestampSerde { + pub seconds: BoundedI64, + pub nanos: BoundedI32<0, NANOS_MAX>, + } -impl Serialize for Timestamp { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - if serializer.is_human_readable() { - serializer.collect_str(self) - } else { - TimestampSerde { - seconds: self.seconds, - nanos: self.nanos, + impl Serialize for Timestamp { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + if serializer.is_human_readable() { + serializer.collect_str(self) + } else { + TimestampSerde { + seconds: self.seconds, + nanos: self.nanos, + } + .serialize(serializer) } - .serialize(serializer) } } -} -impl<'de> Deserialize<'de> for Timestamp { - fn deserialize(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - if deserializer.is_human_readable() { - String::deserialize(deserializer).and_then(|str| { - str.parse().map_err(|_| { - de::Error::invalid_value(Unexpected::Str(&str), &"a valid RFC 3339 string") + impl<'de> Deserialize<'de> for Timestamp { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + if deserializer.is_human_readable() { + String::deserialize(deserializer).and_then(|str| { + str.parse().map_err(|_| { + de::Error::invalid_value(Unexpected::Str(&str), &"a valid RFC 3339 string") + }) }) - }) - } else { - let TimestampSerde { seconds, nanos } = TimestampSerde::deserialize(deserializer)?; - Ok(Self { seconds, nanos }) + } else { + let TimestampSerde { seconds, nanos } = TimestampSerde::deserialize(deserializer)?; + Ok(Self { seconds, nanos }) + } } } } @@ -337,73 +346,42 @@ impl From for cosmwasm_std::Timestamp { } } -impl From for protos::google::protobuf::Timestamp { - fn from(value: Timestamp) -> Self { - Self { - seconds: value.seconds.into(), - nanos: value.nanos.into(), - } - } -} - -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromTimestampError { - #[error("invalid seconds")] - Seconds(#[source] BoundedIntError), - #[error("invalid nanos")] - Nanos(#[source] BoundedIntError), -} - -impl TryFrom for Timestamp { - type Error = TryFromTimestampError; - - fn try_from(value: protos::google::protobuf::Timestamp) -> Result { - Ok(Self { - seconds: value - .seconds - .try_into() - .map_err(TryFromTimestampError::Seconds)?, - nanos: value - .nanos - .try_into() - .map_err(TryFromTimestampError::Nanos)?, - }) - } -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{bounded::BoundedIntError, google::protobuf::timestamp::Timestamp}; -#[cfg(feature = "ethabi")] -impl From for contracts::glue::GoogleProtobufTimestampData { - fn from(value: Timestamp) -> Self { - Self { - secs: value.seconds.into(), - nanos: value.nanos.inner().into(), + impl From for protos::google::protobuf::Timestamp { + fn from(value: Timestamp) -> Self { + Self { + seconds: value.seconds.into(), + nanos: value.nanos.into(), + } } } -} -#[cfg(feature = "ethabi")] -#[derive(Debug, Clone, PartialEq)] -pub enum TryFromEthAbiTimestampError { - Seconds(BoundedIntError), - Nanos(BoundedIntError), - NanosTryFromI64(core::num::TryFromIntError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromTimestampError { + #[error("invalid seconds")] + Seconds(#[source] BoundedIntError), + #[error("invalid nanos")] + Nanos(#[source] BoundedIntError), + } -#[cfg(feature = "ethabi")] -impl TryFrom for Timestamp { - type Error = TryFromEthAbiTimestampError; + impl TryFrom for Timestamp { + type Error = TryFromTimestampError; - fn try_from(value: contracts::glue::GoogleProtobufTimestampData) -> Result { - Ok(Self { - seconds: value - .secs - .try_into() - .map_err(TryFromEthAbiTimestampError::Seconds)?, - nanos: i32::try_from(value.nanos) - .map_err(TryFromEthAbiTimestampError::NanosTryFromI64)? - .try_into() - .map_err(TryFromEthAbiTimestampError::Nanos)?, - }) + fn try_from(value: protos::google::protobuf::Timestamp) -> Result { + Ok(Self { + seconds: value + .seconds + .try_into() + .map_err(TryFromTimestampError::Seconds)?, + nanos: value + .nanos + .try_into() + .map_err(TryFromTimestampError::Nanos)?, + }) + } } } diff --git a/lib/unionlabs/src/hash.rs b/lib/unionlabs/src/hash.rs index 6aae139bda..825d52b7c0 100644 --- a/lib/unionlabs/src/hash.rs +++ b/lib/unionlabs/src/hash.rs @@ -3,41 +3,9 @@ pub type H160 = hash_v2::Hash<20, E>; pub type H256 = hash_v2::Hash<32, E>; pub type H384 = hash_v2::Hash<48, E>; pub type H512 = hash_v2::Hash<64, E>; +pub type H768 = hash_v2::Hash<96, E>; pub type H2048 = hash_v2::Hash<256, E>; -// impl H256 { -// #[must_use] -// pub fn into_bytes(self) -> Vec { -// // use this if we ever swap out the inner value for primitive_types::H256 -// // self.0.into_iter().flat_map(|n| n.to_le_bytes()).collect() -// self.0.to_vec() -// } -// } - -impl From for primitive_types::H256 { - fn from(value: H256) -> Self { - Self(*value.get()) - } -} - -impl From for H256 { - fn from(value: primitive_types::H256) -> Self { - Self::new(value.0) - } -} - -impl From for primitive_types::H160 { - fn from(value: H160) -> Self { - Self(*value.get()) - } -} - -impl From for H160 { - fn from(value: primitive_types::H160) -> Self { - Self::new(value.0) - } -} - #[must_use = "constructing an iterator has no effect"] pub struct BytesBitIterator<'a> { bz: &'a [u8], @@ -90,7 +58,6 @@ pub mod hash_v2 { }; use generic_array::{ArrayLength, GenericArray}; - use serde::{ser::SerializeTupleStruct, Deserialize, Deserializer, Serialize, Serializer}; use crate::{ errors::{ExpectedLength, InvalidLength}, @@ -108,6 +75,10 @@ pub mod hash_v2 { fn decode>(data: T) -> Result, Self::Error>; fn decode_to_slice>(data: T, out: &mut [u8]) -> Result<(), Self::Error>; + + #[cfg(feature = "schemars")] + // (description, pattern) + fn jsonschema_info(len: Option) -> (String, String); } pub struct HexPrefixed; @@ -136,6 +107,13 @@ pub mod hash_v2 { hex::decode_to_slice(data, out).map_err(HexPrefixedFromStrError::InvalidHex) } + + #[cfg(feature = "schemars")] + fn jsonschema_info(len: Option) -> (String, String) { + let (_, regex) = HexUnprefixed::jsonschema_info(len); + + ("0x-prefixed hex".to_owned(), format!("0x{regex}")) + } } #[derive(Debug, Clone, PartialEq, thiserror::Error)] @@ -162,6 +140,19 @@ pub mod hash_v2 { fn decode_to_slice>(data: T, out: &mut [u8]) -> Result<(), Self::Error> { hex::decode_to_slice(data, out) } + + #[cfg(feature = "schemars")] + fn jsonschema_info(len: Option) -> (String, String) { + let hex_byte_regex = "[a-fA-F0-9]{2}"; + + ( + "hex".to_owned(), + len.map_or_else( + || format!("^(?:{hex_byte_regex})*$"), + |len| format!("^(?:{hex_byte_regex}){{{len}}}$"), + ), + ) + } } pub struct Base64; @@ -186,7 +177,9 @@ pub mod hash_v2 { fn decode_to_slice>(data: T, out: &mut [u8]) -> Result<(), Base64Error> { use base64::prelude::*; - let vec = BASE64_STANDARD.decode(data)?; + let vec = BASE64_STANDARD + .decode(data) + .map_err(Base64Error::InvalidEncoding)?; if vec.len() == out.len() { out.copy_from_slice(&vec); @@ -199,12 +192,36 @@ pub mod hash_v2 { })) } } + + #[cfg(feature = "schemars")] + fn jsonschema_info(len: Option) -> (String, String) { + let full_chunk = "(?:[A-Za-z0-9+/]{4})"; + // TODO: I think we can be smarter here with the padding for fixed size? + let padding = "(?:[A-Za-z0-9+/][AQgw]==|[A-Za-z0-9+/]{2}[AEIMQUYcgkosw048]=)?"; + + ( + "base64".to_owned(), + len.map_or_else( + || format!(r"^{full_chunk}*{padding}$"), + |len| { + let chunks = len / 3; + + format!( + r"^{full_chunk}{{{chunks}}}{}$", + if len % 3 == 0 { padding } else { "" } + ) + }, + ), + ) + } } #[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] pub enum Base64Error { - #[error("invalid encoding")] - InvalidEncoding(#[from] base64::DecodeError), + // REVIEW: I'm undecided as to whether or not this is cursed + #[cfg_attr(feature = "std", error("invalid encoding"))] + #[cfg_attr(not(feature = "std"), error("invalid encoding: {0}"))] + InvalidEncoding(#[cfg_attr(feature = "std", source)] base64::DecodeError), #[error("invalid encoding")] InvalidLength(#[from] InvalidLength), } @@ -216,6 +233,85 @@ pub mod hash_v2 { __marker: PhantomData E>, } + #[cfg(feature = "schemars")] + impl schemars::JsonSchema for Hash { + fn schema_name() -> String { + todo!() + } + + fn schema_id() -> alloc::borrow::Cow<'static, str> { + concat!(module_path!(), "::Hash").into() + } + + fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { + use schemars::schema::{ + InstanceType, Metadata, SchemaObject, SingleOrVec, StringValidation, + }; + + let (description, pattern) = E::jsonschema_info(Some(BYTES)); + + SchemaObject { + metadata: Some(Box::new(Metadata { + description: Some(format!( + "A fixed-length {BYTES}-byte sequence, encoded as {description}.", + )), + ..Default::default() + })), + instance_type: Some(SingleOrVec::Single(Box::new(InstanceType::String))), + string: Some(Box::new(StringValidation { + pattern: Some(pattern), + ..Default::default() + })), + ..Default::default() + } + .into() + } + } + + #[cfg(feature = "valuable")] + impl valuable::Valuable for Hash { + fn as_value(&self) -> valuable::Value<'_> { + valuable::Value::Renderable(valuable::Renderable::Display(self as &dyn Display)) + } + + fn visit(&self, visit: &mut dyn valuable::Visit) { + visit.visit_value(valuable::Valuable::as_value(self)); + } + } + + #[cfg(feature = "ethabi")] + impl From for Hash<20, E> { + fn from(value: alloy_core::primitives::Address) -> Self { + Self::new(value.0 .0) + } + } + + #[cfg(feature = "ethabi")] + impl From> for alloy_core::primitives::Address { + fn from(value: Hash<20, E>) -> Self { + Self::new(*value.get()) + } + } + + #[cfg(feature = "ethabi")] + impl From> + for Hash + { + fn from(value: alloy_core::primitives::FixedBytes) -> Self { + Self::new(value.0) + } + } + + #[cfg(feature = "ethabi")] + impl From> + for alloy_core::primitives::FixedBytes + { + fn from(value: Hash) -> Self { + Self(*value.get()) + } + } + + #[cfg(feature = "ssz")] impl ssz::Ssz for Hash where typenum::Const: typenum::ToUInt, @@ -250,6 +346,12 @@ pub mod hash_v2 { } } + impl AsMut<[u8]> for Hash { + fn as_mut(&mut self) -> &mut [u8] { + self.get_mut() + } + } + impl Clone for Hash { fn clone(&self) -> Self { *self @@ -349,11 +451,14 @@ pub mod hash_v2 { } } - impl Serialize for Hash { + #[cfg(feature = "serde")] + impl serde::Serialize for Hash { fn serialize(&self, serializer: S) -> Result where - S: Serializer, + S: serde::Serializer, { + use serde::ser::SerializeTupleStruct; + if serializer.is_human_readable() { serializer.collect_str(self) } else { @@ -366,10 +471,11 @@ pub mod hash_v2 { } } - impl<'de, const BYTES: usize, E: Encoding> Deserialize<'de> for Hash { + #[cfg(feature = "serde")] + impl<'de, const BYTES: usize, E: Encoding> serde::Deserialize<'de> for Hash { fn deserialize(deserializer: D) -> Result where - D: Deserializer<'de>, + D: serde::Deserializer<'de>, { if deserializer.is_human_readable() { String::deserialize(deserializer) @@ -387,7 +493,10 @@ pub mod hash_v2 { write!(formatter, "an array of length {N}") } - fn visit_seq(self, mut seq: A) -> ::core::result::Result<[u8; N], A::Error> + fn visit_seq( + self, + mut seq: A, + ) -> ::core::result::Result<[u8; N], >::Error> where A: serde::de::SeqAccess<'de>, { @@ -541,7 +650,7 @@ pub mod hash_v2 { } // TODO: Feature gate rlp across the crate - // #[cfg(feature = "rlp")] + #[cfg(feature = "rlp")] impl rlp::Decodable for Hash { fn decode(rlp: &rlp::Rlp) -> Result { rlp.decoder() @@ -555,72 +664,33 @@ pub mod hash_v2 { } } - // TODO: Feature gate rlp across the crate - // #[cfg(feature = "rlp")] + #[cfg(feature = "rlp")] impl rlp::Encodable for Hash { fn rlp_append(&self, s: &mut ::rlp::RlpStream) { s.encoder().encode_value(self.as_ref()); } } - #[cfg(feature = "ethabi")] - impl TryFrom<::ethers_core::types::Bytes> for Hash { + #[cfg(feature = "ethabi")] // TODO: Maybe if_alloy? + impl TryFrom<::alloy_core::primitives::Bytes> for Hash { type Error = >>::Error; - fn try_from(value: ::ethers_core::types::Bytes) -> Result { + fn try_from(value: ::alloy_core::primitives::Bytes) -> Result { Self::try_from(&value.0[..]) } } - #[cfg(feature = "ethabi")] - impl TryFrom<&'_ ::ethers_core::types::Bytes> for Hash { + #[cfg(feature = "ethabi")] // TODO: Maybe if_alloy? + impl TryFrom<&'_ ::alloy_core::primitives::Bytes> + for Hash + { type Error = >>::Error; - fn try_from(value: &::ethers_core::types::Bytes) -> Result { + fn try_from(value: &::alloy_core::primitives::Bytes) -> Result { Self::try_from(&value.0[..]) } } - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::AbiType for Hash { - fn param_type() -> ::ethers_core::abi::ParamType { - ::ethers_core::abi::ParamType::FixedBytes(BYTES) - } - } - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::AbiArrayType for Hash {} - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::AbiEncode for Hash { - fn encode(self) -> Vec { - self.get().encode() - } - } - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::AbiDecode for Hash { - fn decode(bytes: impl AsRef<[u8]>) -> Result { - <[u8; BYTES]>::decode(bytes).map(Self::new) - } - } - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::Tokenizable for Hash { - fn from_token( - token: ::ethers_core::abi::Token, - ) -> Result { - <[u8; BYTES]>::from_token(token).map(Self::new) - } - - fn into_token(self) -> ::ethers_core::abi::Token { - self.get().into_token() - } - } - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::TokenizableItem for Hash {} - #[cfg(test)] mod tests { use hex::FromHexError; diff --git a/lib/unionlabs/src/ibc/core/channel/channel.rs b/lib/unionlabs/src/ibc/core/channel/channel.rs index 3453167a3c..83704e1f99 100644 --- a/lib/unionlabs/src/ibc/core/channel/channel.rs +++ b/lib/unionlabs/src/ibc/core/channel/channel.rs @@ -1,135 +1,81 @@ use macros::model; -#[cfg(feature = "ethabi")] -use crate::ibc::core::channel::counterparty::TryFromEthAbiChannelCounterpartyError; use crate::{ - errors::{required, MissingField, UnknownEnumVariant}, - ibc::core::channel::{ - counterparty::{Counterparty, TryFromChannelCounterpartyError}, - order::Order, - state::State, - }, - id::{ConnectionId, ConnectionIdValidator}, - validated::{Validate, ValidateT}, + ibc::core::channel::{counterparty::Counterparty, order::Order, state::State}, + id::ConnectionId, }; -#[model( - proto(raw(protos::ibc::core::channel::v1::Channel), into, from), - ethabi(raw(contracts::ibc_handler::IbcCoreChannelV1ChannelData), into, from) -)] +#[model(proto(raw(protos::ibc::core::channel::v1::Channel), into, from))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct Channel { pub state: State, pub ordering: Order, pub counterparty: Counterparty, + // TODO: this must be non-empty pub connection_hops: Vec, // REVIEW(benluelo): Make this more strongly typed? pub version: String, } -impl From for protos::ibc::core::channel::v1::Channel { - fn from(value: Channel) -> Self { - Self { - state: value.state as i32, - ordering: value.ordering as i32, - counterparty: Some(value.counterparty.into()), - connection_hops: value - .connection_hops - .into_iter() - .map(|x| x.to_string()) - .collect(), - version: value.version, - } - } -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField, UnknownEnumVariant}, + ibc::core::channel::{ + channel::Channel, counterparty::proto::TryFromChannelCounterpartyError, order::Order, + state::State, + }, + id::{ConnectionId, ParsePrefixedIdError}, + }; -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromChannelError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid state")] - State(#[source] UnknownEnumVariant), - #[error("invalid counterparty")] - Counterparty(#[from] TryFromChannelCounterpartyError), - #[error("invalid ordering")] - Ordering(#[source] UnknownEnumVariant), - #[error("invalid connection_hops")] - ConnectionHops(#[from] >::Error), -} - -impl TryFrom for Channel { - type Error = TryFromChannelError; - - fn try_from(proto: protos::ibc::core::channel::v1::Channel) -> Result { - Ok(Channel { - state: State::try_from(proto.state).map_err(TryFromChannelError::State)?, - ordering: Order::try_from(proto.ordering).map_err(TryFromChannelError::State)?, - counterparty: required!(proto.counterparty)? - .try_into() - .map_err(TryFromChannelError::Counterparty)?, - connection_hops: proto - .connection_hops - .into_iter() - .map(ValidateT::validate) - .collect::>() - .map_err(TryFromChannelError::ConnectionHops)?, - version: proto.version, - }) - } -} - -#[cfg(feature = "ethabi")] -impl From for contracts::ibc_handler::IbcCoreChannelV1ChannelData { - fn from(value: Channel) -> Self { - Self { - state: value.state as u8, - ordering: value.ordering as u8, - counterparty: value.counterparty.into(), - connection_hops: value - .connection_hops - .into_iter() - .map(|x| x.to_string()) - .collect(), - version: value.version, + impl From for protos::ibc::core::channel::v1::Channel { + fn from(value: Channel) -> Self { + Self { + state: value.state as i32, + ordering: value.ordering as i32, + counterparty: Some(value.counterparty.into()), + connection_hops: value + .connection_hops + .into_iter() + .map(|x| x.to_string_prefixed()) + .collect(), + version: value.version, + } } } -} -#[cfg(feature = "ethabi")] -#[derive(Debug)] -pub enum TryFromEthAbiChannelError { - State(UnknownEnumVariant), - Ordering(UnknownEnumVariant), - Counterparty(TryFromEthAbiChannelCounterpartyError), - ConnectionHops(>::Error), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromChannelError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid state")] + State(#[source] UnknownEnumVariant), + #[error("invalid counterparty")] + Counterparty(#[from] TryFromChannelCounterpartyError), + #[error("invalid ordering")] + Ordering(#[source] UnknownEnumVariant), + #[error("invalid connection_hops")] + ConnectionHops(#[from] ParsePrefixedIdError), + } -#[cfg(feature = "ethabi")] -impl TryFrom for Channel { - type Error = TryFromEthAbiChannelError; + impl TryFrom for Channel { + type Error = TryFromChannelError; - fn try_from( - value: contracts::ibc_handler::IbcCoreChannelV1ChannelData, - ) -> Result { - Ok(Self { - state: value - .state - .try_into() - .map_err(TryFromEthAbiChannelError::State)?, - ordering: value - .ordering - .try_into() - .map_err(TryFromEthAbiChannelError::Ordering)?, - counterparty: value - .counterparty - .try_into() - .map_err(TryFromEthAbiChannelError::Counterparty)?, - connection_hops: value - .connection_hops - .into_iter() - .map(ValidateT::validate) - .collect::>() - .map_err(TryFromEthAbiChannelError::ConnectionHops)?, - version: value.version, - }) + fn try_from(proto: protos::ibc::core::channel::v1::Channel) -> Result { + Ok(Channel { + state: State::try_from(proto.state).map_err(TryFromChannelError::State)?, + ordering: Order::try_from(proto.ordering).map_err(TryFromChannelError::State)?, + counterparty: required!(proto.counterparty)? + .try_into() + .map_err(TryFromChannelError::Counterparty)?, + connection_hops: proto + .connection_hops + .into_iter() + .map(|s| ConnectionId::parse_prefixed(&s)) + .collect::>() + .map_err(TryFromChannelError::ConnectionHops)?, + version: proto.version, + }) + } } } diff --git a/lib/unionlabs/src/ibc/core/channel/counterparty.rs b/lib/unionlabs/src/ibc/core/channel/counterparty.rs index 3ede617cb2..a5a7bbdd98 100644 --- a/lib/unionlabs/src/ibc/core/channel/counterparty.rs +++ b/lib/unionlabs/src/ibc/core/channel/counterparty.rs @@ -1,82 +1,59 @@ -use core::str::FromStr; - use macros::model; -use crate::id::PortId; +use crate::id::{ChannelId, PortId}; -#[model( - proto(raw(protos::ibc::core::channel::v1::Counterparty), into, from), - ethabi( - raw(contracts::ibc_handler::IbcCoreChannelV1CounterpartyData), - into, - from - ) -)] +#[model(proto(raw(protos::ibc::core::channel::v1::Counterparty), into, from))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct Counterparty { pub port_id: PortId, - // TODO: Option, same as connection counterparty - pub channel_id: String, + pub channel_id: Option, } -impl From for protos::ibc::core::channel::v1::Counterparty { - fn from(value: Counterparty) -> Self { - Self { - port_id: value.port_id.to_string(), - channel_id: value.channel_id, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + ibc::core::channel::counterparty::Counterparty, + id::{ChannelId, Ics24IdParseError, ParsePrefixedIdError}, + }; + + impl From for protos::ibc::core::channel::v1::Counterparty { + fn from(value: Counterparty) -> Self { + Self { + port_id: value.port_id.to_string(), + channel_id: value + .channel_id + .map_or_else(String::new, |channel_id| channel_id.to_string_prefixed()), + } } } -} - -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromChannelCounterpartyError { - #[error("error parsing port id")] - PortId(#[source] ::Err), -} - -impl TryFrom for Counterparty { - type Error = TryFromChannelCounterpartyError; - fn try_from(proto: protos::ibc::core::channel::v1::Counterparty) -> Result { - Ok(Self { - port_id: proto - .port_id - .parse() - .map_err(TryFromChannelCounterpartyError::PortId)?, - channel_id: proto.channel_id, - }) + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromChannelCounterpartyError { + #[error("invalid port_id")] + PortId(#[source] Ics24IdParseError), + #[error("invalid channel_id")] + ChannelId(#[source] ParsePrefixedIdError), } -} -#[cfg(feature = "ethabi")] -impl From for contracts::ibc_handler::IbcCoreChannelV1CounterpartyData { - fn from(value: Counterparty) -> Self { - Self { - port_id: value.port_id.to_string(), - channel_id: value.channel_id, + impl TryFrom for Counterparty { + type Error = TryFromChannelCounterpartyError; + + fn try_from( + proto: protos::ibc::core::channel::v1::Counterparty, + ) -> Result { + Ok(Self { + port_id: proto + .port_id + .parse() + .map_err(TryFromChannelCounterpartyError::PortId)?, + channel_id: if proto.channel_id.is_empty() { + None + } else { + ChannelId::parse_prefixed(&proto.channel_id) + .map(Some) + .map_err(TryFromChannelCounterpartyError::ChannelId)? + }, + }) } } } - -#[cfg(feature = "ethabi")] -#[derive(Debug, thiserror::Error)] -pub enum TryFromEthAbiChannelCounterpartyError { - #[error("error parsing port id")] - PortId(#[source] ::Err), -} - -#[cfg(feature = "ethabi")] -impl TryFrom for Counterparty { - type Error = TryFromEthAbiChannelCounterpartyError; - - fn try_from( - value: contracts::ibc_handler::IbcCoreChannelV1CounterpartyData, - ) -> Result { - Ok(Self { - port_id: value - .port_id - .parse() - .map_err(TryFromEthAbiChannelCounterpartyError::PortId)?, - channel_id: value.channel_id, - }) - } -} diff --git a/lib/unionlabs/src/ibc/core/channel/msg_acknowledgement.rs b/lib/unionlabs/src/ibc/core/channel/msg_acknowledgement.rs index 70c0e40986..2114c8ca1c 100644 --- a/lib/unionlabs/src/ibc/core/channel/msg_acknowledgement.rs +++ b/lib/unionlabs/src/ibc/core/channel/msg_acknowledgement.rs @@ -3,12 +3,13 @@ use macros::model; use crate::ibc::core::{channel::packet::Packet, client::height::Height}; #[model(proto(raw(protos::ibc::core::channel::v1::MsgAcknowledgement)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgAcknowledgement { pub packet: Packet, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub acknowledgement: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_acked: Vec, pub proof_height: Height, diff --git a/lib/unionlabs/src/ibc/core/channel/msg_channel_open_ack.rs b/lib/unionlabs/src/ibc/core/channel/msg_channel_open_ack.rs index 314cfd8e32..435b8c360b 100644 --- a/lib/unionlabs/src/ibc/core/channel/msg_channel_open_ack.rs +++ b/lib/unionlabs/src/ibc/core/channel/msg_channel_open_ack.rs @@ -6,13 +6,14 @@ use crate::{ }; #[model(proto(raw(protos::ibc::core::channel::v1::MsgChannelOpenAck)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgChannelOpenAck { pub port_id: PortId, pub channel_id: ChannelId, pub counterparty_channel_id: ChannelId, // yes, this is actually just an unbounded string pub counterparty_version: String, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_try: Vec, pub proof_height: Height, diff --git a/lib/unionlabs/src/ibc/core/channel/msg_channel_open_confirm.rs b/lib/unionlabs/src/ibc/core/channel/msg_channel_open_confirm.rs index ed2c40de7b..5c0b2f64d7 100644 --- a/lib/unionlabs/src/ibc/core/channel/msg_channel_open_confirm.rs +++ b/lib/unionlabs/src/ibc/core/channel/msg_channel_open_confirm.rs @@ -6,10 +6,11 @@ use crate::{ }; #[model(proto(raw(protos::ibc::core::channel::v1::MsgChannelOpenConfirm)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgChannelOpenConfirm { pub port_id: PortId, pub channel_id: ChannelId, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_ack: Vec, pub proof_height: Height, diff --git a/lib/unionlabs/src/ibc/core/channel/msg_channel_open_init.rs b/lib/unionlabs/src/ibc/core/channel/msg_channel_open_init.rs index a7e97c0dfd..5d1cdd9051 100644 --- a/lib/unionlabs/src/ibc/core/channel/msg_channel_open_init.rs +++ b/lib/unionlabs/src/ibc/core/channel/msg_channel_open_init.rs @@ -3,6 +3,7 @@ use macros::model; use crate::{ibc::core::channel::channel::Channel, id::PortId}; #[model(proto(raw(protos::ibc::core::channel::v1::MsgChannelOpenInit)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgChannelOpenInit { pub port_id: PortId, pub channel: Channel, diff --git a/lib/unionlabs/src/ibc/core/channel/msg_channel_open_try.rs b/lib/unionlabs/src/ibc/core/channel/msg_channel_open_try.rs index ad56b01265..06f70bda71 100644 --- a/lib/unionlabs/src/ibc/core/channel/msg_channel_open_try.rs +++ b/lib/unionlabs/src/ibc/core/channel/msg_channel_open_try.rs @@ -6,11 +6,12 @@ use crate::{ }; #[model(proto(raw(protos::ibc::core::channel::v1::MsgChannelOpenTry)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgChannelOpenTry { pub port_id: PortId, pub channel: Channel, pub counterparty_version: String, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_init: Vec, pub proof_height: Height, diff --git a/lib/unionlabs/src/ibc/core/channel/msg_recv_packet.rs b/lib/unionlabs/src/ibc/core/channel/msg_recv_packet.rs index 14a8d07c67..efb1677e0c 100644 --- a/lib/unionlabs/src/ibc/core/channel/msg_recv_packet.rs +++ b/lib/unionlabs/src/ibc/core/channel/msg_recv_packet.rs @@ -3,9 +3,10 @@ use macros::model; use crate::ibc::core::{channel::packet::Packet, client::height::Height}; #[model(proto(raw(protos::ibc::core::channel::v1::MsgRecvPacket)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgRecvPacket { pub packet: Packet, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_commitment: Vec, pub proof_height: Height, diff --git a/lib/unionlabs/src/ibc/core/channel/msg_timeout.rs b/lib/unionlabs/src/ibc/core/channel/msg_timeout.rs index d8ba842661..a5dac1d046 100644 --- a/lib/unionlabs/src/ibc/core/channel/msg_timeout.rs +++ b/lib/unionlabs/src/ibc/core/channel/msg_timeout.rs @@ -5,9 +5,10 @@ use macros::model; use crate::ibc::core::{channel::packet::Packet, client::height::Height}; #[model(proto(raw(protos::ibc::core::channel::v1::MsgRecvPacket)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgTimeout { pub packet: Packet, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_unreceived: Vec, pub proof_height: Height, diff --git a/lib/unionlabs/src/ibc/core/channel/packet.rs b/lib/unionlabs/src/ibc/core/channel/packet.rs index 20991c6c8d..02959e3ae7 100644 --- a/lib/unionlabs/src/ibc/core/channel/packet.rs +++ b/lib/unionlabs/src/ibc/core/channel/packet.rs @@ -1,105 +1,87 @@ -use core::num::{NonZeroU64, TryFromIntError}; +use core::num::NonZeroU64; use macros::model; use crate::{ - errors::{required, MissingField}, ibc::core::client::height::Height, - id::{ChannelId, ChannelIdValidator, PortId, PortIdValidator}, - validated::{Validate, ValidateT}, + id::{ChannelId, PortId}, }; #[model(proto(raw(protos::ibc::core::channel::v1::Packet), into, from))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct Packet { pub sequence: NonZeroU64, pub source_port: PortId, pub source_channel: ChannelId, pub destination_port: PortId, pub destination_channel: ChannelId, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub data: Vec, pub timeout_height: Height, pub timeout_timestamp: u64, } -impl From for protos::ibc::core::channel::v1::Packet { - fn from(value: Packet) -> Self { - Self { - sequence: value.sequence.get(), - source_port: value.source_port.to_string(), - source_channel: value.source_channel.to_string(), - destination_port: value.destination_port.to_string(), - destination_channel: value.destination_channel.to_string(), - data: value.data, - timeout_height: Some(value.timeout_height.into()), - timeout_timestamp: value.timeout_timestamp, - } - } -} - -#[derive(Debug)] -pub enum TryFromPacketError { - MissingField(MissingField), - Sequence(TryFromIntError), - SourceChannel(>::Error), - DestinationChannel(>::Error), - SourcePort(>::Error), - DestinationPort(>::Error), -} +#[cfg(feature = "proto")] +pub mod proto { + use core::num::TryFromIntError; -impl TryFrom for Packet { - type Error = TryFromPacketError; + use crate::{ + errors::{required, MissingField}, + ibc::core::channel::packet::Packet, + id::{ChannelId, Ics24IdParseError, ParsePrefixedIdError}, + }; - fn try_from(proto: protos::ibc::core::channel::v1::Packet) -> Result { - Ok(Packet { - sequence: proto - .sequence - .try_into() - .map_err(TryFromPacketError::Sequence)?, - source_port: proto - .source_port - .validate() - .map_err(TryFromPacketError::SourcePort)?, - source_channel: proto - .source_channel - .validate() - .map_err(TryFromPacketError::SourceChannel)?, - destination_port: proto - .destination_port - .validate() - .map_err(TryFromPacketError::DestinationPort)?, + impl From for protos::ibc::core::channel::v1::Packet { + fn from(value: Packet) -> Self { + Self { + sequence: value.sequence.get(), + source_port: value.source_port.to_string(), + source_channel: value.source_channel.to_string_prefixed(), + destination_port: value.destination_port.to_string(), + destination_channel: value.destination_channel.to_string_prefixed(), + data: value.data, + timeout_height: Some(value.timeout_height.into()), + timeout_timestamp: value.timeout_timestamp, + } + } + } - destination_channel: proto - .destination_channel - .validate() - .map_err(TryFromPacketError::DestinationChannel)?, - data: proto.data, - timeout_height: required!(proto.timeout_height)?.into(), - timeout_timestamp: proto.timeout_timestamp, - }) + #[derive(Debug)] + pub enum TryFromPacketError { + MissingField(MissingField), + Sequence(TryFromIntError), + SourceChannel(ParsePrefixedIdError), + DestinationChannel(ParsePrefixedIdError), + SourcePort(Ics24IdParseError), + DestinationPort(Ics24IdParseError), } -} -#[cfg(feature = "ethabi")] -#[derive(Debug)] -pub enum TryFromEthAbiPacketError { - SourceChannel(>::Error), - DestinationChannel(>::Error), -} + impl TryFrom for Packet { + type Error = TryFromPacketError; -#[cfg(feature = "ethabi")] -impl From for contracts::ibc_handler::IbcCoreChannelV1PacketData { - fn from(value: Packet) -> Self { - Self { - sequence: value.sequence.get(), - source_port: value.source_port.to_string(), - source_channel: value.source_channel.to_string(), - destination_port: value.destination_port.to_string(), - destination_channel: value.destination_channel.to_string(), - data: value.data.into(), - timeout_height: value.timeout_height.into(), - timeout_timestamp: value.timeout_timestamp, + fn try_from(proto: protos::ibc::core::channel::v1::Packet) -> Result { + Ok(Packet { + sequence: proto + .sequence + .try_into() + .map_err(TryFromPacketError::Sequence)?, + source_port: proto + .source_port + .parse() + .map_err(TryFromPacketError::SourcePort)?, + source_channel: ChannelId::parse_prefixed(&proto.source_channel) + .map_err(TryFromPacketError::SourceChannel)?, + destination_port: proto + .destination_port + .parse() + .map_err(TryFromPacketError::DestinationPort)?, + destination_channel: ChannelId::parse_prefixed(&proto.destination_channel) + .map_err(TryFromPacketError::DestinationChannel)?, + data: proto.data, + timeout_height: required!(proto.timeout_height)?.into(), + timeout_timestamp: proto.timeout_timestamp, + }) } } } diff --git a/lib/unionlabs/src/ibc/core/client/genesis_metadata.rs b/lib/unionlabs/src/ibc/core/client/genesis_metadata.rs index ded6fb6079..2624966dd8 100644 --- a/lib/unionlabs/src/ibc/core/client/genesis_metadata.rs +++ b/lib/unionlabs/src/ibc/core/client/genesis_metadata.rs @@ -2,10 +2,10 @@ use macros::model; #[model] pub struct GenesisMetadata { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug("{}", ::serde_utils::to_hex(&key))] pub key: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug("{}", ::serde_utils::to_hex(&value))] pub value: Vec, } diff --git a/lib/unionlabs/src/ibc/core/client/height.rs b/lib/unionlabs/src/ibc/core/client/height.rs index 83582f4da6..1478558e6e 100644 --- a/lib/unionlabs/src/ibc/core/client/height.rs +++ b/lib/unionlabs/src/ibc/core/client/height.rs @@ -1,30 +1,83 @@ use core::{ - fmt::{Debug, Display}, - num::ParseIntError, + cmp::Ordering, + fmt::{self, Debug}, + num::{NonZeroU64, ParseIntError}, str::FromStr, }; use macros::model; -use ssz::Ssz; -#[derive(Ssz, Default, Copy)] -#[model(proto(raw(protos::ibc::core::client::v1::Height), into, from))] +#[model( + proto(raw(protos::ibc::core::client::v1::Height), into, from), + no_serde +)] +#[derive(Default, Copy)] #[debug("Height({self})")] -#[cfg_attr(feature = "schemars", derive(::schemars::JsonSchema))] #[derive(Hash)] +// TODO: Implement Valuable via Display once https://github.com/tokio-rs/valuable/pull/133 is merged pub struct Height { - // REVIEW: Why default? - #[serde(default)] - pub revision_number: u64, - pub revision_height: u64, + revision: Option, + height: u64, +} + +#[cfg(feature = "valuable")] +impl valuable::Valuable for Height { + fn as_value(&self) -> valuable::Value<'_> { + valuable::Value::Renderable(valuable::Renderable::Display(self)) + } + + fn visit(&self, visit: &mut dyn valuable::Visit) { + visit.visit_value(self.as_value()); + } } impl Height { + #[must_use] + pub const fn new(height: u64) -> Self { + Self { + revision: None, + height, + } + } + + #[must_use] + pub const fn new_with_revision(revision: u64, height: u64) -> Self { + Self { + revision: NonZeroU64::new(revision), + height, + } + } + + #[must_use] + pub const fn height(&self) -> u64 { + self.height + } + + #[must_use] + pub const fn height_mut(&mut self) -> &mut u64 { + &mut self.height + } + + #[must_use] + pub const fn revision(&self) -> u64 { + match self.revision { + Some(revision) => revision.get(), + None => 0, + } + } + #[must_use] pub const fn increment(self) -> Self { Self { - revision_number: self.revision_number, - revision_height: self.revision_height + 1, + revision: self.revision, + height: self.height + 1, + } + } + + pub fn from_str_allow_zero_revision(s: &str) -> Result { + match s.split_once('-') { + Some((n, h)) => Ok(Self::new_with_revision(n.parse()?, h.parse()?)), + None => Err(HeightFromStrError::Invalid), } } } @@ -33,97 +86,170 @@ impl FromStr for Height { type Err = HeightFromStrError; fn from_str(s: &str) -> Result { - s.split_once('-') - .ok_or(HeightFromStrError::Invalid) - .and_then(|(n, h)| { - Ok(Self { - revision_number: n.parse().map_err(HeightFromStrError::ParseIntError)?, - revision_height: h.parse().map_err(HeightFromStrError::ParseIntError)?, - }) - }) + match s.split_once('-') { + Some((n, h)) => Ok(Self { + revision: Some(n.parse().map_err(HeightFromStrError::ParseIntError)?), + height: h.parse().map_err(HeightFromStrError::ParseIntError)?, + }), + None => Ok(Self { + revision: None, + height: s.parse().map_err(HeightFromStrError::ParseIntError)?, + }), + } } } -#[derive(Debug, PartialEq, Eq)] +#[derive(Debug, PartialEq, Eq, thiserror::Error)] pub enum HeightFromStrError { - ParseIntError(ParseIntError), + #[error("invalid numeric value in height string")] + ParseIntError(#[from] ParseIntError), + #[error("invalid height string")] Invalid, } -impl Display for HeightFromStrError { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - match self { - HeightFromStrError::ParseIntError(e) => write!(f, "invalid height string: {e}"), - HeightFromStrError::Invalid => write!(f, "invalid height string"), - } +impl PartialOrd for Height { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) } } -impl core::error::Error for HeightFromStrError { - fn source(&self) -> Option<&(dyn core::error::Error + 'static)> { - match self { - HeightFromStrError::ParseIntError(e) => Some(e), - HeightFromStrError::Invalid => None, +impl Ord for Height { + fn cmp(&self, other: &Self) -> Ordering { + match self.revision.cmp(&other.revision) { + Ordering::Less => Ordering::Less, + Ordering::Equal => self.height.cmp(&other.height), + Ordering::Greater => Ordering::Greater, } } } -impl From for Height { - fn from(proto: protos::ibc::core::client::v1::Height) -> Self { - Self { - revision_number: proto.revision_number, - revision_height: proto.revision_height, +impl fmt::Display for Height { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self.revision { + Some(revision_number) => { + write!(f, "{}-{}", revision_number, self.height) + } + None => { + write!(f, "{}", self.height) + } } } } -impl From for protos::ibc::core::client::v1::Height { - fn from(value: Height) -> Self { - Self { - revision_number: value.revision_number, - revision_height: value.revision_height, +#[cfg(feature = "serde")] +impl serde::Serialize for Height { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + use serde::ser::SerializeTuple; + + if serializer.is_human_readable() { + serializer.collect_str(self) + } else { + let mut ser = serializer.serialize_tuple(2)?; + ser.serialize_element(&self.revision())?; + ser.serialize_element(&self.height())?; + ser.end() } } } -impl PartialOrd for Height { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} +#[cfg(feature = "serde")] +impl<'de> serde::Deserialize<'de> for Height { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + if deserializer.is_human_readable() { + struct HeightStrVisitor; -impl Ord for Height { - fn cmp(&self, other: &Self) -> core::cmp::Ordering { - match self.revision_number.cmp(&other.revision_number) { - core::cmp::Ordering::Less => core::cmp::Ordering::Less, - core::cmp::Ordering::Equal => self.revision_height.cmp(&other.revision_height), - core::cmp::Ordering::Greater => core::cmp::Ordering::Greater, + impl serde::de::Visitor<'_> for HeightStrVisitor { + type Value = Height; + + fn expecting(&self, formatter: &mut core::fmt::Formatter) -> core::fmt::Result { + formatter.write_str("string representation of Height") + } + + fn visit_str(self, v: &str) -> Result + where + E: serde::de::Error, + { + v.parse().map_err(serde::de::Error::custom) + } + + fn visit_string(self, v: String) -> Result + where + E: serde::de::Error, + { + v.parse().map_err(serde::de::Error::custom) + } + } + + deserializer.deserialize_any(HeightStrVisitor) + } else { + <(u64, u64)>::deserialize(deserializer).map(|(n, h)| Height::new_with_revision(n, h)) } } } -impl core::fmt::Display for Height { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(f, "{}-{}", self.revision_number, self.revision_height) +#[cfg(feature = "schemars")] +impl ::schemars::JsonSchema for Height { + fn schema_name() -> String { + "Height".to_owned() } -} -#[cfg(feature = "ethabi")] -impl From for contracts::shared_types::IbcCoreClientV1HeightData { - fn from(value: Height) -> Self { - Self { - revision_number: value.revision_number, - revision_height: value.revision_height, + fn schema_id() -> alloc::borrow::Cow<'static, str> { + alloc::borrow::Cow::Borrowed(concat!(module_path!(), "::NonGenericType")) + } + + fn json_schema(_: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { + use schemars::schema::{ + InstanceType, Metadata, SchemaObject, SingleOrVec, StringValidation, + }; + + SchemaObject { + metadata: Some(Box::new(Metadata { + description: Some( + "A blockchain height, optionally prefixed with a revision \ + number as per the [IBC Specification]\ + (https://ibc.cosmos.network/main/ibc/overview/#ibc-client-heights)." + .to_owned(), + ), + ..Default::default() + })), + instance_type: Some(SingleOrVec::Single(Box::new(InstanceType::String))), + string: Some(Box::new(StringValidation { + // nonzero revision number - revision height + pattern: Some(r"([1-9]\d*-)?\d+".to_owned()), + ..Default::default() + })), + ..Default::default() } + .into() } } -#[cfg(feature = "ethabi")] -impl From for Height { - fn from(value: contracts::shared_types::IbcCoreClientV1HeightData) -> Self { - Self { - revision_number: value.revision_number, - revision_height: value.revision_height, +#[cfg(feature = "proto")] +pub mod proto { + use core::num::NonZeroU64; + + use crate::ibc::core::client::height::Height; + + impl From for Height { + fn from(proto: protos::ibc::core::client::v1::Height) -> Self { + Self { + revision: NonZeroU64::new(proto.revision_number), + height: proto.revision_height, + } + } + } + impl From for protos::ibc::core::client::v1::Height { + fn from(value: Height) -> Self { + Self { + revision_number: value.revision.map_or_else(|| 0, NonZeroU64::get), + revision_height: value.height, + } } } } @@ -132,14 +258,20 @@ impl From for Height { mod tests { use super::*; + macro_rules! nz { + ($n:expr) => { + const { crate::option_unwrap!(NonZeroU64::new($n)) } + }; + } + #[test] fn debug() { assert_eq!( format!( "{:?}", Height { - revision_number: 1, - revision_height: 1, + revision: Some(nz!(1)), + height: 1, } ), "Height(1-1)" @@ -149,11 +281,36 @@ mod tests { format!( "{:?}", Height { - revision_number: 1, - revision_height: 1, + revision: None, + height: 1, } ), - "Height(1-1)" + "Height(1)" + ); + } + + #[test] + fn diplay() { + assert_eq!( + format!( + "{}", + Height { + revision: Some(nz!(1)), + height: 1, + } + ), + "1-1" + ); + + assert_eq!( + format!( + "{}", + Height { + revision: None, + height: 1, + } + ), + "1" ); } @@ -162,24 +319,24 @@ mod tests { assert_eq!( Height::from_str("1-1"), Ok(Height { - revision_number: 1, - revision_height: 1, + revision: Some(nz!(1)), + height: 1, }) ); assert_eq!( - Height::from_str("0-0"), + Height::from_str("1-0"), Ok(Height { - revision_number: 0, - revision_height: 0, + revision: Some(nz!(1)), + height: 0, }) ); assert_eq!( Height::from_str(&format!("{0}-{0}", u64::MAX)), Ok(Height { - revision_number: u64::MAX, - revision_height: u64::MAX, + revision: Some(nz!(u64::MAX)), + height: u64::MAX, }) ); @@ -189,9 +346,9 @@ mod tests { Err(HeightFromStrError::ParseIntError(_)) )); - assert_eq!( + assert!(matches!( Height::from_str("gibberish"), - Err(HeightFromStrError::Invalid) - ); + Err(HeightFromStrError::ParseIntError(_)) + )); } } diff --git a/lib/unionlabs/src/ibc/core/client/msg_create_client.rs b/lib/unionlabs/src/ibc/core/client/msg_create_client.rs index e78dd5fe8e..2ce28c2f91 100644 --- a/lib/unionlabs/src/ibc/core/client/msg_create_client.rs +++ b/lib/unionlabs/src/ibc/core/client/msg_create_client.rs @@ -1,11 +1,12 @@ use macros::model; #[model(proto(raw(protos::ibc::core::client::v1::MsgCreateClient)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgCreateClient { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub client_state: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub consensus_state: Vec, } diff --git a/lib/unionlabs/src/ibc/core/client/msg_update_client.rs b/lib/unionlabs/src/ibc/core/client/msg_update_client.rs index 13450b981e..8525349dfe 100644 --- a/lib/unionlabs/src/ibc/core/client/msg_update_client.rs +++ b/lib/unionlabs/src/ibc/core/client/msg_update_client.rs @@ -3,9 +3,10 @@ use macros::model; use crate::id::ClientId; #[model(proto(raw(protos::ibc::core::client::v1::MsgUpdateClient)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgUpdateClient { pub client_id: ClientId, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub client_message: Vec, } diff --git a/lib/unionlabs/src/ibc/core/commitment/merkle_path.rs b/lib/unionlabs/src/ibc/core/commitment/merkle_path.rs index 86c442b68f..7452f0aa06 100644 --- a/lib/unionlabs/src/ibc/core/commitment/merkle_path.rs +++ b/lib/unionlabs/src/ibc/core/commitment/merkle_path.rs @@ -5,18 +5,23 @@ pub struct MerklePath { pub key_path: Vec, } -impl From for protos::ibc::core::commitment::v1::MerklePath { - fn from(value: MerklePath) -> Self { - Self { - key_path: value.key_path, +#[cfg(feature = "proto")] +pub mod proto { + use crate::ibc::core::commitment::merkle_path::MerklePath; + + impl From for protos::ibc::core::commitment::v1::MerklePath { + fn from(value: MerklePath) -> Self { + Self { + key_path: value.key_path, + } } } -} -impl From for MerklePath { - fn from(value: protos::ibc::core::commitment::v1::MerklePath) -> Self { - Self { - key_path: value.key_path, + impl From for MerklePath { + fn from(value: protos::ibc::core::commitment::v1::MerklePath) -> Self { + Self { + key_path: value.key_path, + } } } } diff --git a/lib/unionlabs/src/ibc/core/commitment/merkle_prefix.rs b/lib/unionlabs/src/ibc/core/commitment/merkle_prefix.rs index 078cf7e12e..eccd0dd5f3 100644 --- a/lib/unionlabs/src/ibc/core/commitment/merkle_prefix.rs +++ b/lib/unionlabs/src/ibc/core/commitment/merkle_prefix.rs @@ -1,45 +1,31 @@ -#[cfg(feature = "ethabi")] -use contracts::ibc_handler::IbcCoreCommitmentV1MerklePrefixData; use macros::model; #[model(proto(raw(protos::ibc::core::commitment::v1::MerklePrefix), into, from))] #[cfg_attr(feature = "schemars", derive(::schemars::JsonSchema))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MerklePrefix { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[cfg_attr(feature = "schemars", schemars(with = "String"))] pub key_prefix: Vec, } -impl From for MerklePrefix { - fn from(proto: protos::ibc::core::commitment::v1::MerklePrefix) -> Self { - Self { - key_prefix: proto.key_prefix, - } - } -} - -impl From for protos::ibc::core::commitment::v1::MerklePrefix { - fn from(value: MerklePrefix) -> Self { - Self { - key_prefix: value.key_prefix, - } - } -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::ibc::core::commitment::merkle_prefix::MerklePrefix; -#[cfg(feature = "ethabi")] -impl From for IbcCoreCommitmentV1MerklePrefixData { - fn from(value: MerklePrefix) -> Self { - Self { - key_prefix: value.key_prefix.into(), + impl From for MerklePrefix { + fn from(proto: protos::ibc::core::commitment::v1::MerklePrefix) -> Self { + Self { + key_prefix: proto.key_prefix, + } } } -} -#[cfg(feature = "ethabi")] -impl From for MerklePrefix { - fn from(value: IbcCoreCommitmentV1MerklePrefixData) -> Self { - Self { - key_prefix: value.key_prefix.to_vec(), + impl From for protos::ibc::core::commitment::v1::MerklePrefix { + fn from(value: MerklePrefix) -> Self { + Self { + key_prefix: value.key_prefix, + } } } } diff --git a/lib/unionlabs/src/ibc/core/commitment/merkle_proof.rs b/lib/unionlabs/src/ibc/core/commitment/merkle_proof.rs index 7f5f3e7970..9ff25c1aaa 100644 --- a/lib/unionlabs/src/ibc/core/commitment/merkle_proof.rs +++ b/lib/unionlabs/src/ibc/core/commitment/merkle_proof.rs @@ -1,39 +1,47 @@ use macros::model; -use crate::cosmos::ics23::commitment_proof::{CommitmentProof, TryFromCommitmentProofError}; +use crate::cosmos::ics23::commitment_proof::CommitmentProof; #[model(proto(raw(protos::ibc::core::commitment::v1::MerkleProof), into, from))] pub struct MerkleProof { pub proofs: Vec, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromMerkleProofError { - #[error("invalid proofs")] - Proofs(#[from] TryFromCommitmentProofError), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::ics23::commitment_proof::proto::TryFromCommitmentProofError, + ibc::core::commitment::merkle_proof::MerkleProof, + }; + + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromMerkleProofError { + #[error("invalid proofs")] + Proofs(#[from] TryFromCommitmentProofError), + } -impl TryFrom for MerkleProof { - type Error = TryFromMerkleProofError; - - fn try_from( - value: protos::ibc::core::commitment::v1::MerkleProof, - ) -> Result { - Ok(Self { - proofs: value - .proofs - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromMerkleProofError::Proofs)?, - }) + impl TryFrom for MerkleProof { + type Error = TryFromMerkleProofError; + + fn try_from( + value: protos::ibc::core::commitment::v1::MerkleProof, + ) -> Result { + Ok(Self { + proofs: value + .proofs + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromMerkleProofError::Proofs)?, + }) + } } -} -impl From for protos::ibc::core::commitment::v1::MerkleProof { - fn from(value: MerkleProof) -> Self { - Self { - proofs: value.proofs.into_iter().map(Into::into).collect(), + impl From for protos::ibc::core::commitment::v1::MerkleProof { + fn from(value: MerkleProof) -> Self { + Self { + proofs: value.proofs.into_iter().map(Into::into).collect(), + } } } } diff --git a/lib/unionlabs/src/ibc/core/commitment/merkle_root.rs b/lib/unionlabs/src/ibc/core/commitment/merkle_root.rs index 94e53661f8..0dafb6377e 100644 --- a/lib/unionlabs/src/ibc/core/commitment/merkle_root.rs +++ b/lib/unionlabs/src/ibc/core/commitment/merkle_root.rs @@ -1,64 +1,42 @@ -#[cfg(feature = "ethabi")] -use contracts::glue::IbcCoreCommitmentV1MerkleRootData; use macros::model; -use crate::{errors::InvalidLength, hash::H256}; +use crate::hash::H256; -// #[cfg_attr( -// feature = "ethabi", -// derive( -// ethers_contract_derive::EthAbiType, -// ethers_contract_derive::EthAbiCodec -// ) -// )] #[model(proto(raw(protos::ibc::core::commitment::v1::MerkleRoot), into, from))] pub struct MerkleRoot { pub hash: H256, } -impl From for protos::ibc::core::commitment::v1::MerkleRoot { - fn from(value: MerkleRoot) -> Self { - Self { - hash: value.hash.into(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{errors::InvalidLength, ibc::core::commitment::merkle_root::MerkleRoot}; + + impl From for protos::ibc::core::commitment::v1::MerkleRoot { + fn from(value: MerkleRoot) -> Self { + Self { + hash: value.hash.into(), + } } } -} - -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromMerkleRootError { - #[error("invalid hash")] - Hash(#[from] InvalidLength), -} - -impl TryFrom for MerkleRoot { - type Error = TryFromMerkleRootError; - fn try_from(value: protos::ibc::core::commitment::v1::MerkleRoot) -> Result { - Ok(Self { - hash: value - .hash - .try_into() - .map_err(TryFromMerkleRootError::Hash)?, - }) + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromMerkleRootError { + #[error("invalid hash")] + Hash(#[from] InvalidLength), } -} -#[cfg(feature = "ethabi")] -impl From for IbcCoreCommitmentV1MerkleRootData { - fn from(value: MerkleRoot) -> Self { - Self { - hash: value.hash.get().into(), + impl TryFrom for MerkleRoot { + type Error = TryFromMerkleRootError; + + fn try_from( + value: protos::ibc::core::commitment::v1::MerkleRoot, + ) -> Result { + Ok(Self { + hash: value + .hash + .try_into() + .map_err(TryFromMerkleRootError::Hash)?, + }) } } } - -#[cfg(feature = "ethabi")] -impl TryFrom for MerkleRoot { - type Error = TryFromMerkleRootError; - - fn try_from(value: IbcCoreCommitmentV1MerkleRootData) -> Result { - Ok(Self { - hash: value.hash.to_vec().try_into()?, - }) - } -} diff --git a/lib/unionlabs/src/ibc/core/connection/client_paths.rs b/lib/unionlabs/src/ibc/core/connection/client_paths.rs index 08b6234ec0..ca4df5e74c 100644 --- a/lib/unionlabs/src/ibc/core/connection/client_paths.rs +++ b/lib/unionlabs/src/ibc/core/connection/client_paths.rs @@ -2,17 +2,22 @@ use macros::model; #[model(proto(raw(protos::ibc::core::connection::v1::ClientPaths), into, from))] pub struct ClientPaths { - pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + pub paths: Vec, } -impl From for ClientPaths { - fn from(value: protos::ibc::core::connection::v1::ClientPaths) -> Self { - Self { paths: value.paths } +#[cfg(feature = "proto")] +pub mod proto { + use crate::ibc::core::connection::client_paths::ClientPaths; + + impl From for ClientPaths { + fn from(value: protos::ibc::core::connection::v1::ClientPaths) -> Self { + Self { paths: value.paths } + } } -} -impl From for protos::ibc::core::connection::v1::ClientPaths { - fn from(value: ClientPaths) -> Self { - protos::ibc::core::connection::v1::ClientPaths { paths: value.paths } + impl From for protos::ibc::core::connection::v1::ClientPaths { + fn from(value: ClientPaths) -> Self { + protos::ibc::core::connection::v1::ClientPaths { paths: value.paths } + } } } diff --git a/lib/unionlabs/src/ibc/core/connection/connection_end.rs b/lib/unionlabs/src/ibc/core/connection/connection_end.rs index e9e326edd9..d674d27e56 100644 --- a/lib/unionlabs/src/ibc/core/connection/connection_end.rs +++ b/lib/unionlabs/src/ibc/core/connection/connection_end.rs @@ -1,24 +1,13 @@ -use core::str::FromStr; - use macros::model; -#[cfg(feature = "ethabi")] -use crate::ibc::core::connection::counterparty::TryFromEthAbiConnectionCounterpartyError; use crate::{ - errors::{required, MissingField, UnknownEnumVariant}, - ibc::core::connection::{ - counterparty::{Counterparty, TryFromConnectionCounterpartyError}, - state::State, - version::Version, - }, + ibc::core::connection::{counterparty::Counterparty, state::State, version::Version}, id::ClientId, }; -#[model( - proto(raw(protos::ibc::core::connection::v1::ConnectionEnd), into, from), - ethabi(raw(contracts::glue::IbcCoreConnectionV1ConnectionEndData), into, from) -)] +#[model(proto(raw(protos::ibc::core::connection::v1::ConnectionEnd), into))] #[cfg_attr(feature = "schemars", derive(::schemars::JsonSchema))] +#[cfg_attr(feature = "valuable", derive(::valuable::Valuable))] pub struct ConnectionEnd { pub client_id: ClientId, pub versions: Vec, @@ -27,111 +16,67 @@ pub struct ConnectionEnd { pub delay_period: u64, } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromConnectionEndError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid client_id")] - ClientId(#[from] ::Err), - #[error("invalid version")] - Version(#[from] UnknownEnumVariant), - #[error("invalid state")] - State(#[from] UnknownEnumVariant), - #[error("invalid counterparty")] - Counterparty(#[from] TryFromConnectionCounterpartyError), -} - -impl TryFrom for ConnectionEnd { - type Error = TryFromConnectionEndError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField, UnknownEnumVariant}, + ibc::core::connection::{ + connection_end::ConnectionEnd, counterparty::proto::TryFromConnectionCounterpartyError, + }, + id::{ClientId, ParsePrefixedIdError}, + }; - fn try_from( - val: protos::ibc::core::connection::v1::ConnectionEnd, - ) -> Result { - Ok(Self { - client_id: val - .client_id - .parse() - .map_err(TryFromConnectionEndError::ClientId)?, - versions: val - .versions - .into_iter() - .map(|x| x.try_into().map_err(TryFromConnectionEndError::Version)) - .collect::>()?, - state: val - .state - .try_into() - .map_err(TryFromConnectionEndError::State)?, - counterparty: required!(val.counterparty)? - .try_into() - .map_err(TryFromConnectionEndError::Counterparty)?, - delay_period: val.delay_period, - }) + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromConnectionEndError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid client_id")] + ClientId(#[from] ParsePrefixedIdError), + #[error("invalid version")] + Version(#[from] UnknownEnumVariant), + #[error("invalid state")] + State(#[from] UnknownEnumVariant), + #[error("invalid counterparty")] + Counterparty(#[from] TryFromConnectionCounterpartyError), } -} -impl From for protos::ibc::core::connection::v1::ConnectionEnd { - fn from(val: ConnectionEnd) -> Self { - Self { - client_id: val.client_id.to_string(), - versions: val.versions.into_iter().map(Into::into).collect(), - state: val.state as i32, - counterparty: Some(val.counterparty.into()), - delay_period: val.delay_period, - } - } -} + impl TryFrom for ConnectionEnd { + type Error = TryFromConnectionEndError; -#[derive(Debug)] -#[cfg(feature = "ethabi")] -pub enum TryFromEthAbiConnectionEndError { - ClientId(::Err), - Version(UnknownEnumVariant), - State(UnknownEnumVariant), - Counterparty(TryFromEthAbiConnectionCounterpartyError), -} - -#[cfg(feature = "ethabi")] -impl TryFrom for ConnectionEnd { - type Error = TryFromEthAbiConnectionEndError; - - fn try_from( - val: contracts::glue::IbcCoreConnectionV1ConnectionEndData, - ) -> Result { - Ok(Self { - client_id: val - .client_id - .parse() - .map_err(TryFromEthAbiConnectionEndError::ClientId)?, - versions: val - .versions - .into_iter() - .map(|x| { - x.try_into() - .map_err(TryFromEthAbiConnectionEndError::Version) - }) - .collect::>()?, - state: val - .state - .try_into() - .map_err(TryFromEthAbiConnectionEndError::State)?, - counterparty: val - .counterparty - .try_into() - .map_err(TryFromEthAbiConnectionEndError::Counterparty)?, - delay_period: val.delay_period, - }) - } -} + fn try_from( + value: protos::ibc::core::connection::v1::ConnectionEnd, + ) -> Result { + let (_, client_id) = ClientId::parse_prefixed(&value.client_id) + .map_err(TryFromConnectionEndError::ClientId)?; -#[cfg(feature = "ethabi")] -impl From for contracts::glue::IbcCoreConnectionV1ConnectionEndData { - fn from(val: ConnectionEnd) -> Self { - Self { - client_id: val.client_id.to_string(), - versions: val.versions.into_iter().map(Into::into).collect(), - state: val.state.into(), - counterparty: val.counterparty.into(), - delay_period: val.delay_period, + Ok(Self { + client_id, + versions: value + .versions + .into_iter() + .map(|x| x.try_into().map_err(TryFromConnectionEndError::Version)) + .collect::>()?, + state: value + .state + .try_into() + .map_err(TryFromConnectionEndError::State)?, + counterparty: required!(value.counterparty)? + .try_into() + .map_err(TryFromConnectionEndError::Counterparty)?, + delay_period: value.delay_period, + }) } } + + // impl From for protos::ibc::core::connection::v1::ConnectionEnd { + // fn from(value: ConnectionEnd) -> Self { + // Self { + // client_id: value.client_id.to_string_prefixed(&value.client_type), + // versions: value.versions.into_iter().map(Into::into).collect(), + // state: value.state as i32, + // counterparty: Some(value.counterparty.into()), + // delay_period: value.delay_period, + // } + // } + // } } diff --git a/lib/unionlabs/src/ibc/core/connection/counterparty.rs b/lib/unionlabs/src/ibc/core/connection/counterparty.rs index 4350420dac..786c93258c 100644 --- a/lib/unionlabs/src/ibc/core/connection/counterparty.rs +++ b/lib/unionlabs/src/ibc/core/connection/counterparty.rs @@ -1,15 +1,13 @@ -use core::str::FromStr; - use macros::model; use crate::{ - errors::{required, MissingField}, ibc::core::commitment::merkle_prefix::MerklePrefix, id::{ClientId, ConnectionId}, }; -#[model(proto(raw(protos::ibc::core::connection::v1::Counterparty), into, from))] +#[model(proto(raw(protos::ibc::core::connection::v1::Counterparty), into))] #[cfg_attr(feature = "schemars", derive(::schemars::JsonSchema))] +#[cfg_attr(feature = "valuable", derive(::valuable::Valuable))] pub struct Counterparty { pub client_id: ClientId, // this is really `Either` @@ -17,101 +15,57 @@ pub struct Counterparty { pub prefix: MerklePrefix, } -impl From for protos::ibc::core::connection::v1::Counterparty { - fn from(value: Counterparty) -> Self { - Self { - client_id: value.client_id.to_string(), - connection_id: value - .connection_id - .as_deref() - .unwrap_or_default() - .to_string(), - prefix: Some(value.prefix.into()), - } - } -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + ibc::core::connection::counterparty::Counterparty, + id::{ClientId, ConnectionId, ParsePrefixedIdError}, + }; -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromConnectionCounterpartyError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid client_id")] - ClientId(#[source] ::Err), - #[error("invalid connection_id")] - ConnectionId(#[source] ::Err), -} - -impl TryFrom for Counterparty { - type Error = TryFromConnectionCounterpartyError; + // impl From for protos::ibc::core::connection::v1::Counterparty { + // fn from(value: Counterparty) -> Self { + // Self { + // client_id: value.client_id.to_string_prefixed(&value.client_type), + // connection_id: value + // .connection_id + // .as_ref() + // .map_or_else(String::new, ConnectionId::to_string_prefixed), + // prefix: Some(value.prefix.into()), + // } + // } + // } - fn try_from( - value: protos::ibc::core::connection::v1::Counterparty, - ) -> Result { - Ok(Self { - client_id: value - .client_id - .parse() - .map_err(TryFromConnectionCounterpartyError::ClientId)?, - connection_id: if value.connection_id.is_empty() { - None - } else { - Some( - value - .connection_id - .parse() - .map_err(TryFromConnectionCounterpartyError::ConnectionId)?, - ) - }, - prefix: required!(value.prefix)?.into(), - }) + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromConnectionCounterpartyError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid client_id")] + ClientId(#[source] ParsePrefixedIdError), + #[error("invalid connection_id")] + ConnectionId(#[source] ParsePrefixedIdError), } -} -#[cfg(feature = "ethabi")] -impl From for contracts::ibc_handler::IbcCoreConnectionV1CounterpartyData { - fn from(value: Counterparty) -> Self { - Self { - client_id: value.client_id.to_string(), - connection_id: value - .connection_id - .as_deref() - .unwrap_or_default() - .to_string(), - prefix: value.prefix.into(), - } - } -} + impl TryFrom for Counterparty { + type Error = TryFromConnectionCounterpartyError; -#[derive(Debug)] -#[cfg(feature = "ethabi")] -pub enum TryFromEthAbiConnectionCounterpartyError { - ClientId(::Err), - ConnectionId(::Err), -} - -#[cfg(feature = "ethabi")] -impl TryFrom for Counterparty { - type Error = TryFromEthAbiConnectionCounterpartyError; + fn try_from( + value: protos::ibc::core::connection::v1::Counterparty, + ) -> Result { + let (_, client_id) = ClientId::parse_prefixed(&value.client_id) + .map_err(TryFromConnectionCounterpartyError::ClientId)?; - fn try_from( - value: contracts::ibc_handler::IbcCoreConnectionV1CounterpartyData, - ) -> Result { - Ok(Self { - client_id: value - .client_id - .parse() - .map_err(TryFromEthAbiConnectionCounterpartyError::ClientId)?, - connection_id: if value.connection_id.is_empty() { - None - } else { - Some( - value - .connection_id - .parse() - .map_err(TryFromEthAbiConnectionCounterpartyError::ConnectionId)?, - ) - }, - prefix: value.prefix.into(), - }) + Ok(Self { + client_id, + connection_id: if value.connection_id.is_empty() { + None + } else { + ConnectionId::parse_prefixed(&value.connection_id) + .map(Some) + .map_err(TryFromConnectionCounterpartyError::ConnectionId)? + }, + prefix: required!(value.prefix)?.into(), + }) + } } } diff --git a/lib/unionlabs/src/ibc/core/connection/msg_connection_open_ack.rs b/lib/unionlabs/src/ibc/core/connection/msg_connection_open_ack.rs index 1262c09921..e7d268e720 100644 --- a/lib/unionlabs/src/ibc/core/connection/msg_connection_open_ack.rs +++ b/lib/unionlabs/src/ibc/core/connection/msg_connection_open_ack.rs @@ -6,22 +6,22 @@ use crate::{ }; #[model(proto(raw(protos::ibc::core::connection::v1::MsgConnectionOpenAck)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgConnectionOpenAck { pub connection_id: ConnectionId, pub counterparty_connection_id: ConnectionId, pub version: Version, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub client_state: Vec, - // TODO: Make this type generic pub proof_height: Height, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_try: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_client: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_consensus: Vec, // TODO: Make this type generic diff --git a/lib/unionlabs/src/ibc/core/connection/msg_connection_open_confirm.rs b/lib/unionlabs/src/ibc/core/connection/msg_connection_open_confirm.rs index 6db4c37f49..0180adf264 100644 --- a/lib/unionlabs/src/ibc/core/connection/msg_connection_open_confirm.rs +++ b/lib/unionlabs/src/ibc/core/connection/msg_connection_open_confirm.rs @@ -3,9 +3,10 @@ use macros::model; use crate::{ibc::core::client::height::Height, id::ConnectionId}; #[model(proto(raw(protos::ibc::core::connection::v1::MsgConnectionOpenConfirm)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgConnectionOpenConfirm { pub connection_id: ConnectionId, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_ack: Vec, pub proof_height: Height, diff --git a/lib/unionlabs/src/ibc/core/connection/msg_connection_open_init.rs b/lib/unionlabs/src/ibc/core/connection/msg_connection_open_init.rs index 328acc818d..b1553e1f15 100644 --- a/lib/unionlabs/src/ibc/core/connection/msg_connection_open_init.rs +++ b/lib/unionlabs/src/ibc/core/connection/msg_connection_open_init.rs @@ -6,6 +6,7 @@ use crate::{ }; #[model(proto(raw(protos::ibc::core::connection::v1::MsgConnectionOpenInit)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgConnectionOpenInit { pub client_id: ClientId, pub counterparty: Counterparty, diff --git a/lib/unionlabs/src/ibc/core/connection/msg_connection_open_try.rs b/lib/unionlabs/src/ibc/core/connection/msg_connection_open_try.rs index 9ebd780233..0fbb9436a6 100644 --- a/lib/unionlabs/src/ibc/core/connection/msg_connection_open_try.rs +++ b/lib/unionlabs/src/ibc/core/connection/msg_connection_open_try.rs @@ -9,22 +9,23 @@ use crate::{ }; #[model(proto(raw(protos::ibc::core::connection::v1::MsgConnectionOpenTry)))] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct MsgConnectionOpenTry { pub client_id: ClientId, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub client_state: Vec, pub counterparty: Counterparty, pub delay_period: u64, pub counterparty_versions: Vec, pub proof_height: Height, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_init: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_client: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof_consensus: Vec, /// The height the counterparty trusts of the chain this is being sent to. diff --git a/lib/unionlabs/src/ibc/core/connection/version.rs b/lib/unionlabs/src/ibc/core/connection/version.rs index 80de924371..9fc4aa1041 100644 --- a/lib/unionlabs/src/ibc/core/connection/version.rs +++ b/lib/unionlabs/src/ibc/core/connection/version.rs @@ -1,9 +1,10 @@ use macros::model; -use crate::{errors::UnknownEnumVariant, ibc::core::channel::order::Order}; +use crate::ibc::core::channel::order::Order; #[model(proto(raw(protos::ibc::core::connection::v1::Version), into, from))] #[cfg_attr(feature = "schemars", derive(::schemars::JsonSchema))] +#[cfg_attr(feature = "valuable", derive(::valuable::Valuable))] pub struct Version { // TODO(benluelo): "The identifier field specifies a unique version identifier. A value of "1" specifies IBC 1.0.0." // TODO: Cow @@ -11,62 +12,37 @@ pub struct Version { pub features: Vec, } -impl TryFrom for Version { - type Error = UnknownEnumVariant; - - fn try_from(proto: protos::ibc::core::connection::v1::Version) -> Result { - Ok(Self { - identifier: proto.identifier, - features: proto - .features - .into_iter() - .map(|order| order.parse()) - .collect::>()?, - }) - } -} - -impl From for protos::ibc::core::connection::v1::Version { - fn from(value: Version) -> Self { - Self { - identifier: value.identifier, - features: value - .features - .into_iter() - .map(|feature| <&'static str>::from(feature).to_string()) - .collect(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{errors::UnknownEnumVariant, ibc::core::connection::version::Version}; + + impl TryFrom for Version { + type Error = UnknownEnumVariant; + + fn try_from( + proto: protos::ibc::core::connection::v1::Version, + ) -> Result { + Ok(Self { + identifier: proto.identifier, + features: proto + .features + .into_iter() + .map(|order| order.parse()) + .collect::>()?, + }) } } -} -#[cfg(feature = "ethabi")] -impl From for contracts::ibc_handler::IbcCoreConnectionV1VersionData { - fn from(value: Version) -> Self { - Self { - identifier: value.identifier, - features: value - .features - .into_iter() - .map(|order| <&'static str>::from(order).to_string()) - .collect(), + impl From for protos::ibc::core::connection::v1::Version { + fn from(value: Version) -> Self { + Self { + identifier: value.identifier, + features: value + .features + .into_iter() + .map(|feature| <&'static str>::from(feature).to_string()) + .collect(), + } } } } - -#[cfg(feature = "ethabi")] -impl TryFrom for Version { - type Error = UnknownEnumVariant; - - fn try_from( - value: contracts::ibc_handler::IbcCoreConnectionV1VersionData, - ) -> Result { - Ok(Self { - identifier: value.identifier, - features: value - .features - .into_iter() - .map(|order| order.parse()) - .collect::>()?, - }) - } -} diff --git a/lib/unionlabs/src/ibc/lightclients/arbitrum/client_state.rs b/lib/unionlabs/src/ibc/lightclients/arbitrum/client_state.rs index f9c61c705f..bca58d3c53 100644 --- a/lib/unionlabs/src/ibc/lightclients/arbitrum/client_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/arbitrum/client_state.rs @@ -1,16 +1,7 @@ -use alloc::sync::Arc; - use macros::model; -use uint::FromDecStrErr; use crate::{ - bounded::{BoundedIntError, BoundedU32}, - errors::{required, InvalidLength, MissingField, UnknownEnumVariant}, - hash::H160, - ibc::core::client::height::Height, - id::{ClientId, ClientIdValidator}, - uint::U256, - validated::{Validate, ValidateT}, + bounded::BoundedU32, hash::H160, ibc::core::client::height::Height, id::ClientId, uint::U256, }; #[model(proto( @@ -20,6 +11,7 @@ use crate::{ ))] pub struct ClientState { pub l1_client_id: ClientId, + pub l1_client_type: String, pub chain_id: U256, pub l1_latest_slot: u64, pub l1_contract_address: H160, @@ -34,89 +26,106 @@ pub struct ClientState { pub l2_ibc_commitment_slot: U256, } -impl TryFrom for ClientState { - type Error = TryFromClientStateError; +#[cfg(feature = "proto")] +pub mod proto { + use core::str::FromStr; + + use crate::{ + bounded::BoundedIntError, + errors::{required, InvalidLength, MissingField, UnknownEnumVariant}, + ibc::lightclients::arbitrum::client_state::ClientState, + id::{ClientId, ParsePrefixedIdError}, + uint::U256, + }; + + impl TryFrom for ClientState { + type Error = TryFromClientStateError; + + fn try_from( + value: protos::union::ibc::lightclients::arbitrum::v1::ClientState, + ) -> Result { + let (l1_client_type, l1_client_id) = ClientId::parse_prefixed(&value.l1_client_id) + .map_err(TryFromClientStateError::L1ClientId)?; - fn try_from( - value: protos::union::ibc::lightclients::arbitrum::v1::ClientState, - ) -> Result { - Ok(Self { - l1_client_id: value - .l1_client_id - .validate() - .map_err(TryFromClientStateError::L1ClientId)?, - chain_id: value - .chain_id - .parse() - .map_err(|err| TryFromClientStateError::ChainId(Arc::new(err)))?, - l1_latest_slot: value.l1_latest_slot, - l1_contract_address: value - .l1_contract_address - .try_into() - .map_err(TryFromClientStateError::L1ContractAddress)?, - l1_next_node_num_slot: U256::try_from_be_bytes(&value.l1_next_node_num_slot) - .map_err(TryFromClientStateError::L1NextNodeNumSlot)?, - l1_nodes_slot: U256::try_from_be_bytes(&value.l1_nodes_slot) - .map_err(TryFromClientStateError::L1NodesSlot)?, - l1_next_node_num_slot_offset_bytes: value - .l1_next_node_num_slot_offset_bytes - .try_into() - .map_err(TryFromClientStateError::L1NextNodeNumSlotOffsetBytes)?, - l1_nodes_confirm_data_offset: U256::try_from_be_bytes( - &value.l1_nodes_confirm_data_offset, - ) - .map_err(TryFromClientStateError::ConfirmDataOffset)?, - frozen_height: required!(value.frozen_height)?.into(), - l2_ibc_contract_address: value - .l2_ibc_contract_address - .try_into() - .map_err(TryFromClientStateError::L2IbcContractAddress)?, - l2_ibc_commitment_slot: U256::try_from_be_bytes(&value.l2_ibc_commitment_slot) - .map_err(TryFromClientStateError::L2IbcCommitmentSlot)?, - }) + Ok(Self { + l1_client_id, + l1_client_type: l1_client_type.to_owned(), + chain_id: value + .chain_id + .parse() + .map_err(TryFromClientStateError::ChainId)?, + l1_latest_slot: value.l1_latest_slot, + l1_contract_address: value + .l1_contract_address + .try_into() + .map_err(TryFromClientStateError::L1ContractAddress)?, + l1_next_node_num_slot: U256::try_from_be_bytes(&value.l1_next_node_num_slot) + .map_err(TryFromClientStateError::L1NextNodeNumSlot)?, + l1_nodes_slot: U256::try_from_be_bytes(&value.l1_nodes_slot) + .map_err(TryFromClientStateError::L1NodesSlot)?, + l1_next_node_num_slot_offset_bytes: value + .l1_next_node_num_slot_offset_bytes + .try_into() + .map_err(TryFromClientStateError::L1NextNodeNumSlotOffsetBytes)?, + l1_nodes_confirm_data_offset: U256::try_from_be_bytes( + &value.l1_nodes_confirm_data_offset, + ) + .map_err(TryFromClientStateError::ConfirmDataOffset)?, + frozen_height: required!(value.frozen_height)?.into(), + l2_ibc_contract_address: value + .l2_ibc_contract_address + .try_into() + .map_err(TryFromClientStateError::L2IbcContractAddress)?, + l2_ibc_commitment_slot: U256::try_from_be_bytes(&value.l2_ibc_commitment_slot) + .map_err(TryFromClientStateError::L2IbcCommitmentSlot)?, + }) + } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromClientStateError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid l1_client_id")] - L1ClientId(#[source] >::Error), - #[error("invalid l1_contract_address")] - ChainId(#[source] Arc), - #[error("invalid l1_latest_confirmed_slot")] - L1ContractAddress(#[source] InvalidLength), - #[error("invalid l1_nodes_slot")] - L1NextNodeNumSlot(#[source] InvalidLength), - #[error("invalid confirm_data_offset")] - L1NodesSlot(#[source] InvalidLength), - #[error("invalid l1_next_node_num_slot_offset_bytes")] - L1NextNodeNumSlotOffsetBytes(#[source] BoundedIntError), - #[error("invalid frozen_height")] - ConfirmDataOffset(#[source] InvalidLength), - #[error("invalid l2_ibc_commitment_slot")] - L2IbcContractAddress(#[source] InvalidLength), - #[error("invalid l2_ibc_commitment_slot")] - L2IbcCommitmentSlot(#[source] InvalidLength), - #[error("invalid finality")] - Finality(UnknownEnumVariant), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromClientStateError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid l1_client_id")] + L1ClientId(#[source] ParsePrefixedIdError), + #[error("invalid l1_contract_address")] + ChainId(#[source] ::Err), + #[error("invalid l1_latest_confirmed_slot")] + L1ContractAddress(#[source] InvalidLength), + #[error("invalid l1_nodes_slot")] + L1NextNodeNumSlot(#[source] InvalidLength), + #[error("invalid confirm_data_offset")] + L1NodesSlot(#[source] InvalidLength), + #[error("invalid l1_next_node_num_slot_offset_bytes")] + L1NextNodeNumSlotOffsetBytes(#[source] BoundedIntError), + #[error("invalid frozen_height")] + ConfirmDataOffset(#[source] InvalidLength), + #[error("invalid l2_ibc_commitment_slot")] + L2IbcContractAddress(#[source] InvalidLength), + #[error("invalid l2_ibc_commitment_slot")] + L2IbcCommitmentSlot(#[source] InvalidLength), + #[error("invalid finality")] + Finality(UnknownEnumVariant), + } -impl From for protos::union::ibc::lightclients::arbitrum::v1::ClientState { - fn from(value: ClientState) -> Self { - Self { - l1_client_id: value.l1_client_id.to_string(), - chain_id: value.chain_id.to_string(), - l1_latest_slot: value.l1_latest_slot, - l1_contract_address: value.l1_contract_address.into(), - l1_next_node_num_slot: value.l1_next_node_num_slot.to_be_bytes().to_vec(), - l1_nodes_slot: value.l1_nodes_slot.to_be_bytes().to_vec(), - l1_next_node_num_slot_offset_bytes: value.l1_next_node_num_slot_offset_bytes.into(), - l1_nodes_confirm_data_offset: value.l1_nodes_confirm_data_offset.to_be_bytes().to_vec(), - frozen_height: Some(value.frozen_height.into()), - l2_ibc_contract_address: value.l2_ibc_contract_address.into(), - l2_ibc_commitment_slot: value.l2_ibc_commitment_slot.to_be_bytes().to_vec(), + impl From for protos::union::ibc::lightclients::arbitrum::v1::ClientState { + fn from(value: ClientState) -> Self { + Self { + l1_client_id: value.l1_client_id.to_string_prefixed(&value.l1_client_type), + chain_id: value.chain_id.to_string(), + l1_latest_slot: value.l1_latest_slot, + l1_contract_address: value.l1_contract_address.into(), + l1_next_node_num_slot: value.l1_next_node_num_slot.to_be_bytes().to_vec(), + l1_nodes_slot: value.l1_nodes_slot.to_be_bytes().to_vec(), + l1_next_node_num_slot_offset_bytes: value.l1_next_node_num_slot_offset_bytes.into(), + l1_nodes_confirm_data_offset: value + .l1_nodes_confirm_data_offset + .to_be_bytes() + .to_vec(), + frozen_height: Some(value.frozen_height.into()), + l2_ibc_contract_address: value.l2_ibc_contract_address.into(), + l2_ibc_commitment_slot: value.l2_ibc_commitment_slot.to_be_bytes().to_vec(), + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/arbitrum/consensus_state.rs b/lib/unionlabs/src/ibc/lightclients/arbitrum/consensus_state.rs index f371150b43..65bd8084d1 100644 --- a/lib/unionlabs/src/ibc/lightclients/arbitrum/consensus_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/arbitrum/consensus_state.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::{errors::InvalidLength, hash::H256}; +use crate::hash::H256; #[model(proto( raw(protos::union::ibc::lightclients::arbitrum::v1::ConsensusState), @@ -12,33 +12,40 @@ pub struct ConsensusState { pub timestamp: u64, } -impl TryFrom for ConsensusState { - type Error = TryFromConsensusStateError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::InvalidLength, ibc::lightclients::arbitrum::consensus_state::ConsensusState, + }; - fn try_from( - value: protos::union::ibc::lightclients::arbitrum::v1::ConsensusState, - ) -> Result { - Ok(Self { - ibc_storage_root: value - .ibc_storage_root - .try_into() - .map_err(TryFromConsensusStateError::IbcStorageRoot)?, - timestamp: value.timestamp, - }) + impl TryFrom for ConsensusState { + type Error = TryFromConsensusStateError; + + fn try_from( + value: protos::union::ibc::lightclients::arbitrum::v1::ConsensusState, + ) -> Result { + Ok(Self { + ibc_storage_root: value + .ibc_storage_root + .try_into() + .map_err(TryFromConsensusStateError::IbcStorageRoot)?, + timestamp: value.timestamp, + }) + } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromConsensusStateError { - #[error("invalid ibc storage root")] - IbcStorageRoot(#[source] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromConsensusStateError { + #[error("invalid ibc storage root")] + IbcStorageRoot(#[source] InvalidLength), + } -impl From for protos::union::ibc::lightclients::arbitrum::v1::ConsensusState { - fn from(value: ConsensusState) -> Self { - Self { - ibc_storage_root: value.ibc_storage_root.into(), - timestamp: value.timestamp, + impl From for protos::union::ibc::lightclients::arbitrum::v1::ConsensusState { + fn from(value: ConsensusState) -> Self { + Self { + ibc_storage_root: value.ibc_storage_root.into(), + timestamp: value.timestamp, + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/arbitrum/header.rs b/lib/unionlabs/src/ibc/lightclients/arbitrum/header.rs index 92746fe87a..93f315fee0 100644 --- a/lib/unionlabs/src/ibc/lightclients/arbitrum/header.rs +++ b/lib/unionlabs/src/ibc/lightclients/arbitrum/header.rs @@ -1,16 +1,10 @@ use macros::model; -use crate::{ - errors::{required, MissingField}, - ibc::{ - core::client::height::Height, - lightclients::{ - arbitrum::l2_header::{L2Header, TryFromL2HeaderError}, - ethereum::{ - account_proof::{AccountProof, TryFromAccountProofError}, - storage_proof::{StorageProof, TryFromStorageProofError}, - }, - }, +use crate::ibc::{ + core::client::height::Height, + lightclients::{ + arbitrum::l2_header::L2Header, + ethereum::{account_proof::AccountProof, storage_proof::StorageProof}, }, }; @@ -28,58 +22,72 @@ pub struct Header { pub l2_header: L2Header, } -impl TryFrom for Header { - type Error = TryFromHeaderError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + ibc::lightclients::{ + arbitrum::{header::Header, l2_header::proto::TryFromL2HeaderError}, + ethereum::{ + account_proof::proto::TryFromAccountProofError, + storage_proof::proto::TryFromStorageProofError, + }, + }, + }; - fn try_from( - value: protos::union::ibc::lightclients::arbitrum::v1::Header, - ) -> Result { - Ok(Self { - l1_height: required!(value.l1_height)?.into(), - l1_account_proof: required!(value.l1_account_proof)? - .try_into() - .map_err(TryFromHeaderError::L1AccountProof)?, - l2_ibc_account_proof: required!(value.l2_ibc_account_proof)? - .try_into() - .map_err(TryFromHeaderError::L2IbcAccountProof)?, - l1_next_node_num_slot_proof: required!(value.l1_next_node_num_slot_proof)? - .try_into() - .map_err(TryFromHeaderError::L1NextNodeNumSlotProof)?, - l1_nodes_slot_proof: required!(value.l1_nodes_slot_proof)? - .try_into() - .map_err(TryFromHeaderError::L1NodesSlotProof)?, - l2_header: required!(value.l2_header)? - .try_into() - .map_err(TryFromHeaderError::L2Header)?, - }) + impl TryFrom for Header { + type Error = TryFromHeaderError; + + fn try_from( + value: protos::union::ibc::lightclients::arbitrum::v1::Header, + ) -> Result { + Ok(Self { + l1_height: required!(value.l1_height)?.into(), + l1_account_proof: required!(value.l1_account_proof)? + .try_into() + .map_err(TryFromHeaderError::L1AccountProof)?, + l2_ibc_account_proof: required!(value.l2_ibc_account_proof)? + .try_into() + .map_err(TryFromHeaderError::L2IbcAccountProof)?, + l1_next_node_num_slot_proof: required!(value.l1_next_node_num_slot_proof)? + .try_into() + .map_err(TryFromHeaderError::L1NextNodeNumSlotProof)?, + l1_nodes_slot_proof: required!(value.l1_nodes_slot_proof)? + .try_into() + .map_err(TryFromHeaderError::L1NodesSlotProof)?, + l2_header: required!(value.l2_header)? + .try_into() + .map_err(TryFromHeaderError::L2Header)?, + }) + } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromHeaderError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid l1_account_proof")] - L1AccountProof(#[source] TryFromAccountProofError), - #[error("invalid l2_ibc_account_proof")] - L2IbcAccountProof(#[source] TryFromAccountProofError), - #[error("invalid l1_next_node_num_slot_proof")] - L1NextNodeNumSlotProof(#[source] TryFromStorageProofError), - #[error("invalid l1_nodes_slot_proof")] - L1NodesSlotProof(#[source] TryFromStorageProofError), - #[error("invalid l2_header")] - L2Header(#[source] TryFromL2HeaderError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromHeaderError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid l1_account_proof")] + L1AccountProof(#[source] TryFromAccountProofError), + #[error("invalid l2_ibc_account_proof")] + L2IbcAccountProof(#[source] TryFromAccountProofError), + #[error("invalid l1_next_node_num_slot_proof")] + L1NextNodeNumSlotProof(#[source] TryFromStorageProofError), + #[error("invalid l1_nodes_slot_proof")] + L1NodesSlotProof(#[source] TryFromStorageProofError), + #[error("invalid l2_header")] + L2Header(#[source] TryFromL2HeaderError), + } -impl From
for protos::union::ibc::lightclients::arbitrum::v1::Header { - fn from(value: Header) -> Self { - Self { - l1_height: Some(value.l1_height.into()), - l1_account_proof: Some(value.l1_account_proof.into()), - l2_ibc_account_proof: Some(value.l2_ibc_account_proof.into()), - l1_next_node_num_slot_proof: Some(value.l1_next_node_num_slot_proof.into()), - l1_nodes_slot_proof: Some(value.l1_nodes_slot_proof.into()), - l2_header: Some(value.l2_header.into()), + impl From
for protos::union::ibc::lightclients::arbitrum::v1::Header { + fn from(value: Header) -> Self { + Self { + l1_height: Some(value.l1_height.into()), + l1_account_proof: Some(value.l1_account_proof.into()), + l2_ibc_account_proof: Some(value.l2_ibc_account_proof.into()), + l1_next_node_num_slot_proof: Some(value.l1_next_node_num_slot_proof.into()), + l1_nodes_slot_proof: Some(value.l1_nodes_slot_proof.into()), + l2_header: Some(value.l2_header.into()), + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/arbitrum/l2_header.rs b/lib/unionlabs/src/ibc/lightclients/arbitrum/l2_header.rs index 5f2f6e6410..b5a4f252c0 100644 --- a/lib/unionlabs/src/ibc/lightclients/arbitrum/l2_header.rs +++ b/lib/unionlabs/src/ibc/lightclients/arbitrum/l2_header.rs @@ -1,10 +1,6 @@ use macros::model; -use rlp::Encodable; -use sha2::Digest; -use sha3::Keccak256; use crate::{ - errors::InvalidLength, hash::{H160, H2048, H256, H64}, uint::U256, }; @@ -14,7 +10,7 @@ use crate::{ into, from ))] -#[derive(rlp::RlpEncodable)] +#[cfg_attr(feature = "rlp", derive(rlp::RlpEncodable))] pub struct L2Header { pub parent_hash: H256, pub sha3_uncles: H256, @@ -36,136 +32,144 @@ pub struct L2Header { } impl L2Header { + #[cfg(feature = "rlp")] #[must_use] pub fn hash(&self) -> H256 { - ::from(Keccak256::new().chain_update(self.rlp_bytes()).finalize()) + use rlp::Encodable; + + crate::ethereum::keccak256(self.rlp_bytes()) } } -impl TryFrom for L2Header { - type Error = TryFromL2HeaderError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::InvalidLength, ibc::lightclients::arbitrum::l2_header::L2Header, uint::U256, + }; + + impl TryFrom for L2Header { + type Error = TryFromL2HeaderError; - fn try_from( - value: protos::union::ibc::lightclients::arbitrum::v1::L2Header, - ) -> Result { - Ok(Self { - parent_hash: value - .parent_hash - .try_into() - .map_err(TryFromL2HeaderError::ParentHash)?, - sha3_uncles: value - .sha3_uncles - .try_into() - .map_err(TryFromL2HeaderError::Sha3Uncles)?, - miner: value - .miner - .try_into() - .map_err(TryFromL2HeaderError::Miner)?, - state_root: value - .state_root - .try_into() - .map_err(TryFromL2HeaderError::StateRoot)?, - transactions_root: value - .transactions_root - .try_into() - .map_err(TryFromL2HeaderError::TransactionsRoot)?, - receipts_root: value - .receipts_root - .try_into() - .map_err(TryFromL2HeaderError::ReceiptRoot)?, - logs_bloom: value - .logs_bloom - .try_into() - .map(Box::new) - .map_err(TryFromL2HeaderError::LogsBloom)?, - difficulty: U256::try_from_be_bytes(&value.difficulty) - .map_err(TryFromL2HeaderError::Difficulty)?, - number: U256::try_from_be_bytes(&value.number).map_err(TryFromL2HeaderError::Number)?, - gas_limit: value.gas_limit, - gas_used: value.gas_used, - timestamp: value.timestamp, - extra_data: value - .extra_data - .try_into() - .map_err(TryFromL2HeaderError::ExtraData)?, - mix_hash: value - .mix_hash - .try_into() - .map_err(TryFromL2HeaderError::MixHash)?, - nonce: value - .nonce - .try_into() - .map_err(TryFromL2HeaderError::Nonce)?, - base_fee_per_gas: U256::try_from_be_bytes(&value.base_fee_per_gas) - .map_err(TryFromL2HeaderError::BaseFeePerGas)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::arbitrum::v1::L2Header, + ) -> Result { + Ok(Self { + parent_hash: value + .parent_hash + .try_into() + .map_err(TryFromL2HeaderError::ParentHash)?, + sha3_uncles: value + .sha3_uncles + .try_into() + .map_err(TryFromL2HeaderError::Sha3Uncles)?, + miner: value + .miner + .try_into() + .map_err(TryFromL2HeaderError::Miner)?, + state_root: value + .state_root + .try_into() + .map_err(TryFromL2HeaderError::StateRoot)?, + transactions_root: value + .transactions_root + .try_into() + .map_err(TryFromL2HeaderError::TransactionsRoot)?, + receipts_root: value + .receipts_root + .try_into() + .map_err(TryFromL2HeaderError::ReceiptRoot)?, + logs_bloom: value + .logs_bloom + .try_into() + .map(Box::new) + .map_err(TryFromL2HeaderError::LogsBloom)?, + difficulty: U256::try_from_be_bytes(&value.difficulty) + .map_err(TryFromL2HeaderError::Difficulty)?, + number: U256::try_from_be_bytes(&value.number) + .map_err(TryFromL2HeaderError::Number)?, + gas_limit: value.gas_limit, + gas_used: value.gas_used, + timestamp: value.timestamp, + extra_data: value + .extra_data + .try_into() + .map_err(TryFromL2HeaderError::ExtraData)?, + mix_hash: value + .mix_hash + .try_into() + .map_err(TryFromL2HeaderError::MixHash)?, + nonce: value + .nonce + .try_into() + .map_err(TryFromL2HeaderError::Nonce)?, + base_fee_per_gas: U256::try_from_be_bytes(&value.base_fee_per_gas) + .map_err(TryFromL2HeaderError::BaseFeePerGas)?, + }) + } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromL2HeaderError { - #[error("invalid parent hash")] - ParentHash(#[source] InvalidLength), - #[error("invalid sha3 uncles")] - Sha3Uncles(#[source] InvalidLength), - #[error("invalid miner")] - Miner(#[source] InvalidLength), - #[error("invalid state root")] - StateRoot(#[source] InvalidLength), - #[error("invalid transactions root")] - TransactionsRoot(#[source] InvalidLength), - #[error("invalid receipt root")] - ReceiptRoot(#[source] InvalidLength), - #[error("invalid logs bloom")] - LogsBloom(#[source] InvalidLength), - #[error("invalid difficulty")] - Difficulty(#[source] InvalidLength), - #[error("invalid number")] - Number(#[source] InvalidLength), - #[error("invalid extra data")] - ExtraData(#[source] InvalidLength), - #[error("invalid mix hash")] - MixHash(#[source] InvalidLength), - #[error("invalid nonce")] - Nonce(#[source] InvalidLength), - #[error("invalid base fee per gas")] - BaseFeePerGas(#[source] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromL2HeaderError { + #[error("invalid parent hash")] + ParentHash(#[source] InvalidLength), + #[error("invalid sha3 uncles")] + Sha3Uncles(#[source] InvalidLength), + #[error("invalid miner")] + Miner(#[source] InvalidLength), + #[error("invalid state root")] + StateRoot(#[source] InvalidLength), + #[error("invalid transactions root")] + TransactionsRoot(#[source] InvalidLength), + #[error("invalid receipt root")] + ReceiptRoot(#[source] InvalidLength), + #[error("invalid logs bloom")] + LogsBloom(#[source] InvalidLength), + #[error("invalid difficulty")] + Difficulty(#[source] InvalidLength), + #[error("invalid number")] + Number(#[source] InvalidLength), + #[error("invalid extra data")] + ExtraData(#[source] InvalidLength), + #[error("invalid mix hash")] + MixHash(#[source] InvalidLength), + #[error("invalid nonce")] + Nonce(#[source] InvalidLength), + #[error("invalid base fee per gas")] + BaseFeePerGas(#[source] InvalidLength), + } -impl From for protos::union::ibc::lightclients::arbitrum::v1::L2Header { - fn from(value: L2Header) -> Self { - Self { - parent_hash: value.parent_hash.into(), - sha3_uncles: value.sha3_uncles.into(), - miner: value.miner.into(), - state_root: value.state_root.into(), - transactions_root: value.transactions_root.into(), - receipts_root: value.receipts_root.into(), - logs_bloom: (*value.logs_bloom).into(), - difficulty: value.difficulty.to_be_bytes().to_vec(), - number: value.number.to_be_bytes().to_vec(), - gas_limit: value.gas_limit, - gas_used: value.gas_used, - timestamp: value.timestamp, - extra_data: value.extra_data.into(), - mix_hash: value.mix_hash.into(), - nonce: value.nonce.into(), - base_fee_per_gas: value.base_fee_per_gas.to_be_bytes().to_vec(), + impl From for protos::union::ibc::lightclients::arbitrum::v1::L2Header { + fn from(value: L2Header) -> Self { + Self { + parent_hash: value.parent_hash.into(), + sha3_uncles: value.sha3_uncles.into(), + miner: value.miner.into(), + state_root: value.state_root.into(), + transactions_root: value.transactions_root.into(), + receipts_root: value.receipts_root.into(), + logs_bloom: (*value.logs_bloom).into(), + difficulty: value.difficulty.to_be_bytes().to_vec(), + number: value.number.to_be_bytes().to_vec(), + gas_limit: value.gas_limit, + gas_used: value.gas_used, + timestamp: value.timestamp, + extra_data: value.extra_data.into(), + mix_hash: value.mix_hash.into(), + nonce: value.nonce.into(), + base_fee_per_gas: value.base_fee_per_gas.to_be_bytes().to_vec(), + } } } } #[cfg(test)] mod tests { - use ethers::utils::keccak256; - use hex_literal::hex; - use rlp::Encodable; - use super::*; + #[cfg(feature = "rlp")] #[test] fn rlp() { - // "hash": "0xa548151261174cf854534934ca88e68220e328be563c01915fc11c740a543489", + use hex_literal::hex; let header = L2Header { difficulty: U256::try_from_be_bytes(&hex!("01")).unwrap(), @@ -213,7 +217,7 @@ mod tests { }; assert_eq!( - ::new(keccak256(header.rlp_bytes())), + header.hash(), ::new(hex!( "a548151261174cf854534934ca88e68220e328be563c01915fc11c740a543489" )) diff --git a/lib/unionlabs/src/ibc/lightclients/berachain.rs b/lib/unionlabs/src/ibc/lightclients/berachain.rs index 1e80278bf9..98fff92385 100644 --- a/lib/unionlabs/src/ibc/lightclients/berachain.rs +++ b/lib/unionlabs/src/ibc/lightclients/berachain.rs @@ -1,3 +1,4 @@ pub mod client_state; pub mod consensus_state; +#[cfg(feature = "ssz")] // TODO: Remove this and do it cleaner pub mod header; diff --git a/lib/unionlabs/src/ibc/lightclients/berachain/client_state.rs b/lib/unionlabs/src/ibc/lightclients/berachain/client_state.rs index aaf3ed71a2..3dca5cd638 100644 --- a/lib/unionlabs/src/ibc/lightclients/berachain/client_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/berachain/client_state.rs @@ -1,18 +1,10 @@ -use alloc::sync::Arc; -use core::str::FromStr; - use macros::model; -use uint::FromDecStrErr; use crate::{ - cosmos::ics23::proof_spec::{ProofSpec, TryFromProofSpecError}, - errors::{required, InvalidLength, MissingField}, - google::protobuf::duration::{Duration, DurationError}, + cosmos::ics23::proof_spec::ProofSpec, + google::protobuf::duration::Duration, hash::H160, - ibc::{ - core::client::height::Height, - lightclients::tendermint::fraction::{Fraction, TryFromFractionError}, - }, + ibc::{core::client::height::Height, lightclients::tendermint::fraction::Fraction}, uint::U256, }; @@ -40,80 +32,94 @@ pub struct ClientState { pub ibc_contract_address: H160, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromClientStateError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid execution chain id")] - // arc bc not clone - ExecutionChainId(#[source] Arc), - #[error("invalid trust level")] - TrustLevel(#[source] TryFromFractionError), - #[error("invalid trusting period")] - TrustingPeriod(#[source] DurationError), - #[error("invalid max clock drift")] - MaxClockDrift(#[source] DurationError), - #[error("invalid proof specs")] - ProofSpecs(#[source] TryFromProofSpecError), - #[error("invalid ibc commitment slot")] - IbcCommitmentSlot(#[source] InvalidLength), - #[error("invalid ibc contract address")] - IbcContractAddress(#[source] InvalidLength), - #[error("invalid storage key prefix ({0})")] - StorageKeyPrefix(u32), -} +#[cfg(feature = "proto")] +pub mod proto { + use core::str::FromStr; -impl TryFrom for ClientState { - type Error = TryFromClientStateError; + use crate::{ + cosmos::ics23::proof_spec::proto::TryFromProofSpecError, + errors::{required, InvalidLength, MissingField}, + google::protobuf::duration::DurationError, + ibc::lightclients::{ + berachain::client_state::ClientState, tendermint::fraction::proto::TryFromFractionError, + }, + uint::U256, + }; - fn try_from( - value: protos::union::ibc::lightclients::berachain::v1::ClientState, - ) -> Result { - Ok(Self { - consensus_chain_id: value.consensus_chain_id, - execution_chain_id: U256::from_str(&value.execution_chain_id) - .map_err(|e| TryFromClientStateError::ExecutionChainId(Arc::new(e)))?, - trust_level: required!(value.trust_level)? - .try_into() - .map_err(TryFromClientStateError::TrustLevel)?, - trusting_period: required!(value.trusting_period)? - .try_into() - .map_err(TryFromClientStateError::TrustingPeriod)?, - max_clock_drift: required!(value.max_clock_drift)? - .try_into() - .map_err(TryFromClientStateError::MaxClockDrift)?, - frozen_height: value.frozen_height.map(Into::into), - latest_height: required!(value.latest_height)?.into(), - proof_specs: value - .proof_specs - .into_iter() - .map(|ps| ps.try_into().map_err(TryFromClientStateError::ProofSpecs)) - .collect::, _>>()?, - upgrade_path: value.upgrade_path, - ibc_commitment_slot: U256::try_from_be_bytes(&value.ibc_commitment_slot) - .map_err(TryFromClientStateError::IbcCommitmentSlot)?, - ibc_contract_address: value - .ibc_contract_address - .try_into() - .map_err(TryFromClientStateError::IbcContractAddress)?, - }) + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromClientStateError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid execution chain id")] + ExecutionChainId(#[source] ::Err), + #[error("invalid trust level")] + TrustLevel(#[source] TryFromFractionError), + #[error("invalid trusting period")] + TrustingPeriod(#[source] DurationError), + #[error("invalid max clock drift")] + MaxClockDrift(#[source] DurationError), + #[error("invalid proof specs")] + ProofSpecs(#[source] TryFromProofSpecError), + #[error("invalid ibc commitment slot")] + IbcCommitmentSlot(#[source] InvalidLength), + #[error("invalid ibc contract address")] + IbcContractAddress(#[source] InvalidLength), + #[error("invalid storage key prefix ({0})")] + StorageKeyPrefix(u32), + } + + impl TryFrom for ClientState { + type Error = TryFromClientStateError; + + fn try_from( + value: protos::union::ibc::lightclients::berachain::v1::ClientState, + ) -> Result { + Ok(Self { + consensus_chain_id: value.consensus_chain_id, + execution_chain_id: U256::from_str(&value.execution_chain_id) + .map_err(TryFromClientStateError::ExecutionChainId)?, + trust_level: required!(value.trust_level)? + .try_into() + .map_err(TryFromClientStateError::TrustLevel)?, + trusting_period: required!(value.trusting_period)? + .try_into() + .map_err(TryFromClientStateError::TrustingPeriod)?, + max_clock_drift: required!(value.max_clock_drift)? + .try_into() + .map_err(TryFromClientStateError::MaxClockDrift)?, + frozen_height: value.frozen_height.map(Into::into), + latest_height: required!(value.latest_height)?.into(), + proof_specs: value + .proof_specs + .into_iter() + .map(|ps| ps.try_into().map_err(TryFromClientStateError::ProofSpecs)) + .collect::, _>>()?, + upgrade_path: value.upgrade_path, + ibc_commitment_slot: U256::try_from_be_bytes(&value.ibc_commitment_slot) + .map_err(TryFromClientStateError::IbcCommitmentSlot)?, + ibc_contract_address: value + .ibc_contract_address + .try_into() + .map_err(TryFromClientStateError::IbcContractAddress)?, + }) + } } -} -impl From for protos::union::ibc::lightclients::berachain::v1::ClientState { - fn from(value: ClientState) -> Self { - Self { - consensus_chain_id: value.consensus_chain_id, - execution_chain_id: value.execution_chain_id.to_string(), - trust_level: Some(value.trust_level.into()), - trusting_period: Some(value.trusting_period.into()), - max_clock_drift: Some(value.max_clock_drift.into()), - frozen_height: value.frozen_height.map(Into::into), - latest_height: Some(value.latest_height.into()), - proof_specs: value.proof_specs.into_iter().map(Into::into).collect(), - upgrade_path: value.upgrade_path, - ibc_commitment_slot: value.ibc_commitment_slot.to_be_bytes().into(), - ibc_contract_address: value.ibc_contract_address.into(), + impl From for protos::union::ibc::lightclients::berachain::v1::ClientState { + fn from(value: ClientState) -> Self { + Self { + consensus_chain_id: value.consensus_chain_id, + execution_chain_id: value.execution_chain_id.to_string(), + trust_level: Some(value.trust_level.into()), + trusting_period: Some(value.trusting_period.into()), + max_clock_drift: Some(value.max_clock_drift.into()), + frozen_height: value.frozen_height.map(Into::into), + latest_height: Some(value.latest_height.into()), + proof_specs: value.proof_specs.into_iter().map(Into::into).collect(), + upgrade_path: value.upgrade_path, + ibc_commitment_slot: value.ibc_commitment_slot.to_be_bytes().into(), + ibc_contract_address: value.ibc_contract_address.into(), + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/berachain/consensus_state.rs b/lib/unionlabs/src/ibc/lightclients/berachain/consensus_state.rs index 32830be36a..ee9c2fa379 100644 --- a/lib/unionlabs/src/ibc/lightclients/berachain/consensus_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/berachain/consensus_state.rs @@ -1,10 +1,6 @@ use macros::model; -use crate::{ - errors::{required, InvalidLength, MissingField}, - google::protobuf::timestamp::{Timestamp, TryFromTimestampError}, - hash::H256, -}; +use crate::{google::protobuf::timestamp::Timestamp, hash::H256}; #[model(proto( raw(protos::union::ibc::lightclients::berachain::v1::ConsensusState), @@ -23,48 +19,57 @@ pub struct ConsensusState { pub comet_next_validators_hash: H256, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromConsensusStateError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid comet timestamp")] - CometTimestamp(#[source] TryFromTimestampError), - #[error("invalid comet next validators hash")] - CometNextValidatorsHash(#[source] InvalidLength), - #[error("invalid max clock drift")] - EthStorageRoot(#[source] InvalidLength), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField}, + google::protobuf::timestamp::proto::TryFromTimestampError, + ibc::lightclients::berachain::consensus_state::ConsensusState, + }; + + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromConsensusStateError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid comet timestamp")] + CometTimestamp(#[source] TryFromTimestampError), + #[error("invalid comet next validators hash")] + CometNextValidatorsHash(#[source] InvalidLength), + #[error("invalid max clock drift")] + EthStorageRoot(#[source] InvalidLength), + } -impl TryFrom for ConsensusState { - type Error = TryFromConsensusStateError; + impl TryFrom for ConsensusState { + type Error = TryFromConsensusStateError; - fn try_from( - value: protos::union::ibc::lightclients::berachain::v1::ConsensusState, - ) -> Result { - Ok(Self { - eth_timestamp: value.eth_timestamp, - comet_timestamp: required!(value.comet_timestamp)? - .try_into() - .map_err(TryFromConsensusStateError::CometTimestamp)?, - eth_storage_root: value - .eth_storage_root - .try_into() - .map_err(TryFromConsensusStateError::EthStorageRoot)?, - comet_next_validators_hash: value - .comet_next_validators_hash - .try_into() - .map_err(TryFromConsensusStateError::CometNextValidatorsHash)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::berachain::v1::ConsensusState, + ) -> Result { + Ok(Self { + eth_timestamp: value.eth_timestamp, + comet_timestamp: required!(value.comet_timestamp)? + .try_into() + .map_err(TryFromConsensusStateError::CometTimestamp)?, + eth_storage_root: value + .eth_storage_root + .try_into() + .map_err(TryFromConsensusStateError::EthStorageRoot)?, + comet_next_validators_hash: value + .comet_next_validators_hash + .try_into() + .map_err(TryFromConsensusStateError::CometNextValidatorsHash)?, + }) + } } -} -impl From for protos::union::ibc::lightclients::berachain::v1::ConsensusState { - fn from(value: ConsensusState) -> Self { - Self { - eth_timestamp: value.eth_timestamp, - comet_timestamp: Some(value.comet_timestamp.into()), - eth_storage_root: value.eth_storage_root.into(), - comet_next_validators_hash: value.comet_next_validators_hash.into(), + impl From for protos::union::ibc::lightclients::berachain::v1::ConsensusState { + fn from(value: ConsensusState) -> Self { + Self { + eth_timestamp: value.eth_timestamp, + comet_timestamp: Some(value.comet_timestamp.into()), + eth_storage_root: value.eth_storage_root.into(), + comet_next_validators_hash: value.comet_next_validators_hash.into(), + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/berachain/header.rs b/lib/unionlabs/src/ibc/lightclients/berachain/header.rs index 6bbe7a3af1..ca7ceaa1d6 100644 --- a/lib/unionlabs/src/ibc/lightclients/berachain/header.rs +++ b/lib/unionlabs/src/ibc/lightclients/berachain/header.rs @@ -2,15 +2,11 @@ use macros::model; use crate::{ berachain::BerachainChainSpec, - errors::{required, MissingField}, ibc::{ - core::commitment::merkle_proof::{MerkleProof, TryFromMerkleProofError}, + core::commitment::merkle_proof::MerkleProof, lightclients::{ ethereum::{ - account_proof::{AccountProof, TryFromAccountProofError}, - execution_payload_header::{ - ExecutionPayloadHeader, TryFromExecutionPayloadHeaderError, - }, + account_proof::AccountProof, execution_payload_header::ExecutionPayloadHeader, }, tendermint, }, @@ -29,50 +25,68 @@ pub struct Header { pub account_proof: AccountProof, } -impl From
for protos::union::ibc::lightclients::berachain::v1::Header { - fn from(value: Header) -> Self { - Self { - cometbft_header: Some(value.cometbft_header.into()), - execution_header: Some(value.execution_header.into()), - execution_header_proof: Some(value.execution_header_proof.into()), - account_proof: Some(value.account_proof.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + ibc::{ + core::commitment::merkle_proof::proto::TryFromMerkleProofError, + lightclients::{ + berachain::header::Header, + ethereum::{ + account_proof::proto::TryFromAccountProofError, + execution_payload_header::proto::TryFromExecutionPayloadHeaderError, + }, + tendermint, + }, + }, + }; + + impl From
for protos::union::ibc::lightclients::berachain::v1::Header { + fn from(value: Header) -> Self { + Self { + cometbft_header: Some(value.cometbft_header.into()), + execution_header: Some(value.execution_header.into()), + execution_header_proof: Some(value.execution_header_proof.into()), + account_proof: Some(value.account_proof.into()), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromHeaderError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid cometbft header")] - CometbftHeader(#[source] tendermint::header::TryFromHeaderError), - #[error("invalid execution header")] - ExecutionHeader(#[source] TryFromExecutionPayloadHeaderError), - #[error("invalid execution header proof")] - ExecutionHeaderProof(#[source] TryFromMerkleProofError), - #[error("invalid account proof")] - AccountProof(#[source] TryFromAccountProofError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromHeaderError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid cometbft header")] + CometbftHeader(#[source] tendermint::header::proto::TryFromHeaderError), + #[error("invalid execution header")] + ExecutionHeader(#[source] TryFromExecutionPayloadHeaderError), + #[error("invalid execution header proof")] + ExecutionHeaderProof(#[source] TryFromMerkleProofError), + #[error("invalid account proof")] + AccountProof(#[source] TryFromAccountProofError), + } -impl TryFrom for Header { - type Error = TryFromHeaderError; + impl TryFrom for Header { + type Error = TryFromHeaderError; - fn try_from( - value: protos::union::ibc::lightclients::berachain::v1::Header, - ) -> Result { - Ok(Self { - cometbft_header: required!(value.cometbft_header)? - .try_into() - .map_err(TryFromHeaderError::CometbftHeader)?, - execution_header: required!(value.execution_header)? - .try_into() - .map_err(TryFromHeaderError::ExecutionHeader)?, - execution_header_proof: required!(value.execution_header_proof)? - .try_into() - .map_err(TryFromHeaderError::ExecutionHeaderProof)?, - account_proof: required!(value.account_proof)? - .try_into() - .map_err(TryFromHeaderError::AccountProof)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::berachain::v1::Header, + ) -> Result { + Ok(Self { + cometbft_header: required!(value.cometbft_header)? + .try_into() + .map_err(TryFromHeaderError::CometbftHeader)?, + execution_header: required!(value.execution_header)? + .try_into() + .map_err(TryFromHeaderError::ExecutionHeader)?, + execution_header_proof: required!(value.execution_header_proof)? + .try_into() + .map_err(TryFromHeaderError::ExecutionHeaderProof)?, + account_proof: required!(value.account_proof)? + .try_into() + .map_err(TryFromHeaderError::AccountProof)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/cometbls.rs b/lib/unionlabs/src/ibc/lightclients/cometbls.rs index cdeece1d93..72b2e520fb 100644 --- a/lib/unionlabs/src/ibc/lightclients/cometbls.rs +++ b/lib/unionlabs/src/ibc/lightclients/cometbls.rs @@ -1,5 +1,5 @@ pub mod client_state; pub mod consensus_state; pub mod header; -pub mod light_header; pub mod misbehaviour; +pub mod signed_header; diff --git a/lib/unionlabs/src/ibc/lightclients/cometbls/client_state.rs b/lib/unionlabs/src/ibc/lightclients/cometbls/client_state.rs index 25d01c4720..c6c42bdc94 100644 --- a/lib/unionlabs/src/ibc/lightclients/cometbls/client_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/cometbls/client_state.rs @@ -1,7 +1,7 @@ use macros::model; use crate::{ - errors::{required, MissingField}, + errors::{ExpectedLength, InvalidLength}, ibc::core::client::height::Height, }; @@ -11,85 +11,140 @@ use crate::{ into, from ), - ethabi( - raw(contracts::glue::UnionIbcLightclientsCometblsV1ClientStateData), - into, - from - ) + ethabi(raw(ibc_solidity::cometbls::ClientState), into, from) )] pub struct ClientState { - pub chain_id: String, + pub chain_id: CometblsChainId, pub trusting_period: u64, - pub unbonding_period: u64, pub max_clock_drift: u64, pub frozen_height: Height, pub latest_height: Height, } -impl From for protos::union::ibc::lightclients::cometbls::v1::ClientState { - fn from(value: ClientState) -> Self { - Self { - chain_id: value.chain_id, - trusting_period: value.trusting_period, - unbonding_period: value.unbonding_period, - max_clock_drift: value.max_clock_drift, - frozen_height: Some(value.frozen_height.into()), - latest_height: Some(value.latest_height.into()), +// TODO: Generalize this to a reusable type? Also see https://github.com/cometbft/cometbft/blob/54098b0c19099a38d2ce43aa30e6aee4c3f90978/types/genesis.go#L21 +#[model] +#[cfg_attr(feature = "serde", serde(transparent))] +pub struct CometblsChainId(String); + +impl CometblsChainId { + pub const MAX_LEN: usize = 31; + + pub fn from_string(s: impl Into) -> Result { + let s = s.into(); + + if s.len() > Self::MAX_LEN { + Err(InvalidLength { + expected: ExpectedLength::Between(0, Self::MAX_LEN), + found: s.len(), + }) + } else { + Ok(Self(s)) } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromClientStateError { - #[error(transparent)] - MissingField(MissingField), -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -impl TryFrom for ClientState { - type Error = TryFromClientStateError; - - fn try_from( - value: protos::union::ibc::lightclients::cometbls::v1::ClientState, - ) -> Result { - Ok(Self { - chain_id: value.chain_id, - trusting_period: value.trusting_period, - unbonding_period: value.unbonding_period, - max_clock_drift: value.max_clock_drift, - frozen_height: required!(value.frozen_height)?.into(), - latest_height: required!(value.latest_height)?.into(), - }) + #[cfg(feature = "ethabi")] + pub fn try_from_fixed_bytes( + bz: alloy_core::primitives::FixedBytes<31>, + ) -> Result { + String::from_utf8(bz.into_iter().skip_while(|b| *b == 0).collect()).map(Self) + } + + #[cfg(feature = "ethabi")] + #[must_use] + pub fn into_fixed_bytes(self) -> alloy_core::primitives::FixedBytes<31> { + let mut bz = >::default(); + + bz[Self::MAX_LEN - self.0.len()..].copy_from_slice(self.0.as_bytes()); + + bz } } -#[cfg(feature = "ethabi")] -impl From for contracts::glue::UnionIbcLightclientsCometblsV1ClientStateData { - fn from(value: ClientState) -> Self { - Self { - chain_id: value.chain_id, - trusting_period: value.trusting_period, - unbonding_period: value.unbonding_period, - max_clock_drift: value.max_clock_drift, - frozen_height: value.frozen_height.into(), - latest_height: value.latest_height.into(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField}, + ibc::lightclients::cometbls::client_state::{ClientState, CometblsChainId}, + }; + + impl From for protos::union::ibc::lightclients::cometbls::v1::ClientState { + fn from(value: ClientState) -> Self { + Self { + chain_id: value.chain_id.0, + trusting_period: value.trusting_period, + max_clock_drift: value.max_clock_drift, + frozen_height: Some(value.frozen_height.into()), + latest_height: Some(value.latest_height.into()), + } + } + } + + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromClientStateError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid chain id")] + ChainId(#[from] InvalidLength), + } + + impl TryFrom for ClientState { + type Error = TryFromClientStateError; + + fn try_from( + value: protos::union::ibc::lightclients::cometbls::v1::ClientState, + ) -> Result { + Ok(Self { + chain_id: CometblsChainId::from_string(value.chain_id)?, + trusting_period: value.trusting_period, + max_clock_drift: value.max_clock_drift, + frozen_height: required!(value.frozen_height)?.into(), + latest_height: required!(value.latest_height)?.into(), + }) } } } #[cfg(feature = "ethabi")] -impl TryFrom for ClientState { - type Error = TryFromClientStateError; - - fn try_from( - value: contracts::glue::UnionIbcLightclientsCometblsV1ClientStateData, - ) -> Result { - Ok(Self { - chain_id: value.chain_id, - trusting_period: value.trusting_period, - unbonding_period: value.unbonding_period, - max_clock_drift: value.max_clock_drift, - frozen_height: value.frozen_height.into(), - latest_height: value.latest_height.into(), - }) +pub mod ethabi { + use crate::ibc::{ + core::client::height::Height, + lightclients::cometbls::client_state::{ClientState, CometblsChainId}, + }; + + impl From for ibc_solidity::cometbls::ClientState { + fn from(value: ClientState) -> Self { + Self { + chainId: value.chain_id.into_fixed_bytes(), + trustingPeriod: value.trusting_period, + maxClockDrift: value.max_clock_drift, + frozenHeight: value.frozen_height.revision(), + latestHeight: value.latest_height.revision(), + } + } + } + + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromEthAbiClientStateError { + #[error("invalid chain id")] + ChainId(#[from] alloc::string::FromUtf8Error), + } + + impl TryFrom for ClientState { + type Error = TryFromEthAbiClientStateError; + + fn try_from(value: ibc_solidity::cometbls::ClientState) -> Result { + Ok(Self { + chain_id: CometblsChainId::try_from_fixed_bytes(value.chainId)?, + trusting_period: value.trustingPeriod, + max_clock_drift: value.maxClockDrift, + frozen_height: Height::new(value.frozenHeight), + latest_height: Height::new(value.latestHeight), + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/cometbls/consensus_state.rs b/lib/unionlabs/src/ibc/lightclients/cometbls/consensus_state.rs index 94f2d2bd7e..977d9c5673 100644 --- a/lib/unionlabs/src/ibc/lightclients/cometbls/consensus_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/cometbls/consensus_state.rs @@ -1,10 +1,6 @@ use macros::model; -use crate::{ - errors::{required, InvalidLength, MissingField}, - hash::H256, - ibc::core::commitment::merkle_root::{MerkleRoot, TryFromMerkleRootError}, -}; +use crate::{hash::H256, ibc::core::commitment::merkle_root::MerkleRoot}; #[model( proto( @@ -12,7 +8,7 @@ use crate::{ into, from ), - ethabi(raw(contracts::glue::OptimizedConsensusState), into, from) + ethabi(raw(ibc_solidity::cometbls::ConsensusState), into, from) )] pub struct ConsensusState { pub timestamp: u64, @@ -20,67 +16,82 @@ pub struct ConsensusState { pub next_validators_hash: H256, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromConsensusStateError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid root")] - Root(#[from] TryFromMerkleRootError), - #[error("invalid next validators hash")] - NextValidatorsHash(#[from] InvalidLength), -} - -impl TryFrom for ConsensusState { - type Error = TryFromConsensusStateError; +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField}, + ibc::{ + core::commitment::merkle_root::proto::TryFromMerkleRootError, + lightclients::cometbls::consensus_state::ConsensusState, + }, + }; - fn try_from( - value: protos::union::ibc::lightclients::cometbls::v1::ConsensusState, - ) -> Result { - Ok(Self { - timestamp: value.timestamp, - app_hash: required!(value.root)? - .try_into() - .map_err(TryFromConsensusStateError::Root)?, - next_validators_hash: value - .next_validators_hash - .try_into() - .map_err(TryFromConsensusStateError::NextValidatorsHash)?, - }) + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromConsensusStateError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid root")] + Root(#[from] TryFromMerkleRootError), + #[error("invalid next validators hash")] + NextValidatorsHash(#[from] InvalidLength), } -} -impl From for protos::union::ibc::lightclients::cometbls::v1::ConsensusState { - fn from(value: ConsensusState) -> Self { - Self { - timestamp: value.timestamp, - root: Some(value.app_hash.into()), - next_validators_hash: value.next_validators_hash.into(), + impl TryFrom for ConsensusState { + type Error = TryFromConsensusStateError; + + fn try_from( + value: protos::union::ibc::lightclients::cometbls::v1::ConsensusState, + ) -> Result { + Ok(Self { + timestamp: value.timestamp, + app_hash: required!(value.root)? + .try_into() + .map_err(TryFromConsensusStateError::Root)?, + next_validators_hash: value + .next_validators_hash + .try_into() + .map_err(TryFromConsensusStateError::NextValidatorsHash)?, + }) } } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::OptimizedConsensusState { - fn from(value: ConsensusState) -> Self { - Self { - timestamp: value.timestamp, - app_hash: value.app_hash.hash.into(), - next_validators_hash: value.next_validators_hash.into(), + impl From for protos::union::ibc::lightclients::cometbls::v1::ConsensusState { + fn from(value: ConsensusState) -> Self { + Self { + timestamp: value.timestamp, + root: Some(value.app_hash.into()), + next_validators_hash: value.next_validators_hash.into(), + } } } } #[cfg(feature = "ethabi")] -impl TryFrom for ConsensusState { - type Error = TryFromConsensusStateError; +pub mod ethabi { + use crate::ibc::{ + core::commitment::merkle_root::MerkleRoot, + lightclients::cometbls::consensus_state::ConsensusState, + }; - fn try_from(value: contracts::glue::OptimizedConsensusState) -> Result { - Ok(Self { - timestamp: value.timestamp, - app_hash: MerkleRoot { - hash: H256::from(value.app_hash), - }, - next_validators_hash: value.next_validators_hash.into(), - }) + impl From for ibc_solidity::cometbls::ConsensusState { + fn from(value: ConsensusState) -> Self { + Self { + timestamp: value.timestamp, + appHash: value.app_hash.hash.into(), + nextValidatorsHash: value.next_validators_hash.into(), + } + } + } + + impl From for ConsensusState { + fn from(value: ibc_solidity::cometbls::ConsensusState) -> Self { + Self { + timestamp: value.timestamp, + app_hash: MerkleRoot { + hash: value.appHash.into(), + }, + next_validators_hash: value.nextValidatorsHash.into(), + } + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/cometbls/header.rs b/lib/unionlabs/src/ibc/lightclients/cometbls/header.rs index 66024afbd9..1855a2b17c 100644 --- a/lib/unionlabs/src/ibc/lightclients/cometbls/header.rs +++ b/lib/unionlabs/src/ibc/lightclients/cometbls/header.rs @@ -1,13 +1,7 @@ use macros::model; -#[cfg(feature = "ethabi")] -use crate::ibc::lightclients::cometbls::light_header::TryFromEthAbiLightHeaderError; -use crate::{ - errors::{required, MissingField}, - ibc::{ - core::client::height::Height, - lightclients::cometbls::light_header::{LightHeader, TryFromLightHeaderError}, - }, +use crate::ibc::{ + core::client::height::Height, lightclients::cometbls::signed_header::SignedHeader, }; #[model( @@ -16,87 +10,99 @@ use crate::{ into, from ), - ethabi( - raw(contracts::glue::UnionIbcLightclientsCometblsV1HeaderData), - into, - from - ) + ethabi(raw(ibc_solidity::cometbls::Header), into, from) )] pub struct Header { - pub signed_header: LightHeader, + pub signed_header: SignedHeader, pub trusted_height: Height, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug("{}", ::serde_utils::to_hex(&zero_knowledge_proof))] pub zero_knowledge_proof: Vec, } -impl From
for protos::union::ibc::lightclients::cometbls::v1::Header { - fn from(value: Header) -> Self { - Self { - signed_header: Some(value.signed_header.into()), - trusted_height: Some(value.trusted_height.into()), - zero_knowledge_proof: value.zero_knowledge_proof, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + ibc::lightclients::cometbls::{ + header::Header, signed_header::proto::TryFromSignedHeaderError, + }, + }; + + impl From
for protos::union::ibc::lightclients::cometbls::v1::Header { + fn from(value: Header) -> Self { + Self { + signed_header: Some(value.signed_header.into()), + trusted_height: Some(value.trusted_height.into()), + zero_knowledge_proof: value.zero_knowledge_proof, + } } } -} -#[cfg(feature = "ethabi")] -impl From
for contracts::glue::UnionIbcLightclientsCometblsV1HeaderData { - fn from(value: Header) -> Self { - Self { - signed_header: value.signed_header.into(), - trusted_height: value.trusted_height.into(), - zero_knowledge_proof: value.zero_knowledge_proof.into(), + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromHeaderError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid signed header")] + SignedHeader(#[from] TryFromSignedHeaderError), + } + + impl TryFrom for Header { + type Error = TryFromHeaderError; + + fn try_from( + value: protos::union::ibc::lightclients::cometbls::v1::Header, + ) -> Result { + Ok(Self { + signed_header: required!(value.signed_header)?.try_into()?, + trusted_height: required!(value.trusted_height)?.into(), + zero_knowledge_proof: value.zero_knowledge_proof, + }) } } } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromHeaderError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid signed header")] - SignedHeader(#[from] TryFromLightHeaderError), -} +#[cfg(feature = "ethabi")] +pub mod ethabi { + use crate::ibc::{ + core::client::height::Height, + lightclients::cometbls::{ + header::Header, signed_header::ethabi::TryFromEthAbiSignedHeaderError, + }, + }; -impl TryFrom for Header { - type Error = TryFromHeaderError; - - fn try_from( - value: protos::union::ibc::lightclients::cometbls::v1::Header, - ) -> Result { - Ok(Self { - signed_header: required!(value.signed_header)?.try_into()?, - trusted_height: required!(value.trusted_height)?.into(), - zero_knowledge_proof: value.zero_knowledge_proof, - }) + impl From
for ibc_solidity::cometbls::Header { + fn from(value: Header) -> Self { + Self { + signedHeader: value.signed_header.into(), + trustedHeight: value.trusted_height.revision(), + zeroKnowledgeProof: value.zero_knowledge_proof.into(), + } + } } -} -#[cfg(feature = "ethabi")] -#[derive(Debug, Clone, PartialEq)] -pub enum TryFromEthAbiHeaderError { - SignedHeader(TryFromEthAbiLightHeaderError), -} + #[derive(Debug, Clone, PartialEq)] + pub enum TryFromEthAbiHeaderError { + SignedHeader(TryFromEthAbiSignedHeaderError), + } -#[cfg(feature = "ethabi")] -impl TryFrom for Header { - type Error = TryFromEthAbiHeaderError; - - fn try_from( - value: contracts::glue::UnionIbcLightclientsCometblsV1HeaderData, - ) -> Result { - Ok(Self { - signed_header: value - .signed_header - .try_into() - .map_err(TryFromEthAbiHeaderError::SignedHeader)?, - trusted_height: value.trusted_height.into(), - zero_knowledge_proof: value.zero_knowledge_proof.to_vec(), - }) + impl TryFrom for Header { + type Error = TryFromEthAbiHeaderError; + + fn try_from(value: ibc_solidity::cometbls::Header) -> Result { + Ok(Self { + signed_header: value + .signedHeader + .try_into() + .map_err(TryFromEthAbiHeaderError::SignedHeader)?, + trusted_height: Height::new(value.trustedHeight), + zero_knowledge_proof: value.zeroKnowledgeProof.to_vec(), + }) + } } } +#[cfg(feature = "bcs")] #[cfg(test)] mod tests { use hex_literal::hex; @@ -113,7 +119,7 @@ mod tests { let bz = hex!("630e0000000000002239df6600000000406dcb0b2f4975ab7e75a677f43efebf53e0ec05460d2cf55506ad08d6b05254f96a500d2f4975ab7e75a677f43efebf53e0ec05460d2cf55506ad08d6b05254f96a500dfc45a4f41582fbfc1e3b7f79b0fd39d5f738133e68fdd47468fb037b0a44c9da01000000000000001d0900000000000080031c9bc15a0c4541aff1d12780d6cf4ae2bdc6e3afafceae9d4fa36209fa323b68002e9c77c223d830e5df6a80cdd683f0986353933ee3179970fccc5d893219d30726f3b8c0dbe630b815b01b5557228a0dfeb0e0435bb0d15d1ccff7f6133fc110937d9fceee2f9052468c198fafeca89d524142a0efa9dc4df445853ce617302059018fef03dc34456ad201d2a5420a7d1c8fac57cb48cbe6709ac4da27d1eb250f73eab007d26cbff41ceb4564ab1cdfa83e9ee88be4f816dc841bbf2e90c80186ad9437fce7655c71b54addae1ccea429da3edba3232d073cb7e89ff2d27218556f1af0c446962ace932f637279dd0ad3ef1501fb6da39d5f68282f54bcf6094999672f3d8cbbf0409aef1048175ffff50b03a5154016d307a2ef425ffee509cd447b22ce6331c7a3473b2c6da1f9d550e8c3ab19bde65e699e07f4f2886c03ec4ff2faa0e342de7ac5daf32025acd6070c19ed8b007c121db0d955472c7d2e38d5a943d15bc902613029e4baa8c26034ff280e3a4d5468fcd6745afe53b5"); let header = Header { - signed_header: LightHeader { + signed_header: SignedHeader { height: 3683.try_into().unwrap(), time: "2024-09-09T18:06:26.197881152Z".parse().unwrap(), validators_hash: H256::new(hex!( @@ -126,10 +132,7 @@ mod tests { "fc45a4f41582fbfc1e3b7f79b0fd39d5f738133e68fdd47468fb037b0a44c9da" )), }, - trusted_height: Height { - revision_number: 1, - revision_height: 2333, - }, + trusted_height: Height::new_with_revision(1, 2333), zero_knowledge_proof: hex!("1c9bc15a0c4541aff1d12780d6cf4ae2bdc6e3afafceae9d4fa36209fa323b68002e9c77c223d830e5df6a80cdd683f0986353933ee3179970fccc5d893219d30726f3b8c0dbe630b815b01b5557228a0dfeb0e0435bb0d15d1ccff7f6133fc110937d9fceee2f9052468c198fafeca89d524142a0efa9dc4df445853ce617302059018fef03dc34456ad201d2a5420a7d1c8fac57cb48cbe6709ac4da27d1eb250f73eab007d26cbff41ceb4564ab1cdfa83e9ee88be4f816dc841bbf2e90c80186ad9437fce7655c71b54addae1ccea429da3edba3232d073cb7e89ff2d27218556f1af0c446962ace932f637279dd0ad3ef1501fb6da39d5f68282f54bcf6094999672f3d8cbbf0409aef1048175ffff50b03a5154016d307a2ef425ffee509cd447b22ce6331c7a3473b2c6da1f9d550e8c3ab19bde65e699e07f4f2886c03ec4ff2faa0e342de7ac5daf32025acd6070c19ed8b007c121db0d955472c7d2e38d5a943d15bc902613029e4baa8c26034ff280e3a4d5468fcd6745afe53b5").to_vec(), }; diff --git a/lib/unionlabs/src/ibc/lightclients/cometbls/light_header.rs b/lib/unionlabs/src/ibc/lightclients/cometbls/light_header.rs deleted file mode 100644 index f343629c6f..0000000000 --- a/lib/unionlabs/src/ibc/lightclients/cometbls/light_header.rs +++ /dev/null @@ -1,145 +0,0 @@ -use macros::model; - -#[cfg(feature = "ethabi")] -use crate::google::protobuf::timestamp::TryFromEthAbiTimestampError; -use crate::{ - bounded::{BoundedI64, BoundedIntError}, - errors::{required, InvalidLength, MissingField}, - google::protobuf::timestamp::{Timestamp, TryFromTimestampError}, - hash::H256, -}; - -#[model( - proto( - raw(protos::union::ibc::lightclients::cometbls::v1::LightHeader), - into, - from - ), - ethabi( - raw(contracts::glue::UnionIbcLightclientsCometblsV1LightHeaderData), - into, - from - ) -)] -pub struct LightHeader { - #[serde(with = "::serde_utils::string")] - pub height: BoundedI64<0, { i64::MAX }>, - pub time: Timestamp, - pub validators_hash: H256, - pub next_validators_hash: H256, - pub app_hash: H256, -} - -impl From for protos::union::ibc::lightclients::cometbls::v1::LightHeader { - fn from(value: LightHeader) -> Self { - Self { - height: value.height.into(), - time: Some(value.time.into()), - validators_hash: value.validators_hash.into(), - next_validators_hash: value.next_validators_hash.into(), - app_hash: value.app_hash.into(), - } - } -} - -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromLightHeaderError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid height")] - Height(#[source] BoundedIntError), - #[error("invalid timestamp")] - Timestamp(#[from] TryFromTimestampError), - #[error("invalid validators hash")] - ValidatorsHash(#[source] InvalidLength), - #[error("invalid next validators hash")] - NextValidatorsHash(#[source] InvalidLength), - #[error("invalid app hash")] - AppHash(#[source] InvalidLength), -} - -impl TryFrom for LightHeader { - type Error = TryFromLightHeaderError; - - fn try_from( - value: protos::union::ibc::lightclients::cometbls::v1::LightHeader, - ) -> Result { - Ok(Self { - height: value - .height - .try_into() - .map_err(TryFromLightHeaderError::Height)?, - time: required!(value.time)?.try_into()?, - validators_hash: value - .validators_hash - .try_into() - .map_err(TryFromLightHeaderError::ValidatorsHash)?, - next_validators_hash: value - .next_validators_hash - .try_into() - .map_err(TryFromLightHeaderError::NextValidatorsHash)?, - app_hash: value - .app_hash - .try_into() - .map_err(TryFromLightHeaderError::AppHash)?, - }) - } -} - -#[cfg(feature = "ethabi")] -impl From for contracts::glue::UnionIbcLightclientsCometblsV1LightHeaderData { - fn from(value: LightHeader) -> Self { - Self { - height: value.height.into(), - time: value.time.into(), - validators_hash: value.validators_hash.get().into(), - next_validators_hash: value.next_validators_hash.get().into(), - app_hash: value.app_hash.get().into(), - } - } -} - -#[cfg(feature = "ethabi")] -#[derive(Debug, Clone, PartialEq)] -pub enum TryFromEthAbiLightHeaderError { - Height(BoundedIntError), - Timestamp(TryFromEthAbiTimestampError), - ValidatorsHash(InvalidLength), - NextValidatorsHash(InvalidLength), - AppHash(InvalidLength), -} - -#[cfg(feature = "ethabi")] -impl TryFrom for LightHeader { - type Error = TryFromEthAbiLightHeaderError; - - fn try_from( - value: contracts::glue::UnionIbcLightclientsCometblsV1LightHeaderData, - ) -> Result { - Ok(Self { - height: value - .height - .try_into() - .map_err(TryFromEthAbiLightHeaderError::Height)?, - time: value - .time - .try_into() - .map_err(TryFromEthAbiLightHeaderError::Timestamp)?, - validators_hash: value - .validators_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiLightHeaderError::ValidatorsHash)?, - next_validators_hash: value - .next_validators_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiLightHeaderError::NextValidatorsHash)?, - app_hash: value - .app_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiLightHeaderError::AppHash)?, - }) - } -} diff --git a/lib/unionlabs/src/ibc/lightclients/cometbls/signed_header.rs b/lib/unionlabs/src/ibc/lightclients/cometbls/signed_header.rs new file mode 100644 index 0000000000..7a023a83db --- /dev/null +++ b/lib/unionlabs/src/ibc/lightclients/cometbls/signed_header.rs @@ -0,0 +1,149 @@ +use macros::model; + +use crate::{bounded::BoundedI64, google::protobuf::timestamp::Timestamp, hash::H256}; + +#[model( + proto( + raw(protos::union::ibc::lightclients::cometbls::v1::SignedHeader), + into, + from + ), + ethabi(raw(ibc_solidity::cometbls::SignedHeader), into, from) +)] +pub struct SignedHeader { + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] + pub height: BoundedI64<0, { i64::MAX }>, + pub time: Timestamp, + pub validators_hash: H256, + pub next_validators_hash: H256, + pub app_hash: H256, +} + +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + bounded::BoundedIntError, + errors::{required, InvalidLength, MissingField}, + google::protobuf::timestamp::proto::TryFromTimestampError, + ibc::lightclients::cometbls::signed_header::SignedHeader, + }; + + impl From for protos::union::ibc::lightclients::cometbls::v1::SignedHeader { + fn from(value: SignedHeader) -> Self { + Self { + height: value.height.into(), + time: Some(value.time.into()), + validators_hash: value.validators_hash.into(), + next_validators_hash: value.next_validators_hash.into(), + app_hash: value.app_hash.into(), + } + } + } + + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromSignedHeaderError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid height")] + Height(#[source] BoundedIntError), + #[error("invalid timestamp")] + Timestamp(#[from] TryFromTimestampError), + #[error("invalid validators hash")] + ValidatorsHash(#[source] InvalidLength), + #[error("invalid next validators hash")] + NextValidatorsHash(#[source] InvalidLength), + #[error("invalid app hash")] + AppHash(#[source] InvalidLength), + } + + impl TryFrom for SignedHeader { + type Error = TryFromSignedHeaderError; + + fn try_from( + value: protos::union::ibc::lightclients::cometbls::v1::SignedHeader, + ) -> Result { + Ok(Self { + height: value + .height + .try_into() + .map_err(TryFromSignedHeaderError::Height)?, + time: required!(value.time)?.try_into()?, + validators_hash: value + .validators_hash + .try_into() + .map_err(TryFromSignedHeaderError::ValidatorsHash)?, + next_validators_hash: value + .next_validators_hash + .try_into() + .map_err(TryFromSignedHeaderError::NextValidatorsHash)?, + app_hash: value + .app_hash + .try_into() + .map_err(TryFromSignedHeaderError::AppHash)?, + }) + } + } +} + +#[cfg(feature = "ethabi")] +pub mod ethabi { + use crate::{ + bounded::{BoundedI32, BoundedI64, BoundedIntError}, + google::protobuf::timestamp::Timestamp, + ibc::lightclients::cometbls::signed_header::SignedHeader, + }; + + impl From for ibc_solidity::cometbls::SignedHeader { + fn from(value: SignedHeader) -> Self { + Self { + height: value + .height + .inner() + .try_into() + .expect("value is >= 0; qed;"), + secs: value + .time + .seconds + .inner() + .try_into() + .expect("value is >= 0; qed;"), + nanos: value + .time + .nanos + .inner() + .try_into() + .expect("value is >= 0; qed;"), + validatorsHash: value.validators_hash.into(), + nextValidatorsHash: value.next_validators_hash.into(), + appHash: value.app_hash.into(), + } + } + } + + #[derive(Debug, Clone, PartialEq)] + pub enum TryFromEthAbiSignedHeaderError { + Height(BoundedIntError), + Secs(BoundedIntError), + Nanos(BoundedIntError), + } + + impl TryFrom for SignedHeader { + type Error = TryFromEthAbiSignedHeaderError; + + fn try_from(value: ibc_solidity::cometbls::SignedHeader) -> Result { + Ok(Self { + height: BoundedI64::new(value.height) + .map_err(TryFromEthAbiSignedHeaderError::Height)?, + time: Timestamp { + seconds: BoundedI64::new(value.secs) + .map_err(TryFromEthAbiSignedHeaderError::Secs)?, + nanos: BoundedI32::new(value.nanos) + .map_err(TryFromEthAbiSignedHeaderError::Nanos)?, + }, + validators_hash: value.validatorsHash.into(), + next_validators_hash: value.nextValidatorsHash.into(), + app_hash: value.appHash.into(), + }) + } + } +} diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum.rs b/lib/unionlabs/src/ibc/lightclients/ethereum.rs index 929e2923bc..007ae96ec7 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum.rs @@ -9,6 +9,8 @@ pub mod fork_parameters; pub mod header; pub mod light_client_header; pub mod light_client_update; +#[cfg(feature = "ssz")] +// TODO: Add an UnboundedMisbehaviour and remove the feature gate on this module pub mod misbehaviour; pub mod storage_proof; pub mod sync_aggregate; diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/account_proof.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/account_proof.rs index 0d464b4d15..a5061c67e2 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/account_proof.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/account_proof.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::{errors::InvalidLength, hash::H256}; +use crate::hash::H256; #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::AccountProof), @@ -9,40 +9,45 @@ use crate::{errors::InvalidLength, hash::H256}; ))] pub struct AccountProof { pub storage_root: H256, - #[serde(with = "::serde_utils::hex_string_list")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string_list"))] #[debug(wrap = ::serde_utils::fmt::DebugListAsHex)] pub proof: Vec>, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromAccountProofError { - #[error("invalid `contract_address`")] - ContractAddress(#[source] InvalidLength), - #[error("invalid `storage_root`")] - StorageRoot(#[source] InvalidLength), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{errors::InvalidLength, ibc::lightclients::ethereum::account_proof::AccountProof}; + + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromAccountProofError { + #[error("invalid `contract_address`")] + ContractAddress(#[source] InvalidLength), + #[error("invalid `storage_root`")] + StorageRoot(#[source] InvalidLength), + } -impl TryFrom for AccountProof { - type Error = TryFromAccountProofError; + impl TryFrom for AccountProof { + type Error = TryFromAccountProofError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::AccountProof, - ) -> Result { - Ok(Self { - storage_root: value - .storage_root - .try_into() - .map_err(TryFromAccountProofError::StorageRoot)?, - proof: value.proof, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::AccountProof, + ) -> Result { + Ok(Self { + storage_root: value + .storage_root + .try_into() + .map_err(TryFromAccountProofError::StorageRoot)?, + proof: value.proof, + }) + } } -} -impl From for protos::union::ibc::lightclients::ethereum::v1::AccountProof { - fn from(value: AccountProof) -> Self { - Self { - storage_root: value.storage_root.into(), - proof: value.proof, + impl From for protos::union::ibc::lightclients::ethereum::v1::AccountProof { + fn from(value: AccountProof) -> Self { + Self { + storage_root: value.storage_root.into(), + proof: value.proof, + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/account_update.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/account_update.rs index cfd39ecb5e..59631093a2 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/account_update.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/account_update.rs @@ -1,9 +1,6 @@ use macros::model; -use crate::{ - errors::{required, MissingField}, - ibc::lightclients::ethereum::account_proof::{AccountProof, TryFromAccountProofError}, -}; +use crate::ibc::lightclients::ethereum::account_proof::AccountProof; #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::AccountUpdate), @@ -14,30 +11,40 @@ pub struct AccountUpdate { pub account_proof: AccountProof, } -impl From for protos::union::ibc::lightclients::ethereum::v1::AccountUpdate { - fn from(value: AccountUpdate) -> Self { - Self { - account_proof: Some(value.account_proof.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + ibc::lightclients::ethereum::{ + account_proof::proto::TryFromAccountProofError, account_update::AccountUpdate, + }, + }; + + impl From for protos::union::ibc::lightclients::ethereum::v1::AccountUpdate { + fn from(value: AccountUpdate) -> Self { + Self { + account_proof: Some(value.account_proof.into()), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromAccountUpdateError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid `account_proof`")] - AccountProof(#[from] TryFromAccountProofError), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromAccountUpdateError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid `account_proof`")] + AccountProof(#[from] TryFromAccountProofError), + } -impl TryFrom for AccountUpdate { - type Error = TryFromAccountUpdateError; + impl TryFrom for AccountUpdate { + type Error = TryFromAccountUpdateError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::AccountUpdate, - ) -> Result { - Ok(Self { - account_proof: required!(value.account_proof)?.try_into()?, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::AccountUpdate, + ) -> Result { + Ok(Self { + account_proof: required!(value.account_proof)?.try_into()?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/beacon_block_header.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/beacon_block_header.rs index 643a2f2197..a9ef2ae7b8 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/beacon_block_header.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/beacon_block_header.rs @@ -1,18 +1,17 @@ use macros::model; -use ssz::Ssz; -use crate::{errors::InvalidLength, hash::H256}; +use crate::hash::H256; -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::BeaconBlockHeader), into, from ))] pub struct BeaconBlockHeader { - #[serde(with = "serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "serde_utils::string"))] pub slot: u64, - #[serde(with = "serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "serde_utils::string"))] pub proposer_index: u64, pub parent_root: H256, pub state_root: H256, @@ -21,6 +20,7 @@ pub struct BeaconBlockHeader { // TODO: Ssz encoding doesn't need to take ownership, impl for &T as well as T // TODO: Impl this via #[model] +#[cfg(feature = "ssz")] impl crate::encoding::Decode for BeaconBlockHeader { type Error = ssz::decode::DecodeError; @@ -29,58 +29,68 @@ impl crate::encoding::Decode for BeaconBlockHeader { } } +#[cfg(feature = "ssz")] // TODO: Impl this via #[model] impl crate::encoding::Encode for BeaconBlockHeader { fn encode(self) -> Vec { + use ssz::Ssz; + self.as_ssz_bytes() } } -impl From for protos::union::ibc::lightclients::ethereum::v1::BeaconBlockHeader { - fn from(value: BeaconBlockHeader) -> Self { - Self { - slot: value.slot, - proposer_index: value.proposer_index, - parent_root: value.parent_root.get().into(), - state_root: value.state_root.get().into(), - body_root: value.body_root.get().into(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::InvalidLength, ibc::lightclients::ethereum::beacon_block_header::BeaconBlockHeader, + }; + + impl From for protos::union::ibc::lightclients::ethereum::v1::BeaconBlockHeader { + fn from(value: BeaconBlockHeader) -> Self { + Self { + slot: value.slot, + proposer_index: value.proposer_index, + parent_root: value.parent_root.get().into(), + state_root: value.state_root.get().into(), + body_root: value.body_root.get().into(), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromBeaconBlockHeaderError { - #[error("invalid `parent_root`")] - ParentRoot(#[source] InvalidLength), - #[error("invalid `state_root`")] - StateRoot(#[source] InvalidLength), - #[error("invalid `body_root`")] - BodyRoot(#[source] InvalidLength), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromBeaconBlockHeaderError { + #[error("invalid `parent_root`")] + ParentRoot(#[source] InvalidLength), + #[error("invalid `state_root`")] + StateRoot(#[source] InvalidLength), + #[error("invalid `body_root`")] + BodyRoot(#[source] InvalidLength), + } -impl TryFrom - for BeaconBlockHeader -{ - type Error = TryFromBeaconBlockHeaderError; + impl TryFrom + for BeaconBlockHeader + { + type Error = TryFromBeaconBlockHeaderError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::BeaconBlockHeader, - ) -> Result { - Ok(Self { - slot: value.slot, - proposer_index: value.proposer_index, - parent_root: value - .parent_root - .try_into() - .map_err(TryFromBeaconBlockHeaderError::ParentRoot)?, - state_root: value - .state_root - .try_into() - .map_err(TryFromBeaconBlockHeaderError::StateRoot)?, - body_root: value - .body_root - .try_into() - .map_err(TryFromBeaconBlockHeaderError::BodyRoot)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::BeaconBlockHeader, + ) -> Result { + Ok(Self { + slot: value.slot, + proposer_index: value.proposer_index, + parent_root: value + .parent_root + .try_into() + .map_err(TryFromBeaconBlockHeaderError::ParentRoot)?, + state_root: value + .state_root + .try_into() + .map_err(TryFromBeaconBlockHeaderError::StateRoot)?, + body_root: value + .body_root + .try_into() + .map_err(TryFromBeaconBlockHeaderError::BodyRoot)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/client_state.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/client_state.rs index 63c69bb15d..bc250ac2d3 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/client_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/client_state.rs @@ -1,16 +1,8 @@ -use alloc::sync::Arc; -use core::str::FromStr; - use macros::model; -use uint::FromDecStrErr; use crate::{ - errors::{required, InvalidLength, MissingField}, hash::{H160, H256}, - ibc::{ - core::client::height::Height, - lightclients::ethereum::fork_parameters::{ForkParameters, TryFromForkParametersError}, - }, + ibc::{core::client::height::Height, lightclients::ethereum::fork_parameters::ForkParameters}, uint::U256, }; @@ -36,70 +28,83 @@ pub struct ClientState { pub ibc_contract_address: H160, } -impl From for protos::union::ibc::lightclients::ethereum::v1::ClientState { - fn from(value: ClientState) -> Self { - Self { - chain_id: value.chain_id.to_string(), - genesis_validators_root: value.genesis_validators_root.into(), - min_sync_committee_participants: value.min_sync_committee_participants, - genesis_time: value.genesis_time, - fork_parameters: Some(value.fork_parameters.into()), - seconds_per_slot: value.seconds_per_slot, - slots_per_epoch: value.slots_per_epoch, - epochs_per_sync_committee_period: value.epochs_per_sync_committee_period, - latest_slot: value.latest_slot, - frozen_height: Some(value.frozen_height.into()), - ibc_commitment_slot: value.ibc_commitment_slot.to_be_bytes().into(), - ibc_contract_address: value.ibc_contract_address.into(), +#[cfg(feature = "proto")] +pub mod proto { + use core::str::FromStr; + + use crate::{ + errors::{required, InvalidLength, MissingField}, + ibc::lightclients::ethereum::{ + client_state::ClientState, fork_parameters::proto::TryFromForkParametersError, + }, + uint::U256, + }; + + impl From for protos::union::ibc::lightclients::ethereum::v1::ClientState { + fn from(value: ClientState) -> Self { + Self { + chain_id: value.chain_id.to_string(), + genesis_validators_root: value.genesis_validators_root.into(), + min_sync_committee_participants: value.min_sync_committee_participants, + genesis_time: value.genesis_time, + fork_parameters: Some(value.fork_parameters.into()), + seconds_per_slot: value.seconds_per_slot, + slots_per_epoch: value.slots_per_epoch, + epochs_per_sync_committee_period: value.epochs_per_sync_committee_period, + latest_slot: value.latest_slot, + frozen_height: Some(value.frozen_height.into()), + ibc_commitment_slot: value.ibc_commitment_slot.to_be_bytes().into(), + ibc_contract_address: value.ibc_contract_address.into(), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromClientStateError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid chain id: {0:?}")] - ChainId(Arc), - #[error("invalid fork parameters")] - ForkParameters(#[source] TryFromForkParametersError), - #[error("invalid genesis validators root")] - GenesisValidatorsRoot(#[source] InvalidLength), - #[error("invalid ibc commitment slot")] - IbcCommitmentSlot(#[source] InvalidLength), - #[error("invalid ibc contract address")] - IbcContractAddress(#[source] InvalidLength), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromClientStateError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid chain id")] + ChainId(#[source] ::Err), + #[error("invalid fork parameters")] + ForkParameters(#[source] TryFromForkParametersError), + #[error("invalid genesis validators root")] + GenesisValidatorsRoot(#[source] InvalidLength), + #[error("invalid ibc commitment slot")] + IbcCommitmentSlot(#[source] InvalidLength), + #[error("invalid ibc contract address")] + IbcContractAddress(#[source] InvalidLength), + } -impl TryFrom for ClientState { - type Error = TryFromClientStateError; + impl TryFrom for ClientState { + type Error = TryFromClientStateError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::ClientState, - ) -> Result { - Ok(Self { - chain_id: U256::from_str(&value.chain_id) - .map_err(|err| TryFromClientStateError::ChainId(Arc::new(err)))?, - genesis_validators_root: value - .genesis_validators_root - .try_into() - .map_err(TryFromClientStateError::GenesisValidatorsRoot)?, - min_sync_committee_participants: value.min_sync_committee_participants, - genesis_time: value.genesis_time, - fork_parameters: required!(value.fork_parameters)? - .try_into() - .map_err(TryFromClientStateError::ForkParameters)?, - seconds_per_slot: value.seconds_per_slot, - slots_per_epoch: value.slots_per_epoch, - epochs_per_sync_committee_period: value.epochs_per_sync_committee_period, - latest_slot: value.latest_slot, - frozen_height: value.frozen_height.unwrap_or_default().into(), - ibc_commitment_slot: U256::try_from_be_bytes(&value.ibc_commitment_slot) - .map_err(TryFromClientStateError::IbcCommitmentSlot)?, - ibc_contract_address: value - .ibc_contract_address - .try_into() - .map_err(TryFromClientStateError::IbcContractAddress)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::ClientState, + ) -> Result { + Ok(Self { + chain_id: U256::from_str(&value.chain_id) + .map_err(TryFromClientStateError::ChainId)?, + genesis_validators_root: value + .genesis_validators_root + .try_into() + .map_err(TryFromClientStateError::GenesisValidatorsRoot)?, + min_sync_committee_participants: value.min_sync_committee_participants, + genesis_time: value.genesis_time, + fork_parameters: required!(value.fork_parameters)? + .try_into() + .map_err(TryFromClientStateError::ForkParameters)?, + seconds_per_slot: value.seconds_per_slot, + slots_per_epoch: value.slots_per_epoch, + epochs_per_sync_committee_period: value.epochs_per_sync_committee_period, + latest_slot: value.latest_slot, + frozen_height: value.frozen_height.unwrap_or_default().into(), + ibc_commitment_slot: U256::try_from_be_bytes(&value.ibc_commitment_slot) + .map_err(TryFromClientStateError::IbcCommitmentSlot)?, + ibc_contract_address: value + .ibc_contract_address + .try_into() + .map_err(TryFromClientStateError::IbcContractAddress)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/consensus_state.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/consensus_state.rs index e90b5e60b5..31165a8bf3 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/consensus_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/consensus_state.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::{bls::BlsPublicKey, errors::InvalidLength, hash::H256}; +use crate::hash::{H256, H384}; #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::ConsensusState), @@ -16,70 +16,77 @@ pub struct ConsensusState { /// Timestamp of the block, *normalized to nanoseconds* in order to be compatible with ibc-go. pub timestamp: u64, /// aggregate public key of current sync committee - pub current_sync_committee: BlsPublicKey, + pub current_sync_committee: H384, /// aggregate public key of next sync committee - pub next_sync_committee: Option, + pub next_sync_committee: Option, } -impl From for protos::union::ibc::lightclients::ethereum::v1::ConsensusState { - fn from(value: ConsensusState) -> Self { - Self { - slot: value.slot, - state_root: value.state_root.into(), - storage_root: value.storage_root.into(), - timestamp: value.timestamp, - current_sync_committee: value.current_sync_committee.into(), - next_sync_committee: value - .next_sync_committee - .map(Into::into) - .unwrap_or_default(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::InvalidLength, ibc::lightclients::ethereum::consensus_state::ConsensusState, + }; + + impl From for protos::union::ibc::lightclients::ethereum::v1::ConsensusState { + fn from(value: ConsensusState) -> Self { + Self { + slot: value.slot, + state_root: value.state_root.into(), + storage_root: value.storage_root.into(), + timestamp: value.timestamp, + current_sync_committee: value.current_sync_committee.into(), + next_sync_committee: value + .next_sync_committee + .map(Into::into) + .unwrap_or_default(), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromConsensusStateError { - #[error("invalid current sync committee")] - CurrentSyncCommittee(#[source] InvalidLength), - #[error("invalid next sync committee")] - NextSyncCommittee(#[source] InvalidLength), - #[error("invalid storage root")] - StorageRoot(#[source] InvalidLength), - #[error("invalid state root")] - StateRoot(#[source] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromConsensusStateError { + #[error("invalid current sync committee")] + CurrentSyncCommittee(#[source] InvalidLength), + #[error("invalid next sync committee")] + NextSyncCommittee(#[source] InvalidLength), + #[error("invalid storage root")] + StorageRoot(#[source] InvalidLength), + #[error("invalid state root")] + StateRoot(#[source] InvalidLength), + } -impl TryFrom for ConsensusState { - type Error = TryFromConsensusStateError; + impl TryFrom for ConsensusState { + type Error = TryFromConsensusStateError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::ConsensusState, - ) -> Result { - Ok(Self { - slot: value.slot, - state_root: value - .state_root - .try_into() - .map_err(TryFromConsensusStateError::StorageRoot)?, - storage_root: value - .storage_root - .try_into() - .map_err(TryFromConsensusStateError::StorageRoot)?, - timestamp: value.timestamp, - current_sync_committee: value - .current_sync_committee - .try_into() - .map_err(TryFromConsensusStateError::CurrentSyncCommittee)?, - next_sync_committee: if value.next_sync_committee.is_empty() { - None - } else { - Some( - value - .next_sync_committee - .try_into() - .map_err(TryFromConsensusStateError::NextSyncCommittee)?, - ) - }, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::ConsensusState, + ) -> Result { + Ok(Self { + slot: value.slot, + state_root: value + .state_root + .try_into() + .map_err(TryFromConsensusStateError::StorageRoot)?, + storage_root: value + .storage_root + .try_into() + .map_err(TryFromConsensusStateError::StorageRoot)?, + timestamp: value.timestamp, + current_sync_committee: value + .current_sync_committee + .try_into() + .map_err(TryFromConsensusStateError::CurrentSyncCommittee)?, + next_sync_committee: if value.next_sync_committee.is_empty() { + None + } else { + Some( + value + .next_sync_committee + .try_into() + .map_err(TryFromConsensusStateError::NextSyncCommittee)?, + ) + }, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/execution_payload_header.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/execution_payload_header.rs index fb38dbfcc0..e7aea72c04 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/execution_payload_header.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/execution_payload_header.rs @@ -1,17 +1,19 @@ use macros::model; -use ssz::{ - types::{List, Vector}, - Ssz, +#[cfg(feature = "ssz")] +use { + crate::ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES}, + ssz::{ + types::{List, Vector}, + Ssz, + }, }; -use typenum::Unsigned; use crate::{ - errors::{ExpectedLength, InvalidLength}, - ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES}, hash::{H160, H256}, uint::U256, }; +#[cfg(feature = "ssz")] #[model] #[derive(Ssz)] pub struct CapellaExecutionPayloadHeader { @@ -19,29 +21,30 @@ pub struct CapellaExecutionPayloadHeader, pub prev_randao: H256, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub block_number: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub gas_limit: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub gas_used: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub timestamp: u64, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug("{}", serde_utils::to_hex(&extra_data))] pub extra_data: List, pub base_fee_per_gas: U256, pub block_hash: H256, - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub transactions_root: H256, - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub withdrawals_root: H256, } +#[cfg(feature = "ssz")] impl From> for CapellaExecutionPayloadHeader { @@ -66,49 +69,51 @@ impl From { pub parent_hash: H256, pub fee_recipient: H160, pub state_root: H256, pub receipts_root: H256, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug("{}", serde_utils::to_hex(&logs_bloom))] pub logs_bloom: Vector, pub prev_randao: H256, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub block_number: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub gas_limit: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub gas_used: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub timestamp: u64, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub extra_data: List, pub base_fee_per_gas: U256, pub block_hash: H256, - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub transactions_root: H256, - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub withdrawals_root: H256, // blob_gas_used: uint64 # [New in Deneb:EIP4844] - #[serde(default, with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(default, with = "::serde_utils::string"))] pub blob_gas_used: u64, // excess_blob_gas: uint64 # [New in Deneb:EIP4844] - #[serde(default, with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(default, with = "::serde_utils::string"))] pub excess_blob_gas: u64, } // TODO: Ssz encoding doesn't need to take ownership, impl for &T as well as T // TODO: Impl this via #[model] +#[cfg(feature = "ssz")] impl crate::encoding::Decode for ExecutionPayloadHeader { @@ -120,6 +125,7 @@ impl crate::encoding::Decode crate::encoding::Encode for ExecutionPayloadHeader { @@ -128,122 +134,167 @@ impl crate::encoding::Encode From> - for protos::union::ibc::lightclients::ethereum::v1::ExecutionPayloadHeader -{ - fn from(value: ExecutionPayloadHeader) -> Self { - Self { - parent_hash: value.parent_hash.into(), - fee_recipient: value.fee_recipient.into(), - state_root: value.state_root.into(), - receipts_root: value.receipts_root.into(), - logs_bloom: value.logs_bloom.into(), - prev_randao: value.prev_randao.into(), - block_number: value.block_number, - gas_limit: value.gas_limit, - gas_used: value.gas_used, - timestamp: value.timestamp, - extra_data: value.extra_data.into(), - base_fee_per_gas: value.base_fee_per_gas.to_be_bytes().into(), - block_hash: value.block_hash.into(), - transactions_root: value.transactions_root.into(), - withdrawals_root: value.withdrawals_root.into(), - blob_gas_used: value.blob_gas_used, - excess_blob_gas: value.excess_blob_gas, +#[cfg(feature = "proto")] +pub mod proto { + #[cfg(feature = "ssz")] + use { + crate::{ + errors::{ExpectedLength, InvalidLength}, + ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES}, + ibc::lightclients::ethereum::execution_payload_header::ExecutionPayloadHeader, + uint::U256, + }, + typenum::Unsigned, + }; + + use crate::ibc::lightclients::ethereum::execution_payload_header::UnboundedExecutionPayloadHeader; + + #[cfg(feature = "ssz")] + impl From> + for protos::union::ibc::lightclients::ethereum::v1::ExecutionPayloadHeader + { + fn from(value: ExecutionPayloadHeader) -> Self { + Self { + parent_hash: value.parent_hash.into(), + fee_recipient: value.fee_recipient.into(), + state_root: value.state_root.into(), + receipts_root: value.receipts_root.into(), + logs_bloom: value.logs_bloom.into(), + prev_randao: value.prev_randao.into(), + block_number: value.block_number, + gas_limit: value.gas_limit, + gas_used: value.gas_used, + timestamp: value.timestamp, + extra_data: value.extra_data.into(), + base_fee_per_gas: value.base_fee_per_gas.to_be_bytes().into(), + block_hash: value.block_hash.into(), + transactions_root: value.transactions_root.into(), + withdrawals_root: value.withdrawals_root.into(), + blob_gas_used: value.blob_gas_used, + excess_blob_gas: value.excess_blob_gas, + } } } -} -impl - TryFrom - for ExecutionPayloadHeader -{ - type Error = TryFromExecutionPayloadHeaderError; + #[cfg(feature = "ssz")] + impl + TryFrom + for ExecutionPayloadHeader + { + type Error = TryFromExecutionPayloadHeaderError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::ExecutionPayloadHeader, - ) -> Result { - Ok(Self { - parent_hash: value - .parent_hash - .try_into() - .map_err(TryFromExecutionPayloadHeaderError::ParentHash)?, - fee_recipient: value - .fee_recipient - .try_into() - .map_err(TryFromExecutionPayloadHeaderError::FeeRecipient)?, - state_root: value - .state_root - .try_into() - .map_err(TryFromExecutionPayloadHeaderError::StateRoot)?, - receipts_root: value - .receipts_root - .try_into() - .map_err(TryFromExecutionPayloadHeaderError::ReceiptsRoot)?, - logs_bloom: value.logs_bloom.try_into().map_err(|vec: Vec<_>| { - TryFromExecutionPayloadHeaderError::LogsBloom(InvalidLength { - expected: ExpectedLength::Exact(C::BYTES_PER_LOGS_BLOOM::USIZE), - found: vec.len(), - }) - })?, - prev_randao: value - .prev_randao - .try_into() - .map_err(TryFromExecutionPayloadHeaderError::PrevRandao)?, - block_number: value.block_number, - gas_limit: value.gas_limit, - gas_used: value.gas_used, - timestamp: value.timestamp, - extra_data: value.extra_data.try_into().map_err(|vec: Vec<_>| { - TryFromExecutionPayloadHeaderError::ExtraData(InvalidLength { - expected: ExpectedLength::Exact(C::MAX_EXTRA_DATA_BYTES::USIZE), - found: vec.len(), - }) - })?, - base_fee_per_gas: U256::try_from_be_bytes(&value.base_fee_per_gas) - .map_err(TryFromExecutionPayloadHeaderError::BaseFeePerGas)?, - block_hash: value - .block_hash - .try_into() - .map_err(TryFromExecutionPayloadHeaderError::BlockHash)?, - transactions_root: value - .transactions_root - .try_into() - .map_err(TryFromExecutionPayloadHeaderError::TransactionsRoot)?, - withdrawals_root: value - .withdrawals_root - .try_into() - .map_err(TryFromExecutionPayloadHeaderError::WithdrawalsRoot)?, - blob_gas_used: value.blob_gas_used, - excess_blob_gas: value.excess_blob_gas, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::ExecutionPayloadHeader, + ) -> Result { + Ok(Self { + parent_hash: value + .parent_hash + .try_into() + .map_err(TryFromExecutionPayloadHeaderError::ParentHash)?, + fee_recipient: value + .fee_recipient + .try_into() + .map_err(TryFromExecutionPayloadHeaderError::FeeRecipient)?, + state_root: value + .state_root + .try_into() + .map_err(TryFromExecutionPayloadHeaderError::StateRoot)?, + receipts_root: value + .receipts_root + .try_into() + .map_err(TryFromExecutionPayloadHeaderError::ReceiptsRoot)?, + logs_bloom: value.logs_bloom.try_into().map_err(|vec: Vec<_>| { + TryFromExecutionPayloadHeaderError::LogsBloom(InvalidLength { + expected: ExpectedLength::Exact(C::BYTES_PER_LOGS_BLOOM::USIZE), + found: vec.len(), + }) + })?, + prev_randao: value + .prev_randao + .try_into() + .map_err(TryFromExecutionPayloadHeaderError::PrevRandao)?, + block_number: value.block_number, + gas_limit: value.gas_limit, + gas_used: value.gas_used, + timestamp: value.timestamp, + extra_data: value.extra_data.try_into().map_err(|vec: Vec<_>| { + TryFromExecutionPayloadHeaderError::ExtraData(InvalidLength { + expected: ExpectedLength::Exact(C::MAX_EXTRA_DATA_BYTES::USIZE), + found: vec.len(), + }) + })?, + base_fee_per_gas: U256::try_from_be_bytes(&value.base_fee_per_gas) + .map_err(TryFromExecutionPayloadHeaderError::BaseFeePerGas)?, + block_hash: value + .block_hash + .try_into() + .map_err(TryFromExecutionPayloadHeaderError::BlockHash)?, + transactions_root: value + .transactions_root + .try_into() + .map_err(TryFromExecutionPayloadHeaderError::TransactionsRoot)?, + withdrawals_root: value + .withdrawals_root + .try_into() + .map_err(TryFromExecutionPayloadHeaderError::WithdrawalsRoot)?, + blob_gas_used: value.blob_gas_used, + excess_blob_gas: value.excess_blob_gas, + }) + } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromExecutionPayloadHeaderError { - #[error("invalid parent hash")] - ParentHash(#[source] InvalidLength), - #[error("invalid fee recipient")] - FeeRecipient(#[source] InvalidLength), - #[error("invalid state root")] - StateRoot(#[source] InvalidLength), - #[error("invalid receipts root")] - ReceiptsRoot(#[source] InvalidLength), - #[error("invalid logs bloom")] - LogsBloom(#[source] InvalidLength), - #[error("invalid prev randao")] - PrevRandao(#[source] InvalidLength), - #[error("invalid extra data")] - ExtraData(#[source] InvalidLength), - #[error("invalid base fee per gas")] - BaseFeePerGas(#[source] InvalidLength), - #[error("invalid block hash")] - BlockHash(#[source] InvalidLength), - #[error("invalid transactions root")] - TransactionsRoot(#[source] InvalidLength), - #[error("invalid withdrawals root")] - WithdrawalsRoot(#[source] InvalidLength), + #[cfg(feature = "ssz")] + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromExecutionPayloadHeaderError { + #[error("invalid parent hash")] + ParentHash(#[source] InvalidLength), + #[error("invalid fee recipient")] + FeeRecipient(#[source] InvalidLength), + #[error("invalid state root")] + StateRoot(#[source] InvalidLength), + #[error("invalid receipts root")] + ReceiptsRoot(#[source] InvalidLength), + #[error("invalid logs bloom")] + LogsBloom(#[source] InvalidLength), + #[error("invalid prev randao")] + PrevRandao(#[source] InvalidLength), + #[error("invalid extra data")] + ExtraData(#[source] InvalidLength), + #[error("invalid base fee per gas")] + BaseFeePerGas(#[source] InvalidLength), + #[error("invalid block hash")] + BlockHash(#[source] InvalidLength), + #[error("invalid transactions root")] + TransactionsRoot(#[source] InvalidLength), + #[error("invalid withdrawals root")] + WithdrawalsRoot(#[source] InvalidLength), + } + + impl From + for protos::union::ibc::lightclients::ethereum::v1::ExecutionPayloadHeader + { + fn from(value: UnboundedExecutionPayloadHeader) -> Self { + Self { + parent_hash: value.parent_hash.into(), + fee_recipient: value.fee_recipient.into(), + state_root: value.state_root.into(), + receipts_root: value.receipts_root.into(), + logs_bloom: value.logs_bloom, + prev_randao: value.prev_randao.into(), + block_number: value.block_number, + gas_limit: value.gas_limit, + gas_used: value.gas_used, + timestamp: value.timestamp, + extra_data: value.extra_data, + base_fee_per_gas: value.base_fee_per_gas.to_be_bytes().into(), + block_hash: value.block_hash.into(), + transactions_root: value.transactions_root.into(), + withdrawals_root: value.withdrawals_root.into(), + blob_gas_used: value.blob_gas_used, + excess_blob_gas: value.excess_blob_gas, + } + } + } } #[model(proto( @@ -255,57 +306,31 @@ pub struct UnboundedExecutionPayloadHeader { pub fee_recipient: H160, pub state_root: H256, pub receipts_root: H256, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug("{}", serde_utils::to_hex(&logs_bloom))] pub logs_bloom: Vec, pub prev_randao: H256, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub block_number: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub gas_limit: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub gas_used: u64, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub timestamp: u64, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub extra_data: Vec, pub base_fee_per_gas: U256, pub block_hash: H256, - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub transactions_root: H256, - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub withdrawals_root: H256, // blob_gas_used: uint64 # [New in Deneb:EIP4844] - #[serde(default, with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(default, with = "::serde_utils::string"))] pub blob_gas_used: u64, // excess_blob_gas: uint64 # [New in Deneb:EIP4844] - #[serde(default, with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(default, with = "::serde_utils::string"))] pub excess_blob_gas: u64, } - -impl From - for protos::union::ibc::lightclients::ethereum::v1::ExecutionPayloadHeader -{ - fn from(value: UnboundedExecutionPayloadHeader) -> Self { - Self { - parent_hash: value.parent_hash.into(), - fee_recipient: value.fee_recipient.into(), - state_root: value.state_root.into(), - receipts_root: value.receipts_root.into(), - logs_bloom: value.logs_bloom, - prev_randao: value.prev_randao.into(), - block_number: value.block_number, - gas_limit: value.gas_limit, - gas_used: value.gas_used, - timestamp: value.timestamp, - extra_data: value.extra_data, - base_fee_per_gas: value.base_fee_per_gas.to_be_bytes().into(), - block_hash: value.block_hash.into(), - transactions_root: value.transactions_root.into(), - withdrawals_root: value.withdrawals_root.into(), - blob_gas_used: value.blob_gas_used, - excess_blob_gas: value.excess_blob_gas, - } - } -} diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/fork.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/fork.rs index 4768bd7e4a..0bf9b20c29 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/fork.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/fork.rs @@ -1,50 +1,46 @@ use macros::model; -use ssz::Ssz; -use crate::{errors::InvalidLength, ethereum::Version}; +use crate::ethereum::Version; -#[cfg_attr( - feature = "ethabi", - derive( - ethers_contract_derive::EthAbiType, - ethers_contract_derive::EthAbiCodec - ) -)] -// REVIEW: Are these derives used? -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] #[model(proto(raw(protos::union::ibc::lightclients::ethereum::v1::Fork), into, from))] pub struct Fork { pub version: Version, pub epoch: u64, } -impl From for protos::union::ibc::lightclients::ethereum::v1::Fork { - fn from(value: Fork) -> Self { - Self { - version: value.version.into(), - epoch: value.epoch, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{errors::InvalidLength, ibc::lightclients::ethereum::fork::Fork}; + + impl From for protos::union::ibc::lightclients::ethereum::v1::Fork { + fn from(value: Fork) -> Self { + Self { + version: value.version.into(), + epoch: value.epoch, + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromForkError { - #[error("invalid version")] - Version(#[source] InvalidLength), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromForkError { + #[error("invalid version")] + Version(#[source] InvalidLength), + } -impl TryFrom for Fork { - type Error = TryFromForkError; + impl TryFrom for Fork { + type Error = TryFromForkError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::Fork, - ) -> Result { - Ok(Self { - version: value - .version - .try_into() - .map_err(TryFromForkError::Version)?, - epoch: value.epoch, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::Fork, + ) -> Result { + Ok(Self { + version: value + .version + .try_into() + .map_err(TryFromForkError::Version)?, + epoch: value.epoch, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/fork_parameters.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/fork_parameters.rs index 95a5654c46..f816fdc5e5 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/fork_parameters.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/fork_parameters.rs @@ -1,20 +1,8 @@ use macros::model; -use ssz::Ssz; -use crate::{ - errors::{required, InvalidLength, MissingField}, - ethereum::Version, - ibc::lightclients::ethereum::fork::{Fork, TryFromForkError}, -}; +use crate::{ethereum::Version, ibc::lightclients::ethereum::fork::Fork}; -#[cfg_attr( - feature = "ethabi", - derive( - ethers_contract_derive::EthAbiType, - ethers_contract_derive::EthAbiCodec - ) -)] -#[derive(Ssz)] +#[cfg_attr(feature = "ssz", derive(::ssz::Ssz))] #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::ForkParameters), into, @@ -29,59 +17,69 @@ pub struct ForkParameters { pub deneb: Fork, } -impl From for protos::union::ibc::lightclients::ethereum::v1::ForkParameters { - fn from(value: ForkParameters) -> Self { - Self { - genesis_fork_version: value.genesis_fork_version.into(), - genesis_slot: value.genesis_slot, - altair: Some(value.altair.into()), - bellatrix: Some(value.bellatrix.into()), - capella: Some(value.capella.into()), - deneb: Some(value.deneb.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField}, + ibc::lightclients::ethereum::{ + fork::proto::TryFromForkError, fork_parameters::ForkParameters, + }, + }; + + impl From for protos::union::ibc::lightclients::ethereum::v1::ForkParameters { + fn from(value: ForkParameters) -> Self { + Self { + genesis_fork_version: value.genesis_fork_version.into(), + genesis_slot: value.genesis_slot, + altair: Some(value.altair.into()), + bellatrix: Some(value.bellatrix.into()), + capella: Some(value.capella.into()), + deneb: Some(value.deneb.into()), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromForkParametersError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid genesis fork version")] - GenesisForkVersion(#[source] InvalidLength), - #[error("invalid altair")] - Altair(#[source] TryFromForkError), - #[error("invalid bellatrix")] - Bellatrix(#[source] TryFromForkError), - #[error("invalid capella")] - Capella(#[source] TryFromForkError), - #[error("invalid deneb")] - Deneb(#[source] TryFromForkError), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromForkParametersError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid genesis fork version")] + GenesisForkVersion(#[source] InvalidLength), + #[error("invalid altair")] + Altair(#[source] TryFromForkError), + #[error("invalid bellatrix")] + Bellatrix(#[source] TryFromForkError), + #[error("invalid capella")] + Capella(#[source] TryFromForkError), + #[error("invalid deneb")] + Deneb(#[source] TryFromForkError), + } -impl TryFrom for ForkParameters { - type Error = TryFromForkParametersError; + impl TryFrom for ForkParameters { + type Error = TryFromForkParametersError; - fn try_from( - proto: protos::union::ibc::lightclients::ethereum::v1::ForkParameters, - ) -> Result { - Ok(Self { - genesis_fork_version: proto - .genesis_fork_version - .try_into() - .map_err(TryFromForkParametersError::GenesisForkVersion)?, - genesis_slot: proto.genesis_slot, - altair: required!(proto.altair)? - .try_into() - .map_err(TryFromForkParametersError::Altair)?, - bellatrix: required!(proto.bellatrix)? - .try_into() - .map_err(TryFromForkParametersError::Bellatrix)?, - capella: required!(proto.capella)? - .try_into() - .map_err(TryFromForkParametersError::Capella)?, - deneb: required!(proto.deneb)? - .try_into() - .map_err(TryFromForkParametersError::Deneb)?, - }) + fn try_from( + proto: protos::union::ibc::lightclients::ethereum::v1::ForkParameters, + ) -> Result { + Ok(Self { + genesis_fork_version: proto + .genesis_fork_version + .try_into() + .map_err(TryFromForkParametersError::GenesisForkVersion)?, + genesis_slot: proto.genesis_slot, + altair: required!(proto.altair)? + .try_into() + .map_err(TryFromForkParametersError::Altair)?, + bellatrix: required!(proto.bellatrix)? + .try_into() + .map_err(TryFromForkParametersError::Bellatrix)?, + capella: required!(proto.capella)? + .try_into() + .map_err(TryFromForkParametersError::Capella)?, + deneb: required!(proto.deneb)? + .try_into() + .map_err(TryFromForkParametersError::Deneb)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/header.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/header.rs index cb96fdb63f..fd319bb23f 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/header.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/header.rs @@ -1,77 +1,30 @@ use macros::model; +use crate::ibc::lightclients::ethereum::{ + account_update::AccountUpdate, light_client_update::UnboundedLightClientUpdate, + trusted_sync_committee::UnboundedTrustedSyncCommittee, +}; +#[cfg(feature = "ssz")] use crate::{ - errors::{required, MissingField}, ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE}, ibc::lightclients::ethereum::{ - account_update::{AccountUpdate, TryFromAccountUpdateError}, - light_client_update::{ - LightClientUpdate, TryFromLightClientUpdateError, UnboundedLightClientUpdate, - }, - trusted_sync_committee::{ - TrustedSyncCommittee, TryFromTrustedSyncCommitteeError, UnboundedTrustedSyncCommittee, - }, + light_client_update::LightClientUpdate, trusted_sync_committee::TrustedSyncCommittee, }, }; +#[cfg(feature = "ssz")] #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::Header), into, from ))] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct Header { pub trusted_sync_committee: TrustedSyncCommittee, pub consensus_update: LightClientUpdate, pub account_update: AccountUpdate, } -impl From> - for protos::union::ibc::lightclients::ethereum::v1::Header -{ - fn from(value: Header) -> Self { - Self { - trusted_sync_committee: Some(value.trusted_sync_committee.into()), - consensus_update: Some(value.consensus_update.into()), - account_update: Some(value.account_update.into()), - } - } -} - -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromHeaderError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid `trusted_sync_committee`")] - TrustedSyncCommittee(#[from] TryFromTrustedSyncCommitteeError), - #[error("invalid `consensus_update`")] - ConsensusUpdate(#[from] TryFromLightClientUpdateError), - #[error("invalid `account_update`")] - AccountUpdate(#[from] TryFromAccountUpdateError), -} - -impl - TryFrom for Header -{ - type Error = TryFromHeaderError; - - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::Header, - ) -> Result { - Ok(Self { - trusted_sync_committee: required!(value.trusted_sync_committee)? - .try_into() - .map_err(TryFromHeaderError::TrustedSyncCommittee)?, - consensus_update: required!(value.consensus_update)? - .try_into() - .map_err(TryFromHeaderError::ConsensusUpdate)?, - account_update: required!(value.account_update)? - .try_into() - .map_err(TryFromHeaderError::AccountUpdate)?, - }) - } -} - #[model(proto(raw(protos::union::ibc::lightclients::ethereum::v1::Header), from))] pub struct UnboundedHeader { pub trusted_sync_committee: UnboundedTrustedSyncCommittee, @@ -79,12 +32,76 @@ pub struct UnboundedHeader { pub account_update: AccountUpdate, } -impl From for protos::union::ibc::lightclients::ethereum::v1::Header { - fn from(value: UnboundedHeader) -> Self { - Self { - trusted_sync_committee: Some(value.trusted_sync_committee.into()), - consensus_update: Some(value.consensus_update.into()), - account_update: Some(value.account_update.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::ibc::lightclients::ethereum::header::UnboundedHeader; + #[cfg(feature = "ssz")] + use crate::{ + errors::{required, MissingField}, + ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE}, + ibc::lightclients::ethereum::{ + account_update::proto::TryFromAccountUpdateError, header::Header, + light_client_update::proto::TryFromLightClientUpdateError, + trusted_sync_committee::proto::TryFromTrustedSyncCommitteeError, + }, + }; + + #[cfg(feature = "ssz")] + impl From> + for protos::union::ibc::lightclients::ethereum::v1::Header + { + fn from(value: Header) -> Self { + Self { + trusted_sync_committee: Some(value.trusted_sync_committee.into()), + consensus_update: Some(value.consensus_update.into()), + account_update: Some(value.account_update.into()), + } + } + } + + #[cfg(feature = "ssz")] + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromHeaderError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid `trusted_sync_committee`")] + TrustedSyncCommittee(#[from] TryFromTrustedSyncCommitteeError), + #[error("invalid `consensus_update`")] + ConsensusUpdate(#[from] TryFromLightClientUpdateError), + #[error("invalid `account_update`")] + AccountUpdate(#[from] TryFromAccountUpdateError), + } + + #[cfg(feature = "ssz")] + impl + TryFrom for Header + { + type Error = TryFromHeaderError; + + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::Header, + ) -> Result { + Ok(Self { + trusted_sync_committee: required!(value.trusted_sync_committee)? + .try_into() + .map_err(TryFromHeaderError::TrustedSyncCommittee)?, + consensus_update: required!(value.consensus_update)? + .try_into() + .map_err(TryFromHeaderError::ConsensusUpdate)?, + account_update: required!(value.account_update)? + .try_into() + .map_err(TryFromHeaderError::AccountUpdate)?, + }) + } + } + + impl From for protos::union::ibc::lightclients::ethereum::v1::Header { + fn from(value: UnboundedHeader) -> Self { + Self { + trusted_sync_committee: Some(value.trusted_sync_committee.into()), + consensus_update: Some(value.consensus_update.into()), + account_update: Some(value.account_update.into()), + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/light_client_header.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/light_client_header.rs index fd38370251..30085e1942 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/light_client_header.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/light_client_header.rs @@ -1,106 +1,33 @@ use macros::model; -use ssz::Ssz; -use typenum::Unsigned; use crate::{ - errors::{ExpectedLength, InvalidLength, MissingField}, - ethereum::config::{ - consts::{floorlog2, EXECUTION_PAYLOAD_INDEX}, - BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, - }, + ethereum::config::consts::{floorlog2, EXECUTION_PAYLOAD_INDEX}, hash::H256, ibc::lightclients::ethereum::{ - beacon_block_header::{BeaconBlockHeader, TryFromBeaconBlockHeaderError}, - execution_payload_header::{ - ExecutionPayloadHeader, TryFromExecutionPayloadHeaderError, - UnboundedExecutionPayloadHeader, - }, + beacon_block_header::BeaconBlockHeader, + execution_payload_header::UnboundedExecutionPayloadHeader, }, }; +#[cfg(feature = "ssz")] +use crate::{ + ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES}, + ibc::lightclients::ethereum::execution_payload_header::ExecutionPayloadHeader, +}; +#[cfg(feature = "ssz")] #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::LightClientHeader), into, from ))] -#[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[derive(::ssz::Ssz)] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct LightClientHeader { pub beacon: BeaconBlockHeader, pub execution: ExecutionPayloadHeader, pub execution_branch: [H256; floorlog2(EXECUTION_PAYLOAD_INDEX)], } -impl From> - for protos::union::ibc::lightclients::ethereum::v1::LightClientHeader -{ - fn from(value: LightClientHeader) -> Self { - Self { - beacon: Some(value.beacon.into()), - execution: Some(value.execution.into()), - execution_branch: Vec::from(value.execution_branch) - .into_iter() - .map(H256::into_bytes) - .collect(), - } - } -} - -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromLightClientHeaderError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid `beacon_block_header`")] - BeaconBlockHeader(#[from] TryFromBeaconBlockHeaderError), - #[error("invalid `execution_payload_header`")] - ExecutionPayloadHeader(#[from] TryFromExecutionPayloadHeaderError), - #[error("invalid `execution_branch`")] - ExecutionBranch(#[source] InvalidLength), - #[error("invalid `execution_branch_node`")] - ExecutionBranchNode(#[source] InvalidLength), -} - -impl - TryFrom - for LightClientHeader -{ - type Error = TryFromLightClientHeaderError; - - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::LightClientHeader, - ) -> Result { - Ok(Self { - beacon: value - .beacon - .ok_or(TryFromLightClientHeaderError::MissingField(MissingField( - "beacon", - )))? - .try_into() - .map_err(TryFromLightClientHeaderError::BeaconBlockHeader)?, - execution: value - .execution - .ok_or(TryFromLightClientHeaderError::MissingField(MissingField( - "execution", - )))? - .try_into() - .map_err(TryFromLightClientHeaderError::ExecutionPayloadHeader)?, - execution_branch: value - .execution_branch - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromLightClientHeaderError::ExecutionBranchNode)? - .try_into() - .map_err(|vec: Vec<_>| { - TryFromLightClientHeaderError::ExecutionBranch(InvalidLength { - expected: ExpectedLength::Exact(C::MAX_EXTRA_DATA_BYTES::USIZE), - found: vec.len(), - }) - })?, - }) - } -} - #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::LightClientHeader), from @@ -111,17 +38,103 @@ pub struct UnboundedLightClientHeader { pub execution_branch: [H256; floorlog2(EXECUTION_PAYLOAD_INDEX)], } -impl From - for protos::union::ibc::lightclients::ethereum::v1::LightClientHeader -{ - fn from(value: UnboundedLightClientHeader) -> Self { - Self { - beacon: Some(value.beacon.into()), - execution: Some(value.execution.into()), - execution_branch: Vec::from(value.execution_branch) - .into_iter() - .map(H256::into_bytes) - .collect(), +#[cfg(feature = "proto")] +pub mod proto { + #[cfg(feature = "ssz")] + use { + crate::{ + errors::{required, ExpectedLength, InvalidLength, MissingField}, + ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES}, + ibc::lightclients::ethereum::{ + beacon_block_header::proto::TryFromBeaconBlockHeaderError, + execution_payload_header::proto::TryFromExecutionPayloadHeaderError, + light_client_header::LightClientHeader, + }, + }, + typenum::Unsigned, + }; + + use crate::{ + hash::H256, ibc::lightclients::ethereum::light_client_header::UnboundedLightClientHeader, + }; + + #[cfg(feature = "ssz")] + impl From> + for protos::union::ibc::lightclients::ethereum::v1::LightClientHeader + { + fn from(value: LightClientHeader) -> Self { + Self { + beacon: Some(value.beacon.into()), + execution: Some(value.execution.into()), + execution_branch: Vec::from(value.execution_branch) + .into_iter() + .map(H256::into_bytes) + .collect(), + } + } + } + + #[cfg(feature = "ssz")] + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromLightClientHeaderError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid `beacon_block_header`")] + BeaconBlockHeader(#[from] TryFromBeaconBlockHeaderError), + #[error("invalid `execution_payload_header`")] + ExecutionPayloadHeader(#[from] TryFromExecutionPayloadHeaderError), + #[error("invalid `execution_branch`")] + ExecutionBranch(#[source] InvalidLength), + #[error("invalid `execution_branch_node`")] + ExecutionBranchNode(#[source] InvalidLength), + } + + #[cfg(feature = "ssz")] + impl + TryFrom + for LightClientHeader + { + type Error = TryFromLightClientHeaderError; + + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::LightClientHeader, + ) -> Result { + Ok(Self { + beacon: required!(value.beacon)? + .try_into() + .map_err(TryFromLightClientHeaderError::BeaconBlockHeader)?, + execution: required!(value.execution)? + .try_into() + .map_err(TryFromLightClientHeaderError::ExecutionPayloadHeader)?, + execution_branch: value + .execution_branch + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromLightClientHeaderError::ExecutionBranchNode)? + .try_into() + .map_err(|vec: Vec<_>| { + TryFromLightClientHeaderError::ExecutionBranch(InvalidLength { + expected: ExpectedLength::Exact(C::MAX_EXTRA_DATA_BYTES::USIZE), + found: vec.len(), + }) + })?, + }) + } + } + + impl From + for protos::union::ibc::lightclients::ethereum::v1::LightClientHeader + { + fn from(value: UnboundedLightClientHeader) -> Self { + Self { + beacon: Some(value.beacon.into()), + execution: Some(value.execution.into()), + execution_branch: Vec::from(value.execution_branch) + .into_iter() + .map(H256::into_bytes) + .collect(), + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/light_client_update.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/light_client_update.rs index 965eddfd27..9bb10a9efd 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/light_client_update.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/light_client_update.rs @@ -1,42 +1,41 @@ -use core::fmt::Debug; - use macros::model; use crate::{ - errors::{required, InvalidLength, MissingField}, - ethereum::config::{ - consts::{floorlog2, FINALIZED_ROOT_INDEX, NEXT_SYNC_COMMITTEE_INDEX}, - BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE, - }, + ethereum::config::consts::{floorlog2, FINALIZED_ROOT_INDEX, NEXT_SYNC_COMMITTEE_INDEX}, hash::H256, ibc::lightclients::ethereum::{ - light_client_header::{ - LightClientHeader, TryFromLightClientHeaderError, UnboundedLightClientHeader, - }, - sync_aggregate::{SyncAggregate, TryFromSyncAggregateError, UnboundedSyncAggregate}, - sync_committee::{SyncCommittee, TryFromSyncCommitteeError, UnboundedSyncCommittee}, + light_client_header::UnboundedLightClientHeader, sync_aggregate::UnboundedSyncAggregate, + sync_committee::UnboundedSyncCommittee, + }, +}; +#[cfg(feature = "ssz")] +use crate::{ + ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE}, + ibc::lightclients::ethereum::{ + light_client_header::LightClientHeader, sync_aggregate::SyncAggregate, + sync_committee::SyncCommittee, }, }; -/// TODO: Move these to a more central location pub type NextSyncCommitteeBranch = [H256; floorlog2(NEXT_SYNC_COMMITTEE_INDEX)]; pub type FinalityBranch = [H256; floorlog2(FINALIZED_ROOT_INDEX)]; +#[cfg(feature = "ssz")] #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::LightClientUpdate), into, from ))] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct LightClientUpdate { /// Header attested to by the sync committee pub attested_header: LightClientHeader, /// Next sync committee corresponding to `attested_header.state_root` // NOTE: These fields aren't actually optional, they are just because of the current structure of the ethereum Header. // TODO: Remove the Option and improve ethereum::header::Header to be an enum, instead of using optional fields and bools. - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub next_sync_committee: Option>, - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub next_sync_committee_branch: Option, /// Finalized header corresponding to `attested_header.state_root` pub finalized_header: LightClientHeader, @@ -44,118 +43,168 @@ pub struct LightClientUpdate, /// Slot at which the aggregate signature was created (untrusted) - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub signature_slot: u64, } -impl - From> - for protos::union::ibc::lightclients::ethereum::v1::LightClientUpdate -{ - fn from(value: LightClientUpdate) -> Self { - Self { - attested_header: Some(value.attested_header.into()), - next_sync_committee: value.next_sync_committee.map(Into::into), - next_sync_committee_branch: value - .next_sync_committee_branch - .unwrap_or_default() - .iter() - .copied() - .map(H256::into_bytes) - .collect(), - finalized_header: Some(value.finalized_header.into()), - finality_branch: value - .finality_branch - .iter() - .copied() - .map(H256::into_bytes) - .collect(), - sync_aggregate: Some(value.sync_aggregate.into()), - signature_slot: value.signature_slot, +#[cfg(feature = "proto")] +pub mod proto { + #[cfg(feature = "ssz")] + use crate::{ + errors::{required, InvalidLength, MissingField}, + ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE}, + ibc::lightclients::ethereum::{ + light_client_header::proto::TryFromLightClientHeaderError, + light_client_update::{FinalityBranch, LightClientUpdate, NextSyncCommitteeBranch}, + sync_aggregate::proto::TryFromSyncAggregateError, + sync_committee::proto::TryFromSyncCommitteeError, + }, + }; + use crate::{ + hash::H256, ibc::lightclients::ethereum::light_client_update::UnboundedLightClientUpdate, + }; + + #[cfg(feature = "ssz")] + impl + From> + for protos::union::ibc::lightclients::ethereum::v1::LightClientUpdate + { + fn from(value: LightClientUpdate) -> Self { + Self { + attested_header: Some(value.attested_header.into()), + next_sync_committee: value.next_sync_committee.map(Into::into), + next_sync_committee_branch: value + .next_sync_committee_branch + .unwrap_or_default() + .iter() + .copied() + .map(H256::into_bytes) + .collect(), + finalized_header: Some(value.finalized_header.into()), + finality_branch: value + .finality_branch + .iter() + .copied() + .map(H256::into_bytes) + .collect(), + sync_aggregate: Some(value.sync_aggregate.into()), + signature_slot: value.signature_slot, + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromLightClientUpdateError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid `attested_header`")] - AttestedHeader(#[source] TryFromLightClientHeaderError), - #[error("invalid `next_sync_committee`")] - NextSyncCommittee(#[from] TryFromSyncCommitteeError), - #[error("invalid `next_sync_committee_branch`")] - NextSyncCommitteeBranch(#[from] TryFromBranchError), - #[error("invalid `finality_branch`")] - FinalityBranch(#[from] TryFromBranchError), - #[error("invalid `sync_aggregate`")] - SyncAggregate(#[from] TryFromSyncAggregateError), - #[error("invalid `finalized_header`")] - FinalizedHeader(#[source] TryFromLightClientHeaderError), -} + #[cfg(feature = "ssz")] + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromLightClientUpdateError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid `attested_header`")] + AttestedHeader(#[source] TryFromLightClientHeaderError), + #[error("invalid `next_sync_committee`")] + NextSyncCommittee(#[from] TryFromSyncCommitteeError), + #[error("invalid `next_sync_committee_branch`")] + NextSyncCommitteeBranch(#[from] TryFromBranchError), + #[error("invalid `finality_branch`")] + FinalityBranch(#[from] TryFromBranchError), + #[error("invalid `sync_aggregate`")] + SyncAggregate(#[from] TryFromSyncAggregateError), + #[error("invalid `finalized_header`")] + FinalizedHeader(#[source] TryFromLightClientHeaderError), + } -impl - TryFrom - for LightClientUpdate -{ - type Error = TryFromLightClientUpdateError; + #[cfg(feature = "ssz")] + impl + TryFrom + for LightClientUpdate + { + type Error = TryFromLightClientUpdateError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::LightClientUpdate, - ) -> Result { - Ok(Self { - attested_header: required!(value.attested_header)? - .try_into() - .map_err(TryFromLightClientUpdateError::AttestedHeader)?, - next_sync_committee: value - .next_sync_committee - .map(TryInto::try_into) - .transpose() - .map_err(TryFromLightClientUpdateError::NextSyncCommittee)?, - next_sync_committee_branch: if value.next_sync_committee_branch.is_empty() { - None - } else { - Some( - try_from_proto_branch(value.next_sync_committee_branch) - .map_err(TryFromLightClientUpdateError::NextSyncCommitteeBranch)?, - ) - }, - finalized_header: required!(value.finalized_header)? - .try_into() - .map_err(TryFromLightClientUpdateError::FinalizedHeader)?, - finality_branch: try_from_proto_branch(value.finality_branch) - .map_err(TryFromLightClientUpdateError::FinalityBranch)?, - sync_aggregate: required!(value.sync_aggregate)? - .try_into() - .map_err(TryFromLightClientUpdateError::SyncAggregate)?, - signature_slot: value.signature_slot, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::LightClientUpdate, + ) -> Result { + Ok(Self { + attested_header: required!(value.attested_header)? + .try_into() + .map_err(TryFromLightClientUpdateError::AttestedHeader)?, + next_sync_committee: value + .next_sync_committee + .map(TryInto::try_into) + .transpose() + .map_err(TryFromLightClientUpdateError::NextSyncCommittee)?, + next_sync_committee_branch: if value.next_sync_committee_branch.is_empty() { + None + } else { + Some( + try_from_proto_branch(value.next_sync_committee_branch) + .map_err(TryFromLightClientUpdateError::NextSyncCommitteeBranch)?, + ) + }, + finalized_header: required!(value.finalized_header)? + .try_into() + .map_err(TryFromLightClientUpdateError::FinalizedHeader)?, + finality_branch: try_from_proto_branch(value.finality_branch) + .map_err(TryFromLightClientUpdateError::FinalityBranch)?, + sync_aggregate: required!(value.sync_aggregate)? + .try_into() + .map_err(TryFromLightClientUpdateError::SyncAggregate)?, + signature_slot: value.signature_slot, + }) + } } -} -fn try_from_proto_branch(proto: Vec>) -> Result> -where - T: TryFrom, Error: Debug + PartialEq + Eq + Clone>, -{ - proto - .into_iter() - .map(H256::try_from) - .collect::, _>>() - .map_err(TryFromBranchError::BranchNode)? - .try_into() - .map_err(TryFromBranchError::Branch) -} + #[cfg(feature = "ssz")] + fn try_from_proto_branch(proto: Vec>) -> Result> + where + T: TryFrom, Error: core::fmt::Debug + PartialEq + Eq + Clone>, + { + proto + .into_iter() + .map(H256::try_from) + .collect::, _>>() + .map_err(TryFromBranchError::BranchNode)? + .try_into() + .map_err(TryFromBranchError::Branch) + } + + // TODO: Remove the bounds on T::Error and only require said bounds when implementing the respective traits, will clean up try_from_proto_branch as well + #[cfg(feature = "ssz")] + #[derive(Debug, PartialEq, Eq, Clone, thiserror::Error)] + pub enum TryFromBranchError + where + T: TryFrom, Error: core::fmt::Debug + PartialEq + Eq + Clone>, + { + #[error("error decoding branch: {0:?}")] + Branch(>>::Error), + #[error("error decoding branch node")] + BranchNode(#[source] InvalidLength), + } -// TODO: Remove the bounds on T::Error and only require said bounds when implementing the respective traits, will clean up try_from_proto_branch as well -#[derive(Debug, PartialEq, Eq, Clone, thiserror::Error)] -pub enum TryFromBranchError -where - T: TryFrom, Error: Debug + PartialEq + Eq + Clone>, -{ - #[error("error decoding branch: {0:?}")] - Branch(>>::Error), - #[error("error decoding branch node")] - BranchNode(#[source] InvalidLength), + impl From + for protos::union::ibc::lightclients::ethereum::v1::LightClientUpdate + { + fn from(value: UnboundedLightClientUpdate) -> Self { + Self { + attested_header: Some(value.attested_header.into()), + next_sync_committee: value.next_sync_committee.map(Into::into), + next_sync_committee_branch: value + .next_sync_committee_branch + .unwrap_or_default() + .iter() + .copied() + .map(H256::into_bytes) + .collect(), + finalized_header: Some(value.finalized_header.into()), + finality_branch: value + .finality_branch + .iter() + .copied() + .map(H256::into_bytes) + .collect(), + sync_aggregate: Some(value.sync_aggregate.into()), + signature_slot: value.signature_slot, + } + } + } } #[model(proto( @@ -168,9 +217,9 @@ pub struct UnboundedLightClientUpdate { /// Next sync committee corresponding to `attested_header.state_root` // NOTE: These fields aren't actually optional, they are just because of the current structure of the ethereum Header. // TODO: Remove the Option and improve ethereum::header::Header to be an enum, instead of using optional fields and bools. - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub next_sync_committee: Option, - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub next_sync_committee_branch: Option, /// Finalized header corresponding to `attested_header.state_root` pub finalized_header: UnboundedLightClientHeader, @@ -178,33 +227,6 @@ pub struct UnboundedLightClientUpdate { /// Sync committee aggregate signature pub sync_aggregate: UnboundedSyncAggregate, /// Slot at which the aggregate signature was created (untrusted) - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub signature_slot: u64, } - -impl From - for protos::union::ibc::lightclients::ethereum::v1::LightClientUpdate -{ - fn from(value: UnboundedLightClientUpdate) -> Self { - Self { - attested_header: Some(value.attested_header.into()), - next_sync_committee: value.next_sync_committee.map(Into::into), - next_sync_committee_branch: value - .next_sync_committee_branch - .unwrap_or_default() - .iter() - .copied() - .map(H256::into_bytes) - .collect(), - finalized_header: Some(value.finalized_header.into()), - finality_branch: value - .finality_branch - .iter() - .copied() - .map(H256::into_bytes) - .collect(), - sync_aggregate: Some(value.sync_aggregate.into()), - signature_slot: value.signature_slot, - } - } -} diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/misbehaviour.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/misbehaviour.rs index cb1b58840f..8b9b4721da 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/misbehaviour.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/misbehaviour.rs @@ -1,65 +1,74 @@ use macros::model; use crate::{ - errors::{required, MissingField}, ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE}, ibc::lightclients::ethereum::{ - light_client_update::{LightClientUpdate, TryFromLightClientUpdateError}, - trusted_sync_committee::{TrustedSyncCommittee, TryFromTrustedSyncCommitteeError}, + light_client_update::LightClientUpdate, trusted_sync_committee::TrustedSyncCommittee, }, }; -// trait alias would be nice #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::Misbehaviour), into, from ))] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct Misbehaviour { pub trusted_sync_committee: TrustedSyncCommittee, pub update_1: LightClientUpdate, pub update_2: LightClientUpdate, } -impl From> - for protos::union::ibc::lightclients::ethereum::v1::Misbehaviour -{ - fn from(value: Misbehaviour) -> Self { - Self { - trusted_sync_committee: Some(value.trusted_sync_committee.into()), - update_1: Some(value.update_1.into()), - update_2: Some(value.update_2.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + ethereum::config::{BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, SYNC_COMMITTEE_SIZE}, + ibc::lightclients::ethereum::{ + light_client_update::proto::TryFromLightClientUpdateError, misbehaviour::Misbehaviour, + trusted_sync_committee::proto::TryFromTrustedSyncCommitteeError, + }, + }; + + impl From> + for protos::union::ibc::lightclients::ethereum::v1::Misbehaviour + { + fn from(value: Misbehaviour) -> Self { + Self { + trusted_sync_committee: Some(value.trusted_sync_committee.into()), + update_1: Some(value.update_1.into()), + update_2: Some(value.update_2.into()), + } } } -} -#[derive(Debug, PartialEq, Clone)] -pub enum TryFromMisbehaviourError { - MissingField(MissingField), - TrustedSyncCommittee(TryFromTrustedSyncCommitteeError), - Update1(TryFromLightClientUpdateError), - Update2(TryFromLightClientUpdateError), -} + #[derive(Debug, PartialEq, Clone)] + pub enum TryFromMisbehaviourError { + MissingField(MissingField), + TrustedSyncCommittee(TryFromTrustedSyncCommitteeError), + Update1(TryFromLightClientUpdateError), + Update2(TryFromLightClientUpdateError), + } -impl - TryFrom for Misbehaviour -{ - type Error = TryFromMisbehaviourError; + impl + TryFrom for Misbehaviour + { + type Error = TryFromMisbehaviourError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::Misbehaviour, - ) -> Result { - Ok(Self { - trusted_sync_committee: required!(value.trusted_sync_committee)? - .try_into() - .map_err(TryFromMisbehaviourError::TrustedSyncCommittee)?, - update_1: required!(value.update_1)? - .try_into() - .map_err(TryFromMisbehaviourError::Update1)?, - update_2: required!(value.update_2)? - .try_into() - .map_err(TryFromMisbehaviourError::Update2)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::Misbehaviour, + ) -> Result { + Ok(Self { + trusted_sync_committee: required!(value.trusted_sync_committee)? + .try_into() + .map_err(TryFromMisbehaviourError::TrustedSyncCommittee)?, + update_1: required!(value.update_1)? + .try_into() + .map_err(TryFromMisbehaviourError::Update1)?, + update_2: required!(value.update_2)? + .try_into() + .map_err(TryFromMisbehaviourError::Update2)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/storage_proof.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/storage_proof.rs index e86ac5602d..73d6669b5f 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/storage_proof.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/storage_proof.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::{errors::InvalidLength, uint::U256}; +use crate::uint::U256; #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::StorageProof), @@ -8,44 +8,51 @@ use crate::{errors::InvalidLength, uint::U256}; from ))] pub struct StorageProof { - #[serde(with = "crate::uint::u256_big_endian_hex")] + #[cfg_attr(feature = "serde", serde(with = "crate::uint::u256_big_endian_hex"))] pub key: U256, - #[serde(with = "crate::uint::u256_big_endian_hex")] + #[cfg_attr(feature = "serde", serde(with = "crate::uint::u256_big_endian_hex"))] pub value: U256, - #[serde(with = "::serde_utils::hex_string_list")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string_list"))] #[debug(wrap = ::serde_utils::fmt::DebugListAsHex)] pub proof: Vec>, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromStorageProofError { - #[error("unable to decode key")] - Key(#[source] InvalidLength), - #[error("unable to decode value")] - Value(#[source] InvalidLength), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::InvalidLength, ibc::lightclients::ethereum::storage_proof::StorageProof, uint::U256, + }; + + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromStorageProofError { + #[error("unable to decode key")] + Key(#[source] InvalidLength), + #[error("unable to decode value")] + Value(#[source] InvalidLength), + } -impl TryFrom for StorageProof { - type Error = TryFromStorageProofError; + impl TryFrom for StorageProof { + type Error = TryFromStorageProofError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::StorageProof, - ) -> Result { - Ok(Self { - key: U256::try_from_be_bytes(&value.key).map_err(TryFromStorageProofError::Key)?, - value: U256::try_from_be_bytes(&value.value) - .map_err(TryFromStorageProofError::Value)?, - proof: value.proof, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::StorageProof, + ) -> Result { + Ok(Self { + key: U256::try_from_be_bytes(&value.key).map_err(TryFromStorageProofError::Key)?, + value: U256::try_from_be_bytes(&value.value) + .map_err(TryFromStorageProofError::Value)?, + proof: value.proof, + }) + } } -} -impl From for protos::union::ibc::lightclients::ethereum::v1::StorageProof { - fn from(value: StorageProof) -> Self { - Self { - key: value.key.to_be_bytes().into(), - value: value.value.to_be_bytes().into(), - proof: value.proof, + impl From for protos::union::ibc::lightclients::ethereum::v1::StorageProof { + fn from(value: StorageProof) -> Self { + Self { + key: value.key.to_be_bytes().into(), + value: value.value.to_be_bytes().into(), + proof: value.proof, + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/sync_aggregate.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/sync_aggregate.rs index dc7d788787..2934d6a2df 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/sync_aggregate.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/sync_aggregate.rs @@ -1,58 +1,92 @@ use macros::model; -use ssz::{types::BitVector, Ssz}; +#[cfg(feature = "ssz")] +use { + crate::ethereum::config::SYNC_COMMITTEE_SIZE, + ssz::{types::BitVector, Ssz}, +}; -use crate::{bls::BlsSignature, errors::InvalidLength, ethereum::config::SYNC_COMMITTEE_SIZE}; +use crate::hash::H768; +#[cfg(feature = "ssz")] #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::SyncAggregate), into, from ))] #[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct SyncAggregate { // TODO: Change debug print for this type in ssz::types #[debug("BitVector({})", sync_committee_bits.iter().map(|b| if b { '1' } else { '0' }).collect::())] pub sync_committee_bits: BitVector, - pub sync_committee_signature: BlsSignature, + pub sync_committee_signature: H768, } -impl From> - for protos::union::ibc::lightclients::ethereum::v1::SyncAggregate -{ - fn from(value: SyncAggregate) -> Self { - Self { - sync_committee_bits: value.sync_committee_bits.into_bytes().into_vec(), - sync_committee_signature: value.sync_committee_signature.into_bytes().into(), +#[cfg(feature = "proto")] +pub mod proto { + #[cfg(feature = "ssz")] + use { + crate::{ + errors::InvalidLength, ethereum::config::SYNC_COMMITTEE_SIZE, + ibc::lightclients::ethereum::sync_aggregate::SyncAggregate, + }, + ssz::types::BitVector, + }; + + use crate::ibc::lightclients::ethereum::sync_aggregate::UnboundedSyncAggregate; + + #[cfg(feature = "ssz")] + impl From> + for protos::union::ibc::lightclients::ethereum::v1::SyncAggregate + { + fn from(value: SyncAggregate) -> Self { + Self { + sync_committee_bits: value.sync_committee_bits.into_bytes().into_vec(), + sync_committee_signature: value.sync_committee_signature.into_bytes(), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromSyncAggregateError { - #[error("invalid `sync_committee_bits`")] - SyncCommitteeBits(#[from] ssz::types::bitfield::BitlistFromBytesError), - #[error("invalid `sync_committee_signature`")] - SyncCommitteeSignature(#[from] InvalidLength), -} + #[cfg(feature = "ssz")] + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromSyncAggregateError { + #[error("invalid `sync_committee_bits`")] + SyncCommitteeBits(#[from] ssz::types::bitfield::BitlistFromBytesError), + #[error("invalid `sync_committee_signature`")] + SyncCommitteeSignature(#[from] InvalidLength), + } -impl TryFrom - for SyncAggregate -{ - type Error = TryFromSyncAggregateError; + #[cfg(feature = "ssz")] + impl + TryFrom + for SyncAggregate + { + type Error = TryFromSyncAggregateError; - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::SyncAggregate, - ) -> Result { - Ok(Self { - // REVIEW: This might not be the correct conversion - sync_committee_bits: BitVector::from_bytes(value.sync_committee_bits.into()) - .map_err(TryFromSyncAggregateError::SyncCommitteeBits)?, - sync_committee_signature: value - .sync_committee_signature - .try_into() - .map_err(TryFromSyncAggregateError::SyncCommitteeSignature)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::SyncAggregate, + ) -> Result { + Ok(Self { + // REVIEW: This might not be the correct conversion + sync_committee_bits: BitVector::from_bytes(value.sync_committee_bits.into()) + .map_err(TryFromSyncAggregateError::SyncCommitteeBits)?, + sync_committee_signature: value + .sync_committee_signature + .try_into() + .map_err(TryFromSyncAggregateError::SyncCommitteeSignature)?, + }) + } + } + + impl From + for protos::union::ibc::lightclients::ethereum::v1::SyncAggregate + { + fn from(value: UnboundedSyncAggregate) -> Self { + Self { + sync_committee_bits: value.sync_committee_bits, + sync_committee_signature: value.sync_committee_signature.into_bytes(), + } + } } } @@ -61,18 +95,7 @@ impl TryFrom, - pub sync_committee_signature: BlsSignature, -} - -impl From - for protos::union::ibc::lightclients::ethereum::v1::SyncAggregate -{ - fn from(value: UnboundedSyncAggregate) -> Self { - Self { - sync_committee_bits: value.sync_committee_bits, - sync_committee_signature: value.sync_committee_signature.into_bytes().into(), - } - } + pub sync_committee_signature: H768, } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/sync_committee.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/sync_committee.rs index e218d90ef3..9f8f929c47 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/sync_committee.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/sync_committee.rs @@ -1,75 +1,20 @@ use macros::model; -use ssz::{types::Vector, Ssz}; -use typenum::Unsigned; +#[cfg(feature = "ssz")] +use {crate::ethereum::config::SYNC_COMMITTEE_SIZE, ssz::types::Vector}; -use crate::{bls::BlsPublicKey, errors::InvalidLength, ethereum::config::SYNC_COMMITTEE_SIZE}; +use crate::hash::H384; +#[cfg(feature = "ssz")] #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::SyncCommittee), into, from ))] -#[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[derive(::ssz::Ssz)] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct SyncCommittee { - #[serde(with = "::serde_utils::hex_string_list")] - pub pubkeys: Vector, - #[serde(with = "::serde_utils::hex_string")] - pub aggregate_pubkey: BlsPublicKey, -} - -impl From> - for protos::union::ibc::lightclients::ethereum::v1::SyncCommittee -{ - fn from(value: SyncCommittee) -> Self { - Self { - pubkeys: value.pubkeys.iter().copied().map(Into::into).collect(), - aggregate_pubkey: value.aggregate_pubkey.into(), - } - } -} - -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromSyncCommitteeError { - #[error("invalid `pubkeys`")] - PubKey(#[source] InvalidLength), - #[error("invalid amount of `pubkeys`")] - PubKeys(#[source] InvalidLength), - #[error("invalid `aggregate_pubkey`")] - AggregatePubKey(#[source] InvalidLength), -} - -impl TryFrom - for SyncCommittee -{ - type Error = TryFromSyncCommitteeError; - - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::SyncCommittee, - ) -> Result { - Ok(Self { - pubkeys: value - .pubkeys - .iter() - .cloned() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromSyncCommitteeError::PubKey)? - .try_into() - .map_err(|vec: Vec<_>| { - TryFromSyncCommitteeError::PubKeys(InvalidLength { - expected: crate::errors::ExpectedLength::Exact( - C::SYNC_COMMITTEE_SIZE::USIZE, - ), - found: vec.len(), - }) - })?, - aggregate_pubkey: value - .aggregate_pubkey - .try_into() - .map_err(TryFromSyncCommitteeError::AggregatePubKey)?, - }) - } + pub pubkeys: Vector, + pub aggregate_pubkey: H384, } #[model(proto( @@ -77,19 +22,89 @@ impl TryFrom, - #[serde(with = "::serde_utils::hex_string")] - pub aggregate_pubkey: BlsPublicKey, + pub pubkeys: Vec, + pub aggregate_pubkey: H384, } -impl From - for protos::union::ibc::lightclients::ethereum::v1::SyncCommittee -{ - fn from(value: UnboundedSyncCommittee) -> Self { - Self { - pubkeys: value.pubkeys.iter().copied().map(Into::into).collect(), - aggregate_pubkey: value.aggregate_pubkey.into(), +#[cfg(feature = "proto")] +pub mod proto { + #[cfg(feature = "ssz")] + use { + crate::{ + errors::InvalidLength, ethereum::config::SYNC_COMMITTEE_SIZE, + ibc::lightclients::ethereum::sync_committee::SyncCommittee, + }, + typenum::Unsigned, + }; + + use crate::ibc::lightclients::ethereum::sync_committee::UnboundedSyncCommittee; + + #[cfg(feature = "ssz")] + impl From> + for protos::union::ibc::lightclients::ethereum::v1::SyncCommittee + { + fn from(value: SyncCommittee) -> Self { + Self { + pubkeys: value.pubkeys.iter().copied().map(Into::into).collect(), + aggregate_pubkey: value.aggregate_pubkey.into(), + } + } + } + + #[cfg(feature = "ssz")] + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromSyncCommitteeError { + #[error("invalid `pubkeys`")] + PubKey(#[source] InvalidLength), + #[error("invalid amount of `pubkeys`")] + PubKeys(#[source] InvalidLength), + #[error("invalid `aggregate_pubkey`")] + AggregatePubKey(#[source] InvalidLength), + } + + #[cfg(feature = "ssz")] + impl + TryFrom + for SyncCommittee + { + type Error = TryFromSyncCommitteeError; + + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::SyncCommittee, + ) -> Result { + Ok(Self { + pubkeys: value + .pubkeys + .iter() + .cloned() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromSyncCommitteeError::PubKey)? + .try_into() + .map_err(|vec: Vec<_>| { + TryFromSyncCommitteeError::PubKeys(InvalidLength { + expected: crate::errors::ExpectedLength::Exact( + C::SYNC_COMMITTEE_SIZE::USIZE, + ), + found: vec.len(), + }) + })?, + aggregate_pubkey: value + .aggregate_pubkey + .try_into() + .map_err(TryFromSyncCommitteeError::AggregatePubKey)?, + }) + } + } + + impl From + for protos::union::ibc::lightclients::ethereum::v1::SyncCommittee + { + fn from(value: UnboundedSyncCommittee) -> Self { + Self { + pubkeys: value.pubkeys.iter().copied().map(Into::into).collect(), + aggregate_pubkey: value.aggregate_pubkey.into(), + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/ethereum/trusted_sync_committee.rs b/lib/unionlabs/src/ibc/lightclients/ethereum/trusted_sync_committee.rs index 123556d873..2310648ae2 100644 --- a/lib/unionlabs/src/ibc/lightclients/ethereum/trusted_sync_committee.rs +++ b/lib/unionlabs/src/ibc/lightclients/ethereum/trusted_sync_committee.rs @@ -1,30 +1,29 @@ use macros::model; -use ssz::Ssz; +use crate::ibc::{ + core::client::height::Height, lightclients::ethereum::sync_committee::UnboundedSyncCommittee, +}; +#[cfg(feature = "ssz")] use crate::{ - errors::{required, MissingField}, ethereum::config::SYNC_COMMITTEE_SIZE, - ibc::{ - core::client::height::Height, - lightclients::ethereum::sync_committee::{ - SyncCommittee, TryFromSyncCommitteeError, UnboundedSyncCommittee, - }, - }, + ibc::lightclients::ethereum::sync_committee::SyncCommittee, }; /// Sync committee that is going to be used to verify the update /// /// Note that the verifier uses one of them based on whether the signature slot /// is equal to the current slot or current slot + 1 +#[cfg(feature = "ssz")] #[model] -#[derive(Ssz)] +#[derive(::ssz::Ssz)] #[ssz(union)] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub enum ActiveSyncCommittee { Current(SyncCommittee), Next(SyncCommittee), } +#[cfg(feature = "ssz")] impl ActiveSyncCommittee { #[must_use] pub fn get(&self) -> &SyncCommittee { @@ -45,77 +44,18 @@ impl ActiveSyncCommittee { } } +#[cfg(feature = "ssz")] #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::TrustedSyncCommittee), into, from ))] -#[derive(Ssz)] -#[serde(bound(serialize = "", deserialize = ""))] +#[cfg_attr(feature = "serde", serde(bound(serialize = "", deserialize = "")))] pub struct TrustedSyncCommittee { pub trusted_height: Height, pub sync_committee: ActiveSyncCommittee, } -impl From> - for protos::union::ibc::lightclients::ethereum::v1::TrustedSyncCommittee -{ - fn from(value: TrustedSyncCommittee) -> Self { - match value.sync_committee { - ActiveSyncCommittee::Current(committee) => Self { - trusted_height: Some(value.trusted_height.into()), - current_sync_committee: Some(committee.into()), - next_sync_committee: None, - }, - ActiveSyncCommittee::Next(committee) => Self { - trusted_height: Some(value.trusted_height.into()), - current_sync_committee: None, - next_sync_committee: Some(committee.into()), - }, - } - } -} - -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromTrustedSyncCommitteeError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid sync committee")] - SyncCommittee(TryFromSyncCommitteeError), -} - -impl - TryFrom - for TrustedSyncCommittee -{ - type Error = TryFromTrustedSyncCommitteeError; - - fn try_from( - value: protos::union::ibc::lightclients::ethereum::v1::TrustedSyncCommittee, - ) -> Result { - Ok(Self { - trusted_height: required!(value.trusted_height)?.into(), - sync_committee: match (value.current_sync_committee, value.next_sync_committee) { - (None, None) => { - return Err(TryFromTrustedSyncCommitteeError::MissingField( - MissingField("no current nor next sync committee"), - )) - } - (None, Some(next_committee)) => ActiveSyncCommittee::Next( - next_committee - .try_into() - .map_err(TryFromTrustedSyncCommitteeError::SyncCommittee)?, - ), - (Some(current_committee), _) => ActiveSyncCommittee::Current( - current_committee - .try_into() - .map_err(TryFromTrustedSyncCommitteeError::SyncCommittee)?, - ), - }, - }) - } -} - #[model(proto( raw(protos::union::ibc::lightclients::ethereum::v1::TrustedSyncCommittee), from @@ -131,21 +71,99 @@ pub enum UnboundedActiveSyncCommittee { Next(UnboundedSyncCommittee), } -impl From - for protos::union::ibc::lightclients::ethereum::v1::TrustedSyncCommittee -{ - fn from(value: UnboundedTrustedSyncCommittee) -> Self { - match value.sync_committee { - UnboundedActiveSyncCommittee::Current(committee) => Self { - trusted_height: Some(value.trusted_height.into()), - current_sync_committee: Some(committee.into()), - next_sync_committee: None, - }, - UnboundedActiveSyncCommittee::Next(committee) => Self { - trusted_height: Some(value.trusted_height.into()), - current_sync_committee: None, - next_sync_committee: Some(committee.into()), - }, +#[cfg(feature = "proto")] +pub mod proto { + use crate::ibc::lightclients::ethereum::trusted_sync_committee::{ + UnboundedActiveSyncCommittee, UnboundedTrustedSyncCommittee, + }; + #[cfg(feature = "ssz")] + use crate::{ + errors::{required, MissingField}, + ethereum::config::SYNC_COMMITTEE_SIZE, + ibc::lightclients::ethereum::{ + sync_committee::proto::TryFromSyncCommitteeError, + trusted_sync_committee::{ActiveSyncCommittee, TrustedSyncCommittee}, + }, + }; + + #[cfg(feature = "ssz")] + impl From> + for protos::union::ibc::lightclients::ethereum::v1::TrustedSyncCommittee + { + fn from(value: TrustedSyncCommittee) -> Self { + match value.sync_committee { + ActiveSyncCommittee::Current(committee) => Self { + trusted_height: Some(value.trusted_height.into()), + current_sync_committee: Some(committee.into()), + next_sync_committee: None, + }, + ActiveSyncCommittee::Next(committee) => Self { + trusted_height: Some(value.trusted_height.into()), + current_sync_committee: None, + next_sync_committee: Some(committee.into()), + }, + } + } + } + + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + #[cfg(feature = "ssz")] + pub enum TryFromTrustedSyncCommitteeError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid sync committee")] + SyncCommittee(TryFromSyncCommitteeError), + } + + #[cfg(feature = "ssz")] + impl + TryFrom + for TrustedSyncCommittee + { + type Error = TryFromTrustedSyncCommitteeError; + + fn try_from( + value: protos::union::ibc::lightclients::ethereum::v1::TrustedSyncCommittee, + ) -> Result { + Ok(Self { + trusted_height: required!(value.trusted_height)?.into(), + sync_committee: match (value.current_sync_committee, value.next_sync_committee) { + (None, None) => { + return Err(TryFromTrustedSyncCommitteeError::MissingField( + MissingField("no current nor next sync committee"), + )) + } + (None, Some(next_committee)) => ActiveSyncCommittee::Next( + next_committee + .try_into() + .map_err(TryFromTrustedSyncCommitteeError::SyncCommittee)?, + ), + (Some(current_committee), _) => ActiveSyncCommittee::Current( + current_committee + .try_into() + .map_err(TryFromTrustedSyncCommitteeError::SyncCommittee)?, + ), + }, + }) + } + } + + impl From + for protos::union::ibc::lightclients::ethereum::v1::TrustedSyncCommittee + { + fn from(value: UnboundedTrustedSyncCommittee) -> Self { + match value.sync_committee { + UnboundedActiveSyncCommittee::Current(committee) => Self { + trusted_height: Some(value.trusted_height.into()), + current_sync_committee: Some(committee.into()), + next_sync_committee: None, + }, + UnboundedActiveSyncCommittee::Next(committee) => Self { + trusted_height: Some(value.trusted_height.into()), + current_sync_committee: None, + next_sync_committee: Some(committee.into()), + }, + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/client_state.rs b/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/client_state.rs index 5bf0837cba..4a013deb21 100644 --- a/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/client_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/client_state.rs @@ -1,8 +1,6 @@ -use core::fmt::Debug; - use macros::model; -use crate::{errors::InvalidLength, hash::H160, uint::U256}; +use crate::{hash::H160, uint::U256}; #[model(proto( raw(protos::union::ibc::lightclients::evmincosmos::v1::ClientState), @@ -18,42 +16,50 @@ pub struct ClientState { pub ibc_commitment_slot: U256, } -impl From for protos::union::ibc::lightclients::evmincosmos::v1::ClientState { - fn from(value: ClientState) -> Self { - Self { - l1_client_id: value.l1_client_id, - l2_client_id: value.l2_client_id, - latest_slot: value.latest_slot, - ibc_contract_address: value.ibc_contract_address.into(), - ibc_commitment_slot: value.ibc_commitment_slot.to_be_bytes().into(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::InvalidLength, ibc::lightclients::evm_in_cosmos::client_state::ClientState, + uint::U256, + }; + + impl From for protos::union::ibc::lightclients::evmincosmos::v1::ClientState { + fn from(value: ClientState) -> Self { + Self { + l1_client_id: value.l1_client_id, + l2_client_id: value.l2_client_id, + latest_slot: value.latest_slot, + ibc_contract_address: value.ibc_contract_address.into(), + ibc_commitment_slot: value.ibc_commitment_slot.to_be_bytes().into(), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromClientStateError { - #[error("invalid ibc contract address")] - IbcContractAddress(#[source] InvalidLength), - #[error("invalid ibc commitment slot")] - IbcCommitmentSlot(#[source] InvalidLength), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromClientStateError { + #[error("invalid ibc contract address")] + IbcContractAddress(#[source] InvalidLength), + #[error("invalid ibc commitment slot")] + IbcCommitmentSlot(#[source] InvalidLength), + } -impl TryFrom for ClientState { - type Error = TryFromClientStateError; + impl TryFrom for ClientState { + type Error = TryFromClientStateError; - fn try_from( - value: protos::union::ibc::lightclients::evmincosmos::v1::ClientState, - ) -> Result { - Ok(Self { - l1_client_id: value.l1_client_id, - l2_client_id: value.l2_client_id, - latest_slot: value.latest_slot, - ibc_contract_address: value - .ibc_contract_address - .try_into() - .map_err(TryFromClientStateError::IbcContractAddress)?, - ibc_commitment_slot: U256::try_from_be_bytes(&value.ibc_commitment_slot) - .map_err(TryFromClientStateError::IbcCommitmentSlot)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::evmincosmos::v1::ClientState, + ) -> Result { + Ok(Self { + l1_client_id: value.l1_client_id, + l2_client_id: value.l2_client_id, + latest_slot: value.latest_slot, + ibc_contract_address: value + .ibc_contract_address + .try_into() + .map_err(TryFromClientStateError::IbcContractAddress)?, + ibc_commitment_slot: U256::try_from_be_bytes(&value.ibc_commitment_slot) + .map_err(TryFromClientStateError::IbcCommitmentSlot)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/consensus_state.rs b/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/consensus_state.rs index db6bf39a93..d12d962e43 100644 --- a/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/consensus_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/consensus_state.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::{errors::InvalidLength, hash::H256}; +use crate::hash::H256; #[model(proto( raw(protos::union::ibc::lightclients::evmincosmos::v1::ConsensusState), @@ -13,39 +13,46 @@ pub struct ConsensusState { pub timestamp: u64, } -impl From for protos::union::ibc::lightclients::evmincosmos::v1::ConsensusState { - fn from(value: ConsensusState) -> Self { - Self { - evm_state_root: value.evm_state_root.into(), - ibc_storage_root: value.ibc_storage_root.into(), - timestamp: value.timestamp, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::InvalidLength, ibc::lightclients::evm_in_cosmos::consensus_state::ConsensusState, + }; + + impl From for protos::union::ibc::lightclients::evmincosmos::v1::ConsensusState { + fn from(value: ConsensusState) -> Self { + Self { + evm_state_root: value.evm_state_root.into(), + ibc_storage_root: value.ibc_storage_root.into(), + timestamp: value.timestamp, + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromConsensusStateError { - #[error("invalid evm state root")] - EvmStateRoot(#[source] InvalidLength), - #[error("invalid ibc storage root")] - IbcStorageRoot(#[source] InvalidLength), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromConsensusStateError { + #[error("invalid evm state root")] + EvmStateRoot(#[source] InvalidLength), + #[error("invalid ibc storage root")] + IbcStorageRoot(#[source] InvalidLength), + } -impl TryFrom for ConsensusState { - type Error = TryFromConsensusStateError; - fn try_from( - value: protos::union::ibc::lightclients::evmincosmos::v1::ConsensusState, - ) -> Result { - Ok(Self { - evm_state_root: value - .evm_state_root - .try_into() - .map_err(TryFromConsensusStateError::EvmStateRoot)?, - ibc_storage_root: value - .ibc_storage_root - .try_into() - .map_err(TryFromConsensusStateError::IbcStorageRoot)?, - timestamp: value.timestamp, - }) + impl TryFrom for ConsensusState { + type Error = TryFromConsensusStateError; + fn try_from( + value: protos::union::ibc::lightclients::evmincosmos::v1::ConsensusState, + ) -> Result { + Ok(Self { + evm_state_root: value + .evm_state_root + .try_into() + .map_err(TryFromConsensusStateError::EvmStateRoot)?, + ibc_storage_root: value + .ibc_storage_root + .try_into() + .map_err(TryFromConsensusStateError::IbcStorageRoot)?, + timestamp: value.timestamp, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/header.rs b/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/header.rs index 6a3fe4f650..f5be56ba6f 100644 --- a/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/header.rs +++ b/lib/unionlabs/src/ibc/lightclients/evm_in_cosmos/header.rs @@ -1,17 +1,8 @@ use macros::model; -use crate::{ - errors::{required, MissingField}, - ibc::{ - core::{ - client::height::Height, - commitment::merkle_proof::{MerkleProof, TryFromMerkleProofError}, - }, - lightclients::ethereum::{ - account_proof::{AccountProof, TryFromAccountProofError}, - consensus_state::TryFromConsensusStateError, - }, - }, +use crate::ibc::{ + core::{client::height::Height, commitment::merkle_proof::MerkleProof}, + lightclients::ethereum::account_proof::AccountProof, }; #[model(proto( @@ -27,44 +18,61 @@ pub struct Header { pub account_proof: AccountProof, } -impl From
for protos::union::ibc::lightclients::evmincosmos::v1::Header { - fn from(value: Header) -> Self { - Self { - l1_height: Some(value.l1_height.into()), - l2_slot: value.l2_slot, - l2_consensus_state: Some(value.l2_consensus_state.into()), - l2_inclusion_proof: Some(value.l2_inclusion_proof.into()), - account_proof: Some(value.account_proof.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + ibc::{ + core::commitment::merkle_proof::proto::TryFromMerkleProofError, + lightclients::{ + ethereum::{ + account_proof::proto::TryFromAccountProofError, + consensus_state::proto::TryFromConsensusStateError, + }, + evm_in_cosmos::header::Header, + }, + }, + }; + + impl From
for protos::union::ibc::lightclients::evmincosmos::v1::Header { + fn from(value: Header) -> Self { + Self { + l1_height: Some(value.l1_height.into()), + l2_slot: value.l2_slot, + l2_consensus_state: Some(value.l2_consensus_state.into()), + l2_inclusion_proof: Some(value.l2_inclusion_proof.into()), + account_proof: Some(value.account_proof.into()), + } } } -} -#[derive(Debug, PartialEq, Clone)] -pub enum TryFromHeaderError { - MissingField(MissingField), - L2ConsensusState(TryFromConsensusStateError), - L2InclusionProof(TryFromMerkleProofError), - AccountProof(TryFromAccountProofError), -} + #[derive(Debug, PartialEq, Clone)] + pub enum TryFromHeaderError { + MissingField(MissingField), + L2ConsensusState(TryFromConsensusStateError), + L2InclusionProof(TryFromMerkleProofError), + AccountProof(TryFromAccountProofError), + } -impl TryFrom for Header { - type Error = TryFromHeaderError; + impl TryFrom for Header { + type Error = TryFromHeaderError; - fn try_from( - value: protos::union::ibc::lightclients::evmincosmos::v1::Header, - ) -> Result { - Ok(Self { - l1_height: required!(value.l1_height)?.into(), - l2_slot: value.l2_slot, - l2_consensus_state: required!(value.l2_consensus_state)? - .try_into() - .map_err(TryFromHeaderError::L2ConsensusState)?, - l2_inclusion_proof: required!(value.l2_inclusion_proof)? - .try_into() - .map_err(TryFromHeaderError::L2InclusionProof)?, - account_proof: required!(value.account_proof)? - .try_into() - .map_err(TryFromHeaderError::AccountProof)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::evmincosmos::v1::Header, + ) -> Result { + Ok(Self { + l1_height: required!(value.l1_height)?.into(), + l2_slot: value.l2_slot, + l2_consensus_state: required!(value.l2_consensus_state)? + .try_into() + .map_err(TryFromHeaderError::L2ConsensusState)?, + l2_inclusion_proof: required!(value.l2_inclusion_proof)? + .try_into() + .map_err(TryFromHeaderError::L2InclusionProof)?, + account_proof: required!(value.account_proof)? + .try_into() + .map_err(TryFromHeaderError::AccountProof)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/linea/client_state.rs b/lib/unionlabs/src/ibc/lightclients/linea/client_state.rs index 5b7a30a18e..ad742af2cb 100644 --- a/lib/unionlabs/src/ibc/lightclients/linea/client_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/linea/client_state.rs @@ -1,15 +1,6 @@ -use alloc::sync::Arc; -use core::{fmt::Debug, str::FromStr}; - use macros::model; -use uint::FromDecStrErr; -use crate::{ - errors::{required, InvalidLength, MissingField}, - hash::H160, - ibc::core::client::height::Height, - uint::U256, -}; +use crate::{hash::H160, ibc::core::client::height::Height, uint::U256}; #[model(proto( raw(protos::union::ibc::lightclients::linea::v1::ClientState), @@ -30,94 +21,102 @@ pub struct ClientState { pub frozen_height: Height, } -impl From for protos::union::ibc::lightclients::linea::v1::ClientState { - fn from(value: ClientState) -> Self { - Self { - chain_id: value.chain_id.to_string(), - l1_client_id: value.l1_client_id, - l1_latest_height: Some(value.l1_latest_height.into()), - l1_rollup_contract_address: value.l1_rollup_contract_address.into(), - l1_rollup_current_l2_block_number_slot: value - .l1_rollup_current_l2_block_number_slot - .to_be_bytes() - .to_vec(), - l1_rollup_current_l2_timestamp_slot: value - .l1_rollup_current_l2_timestamp_slot - .to_be_bytes() - .to_vec(), - l1_rollup_l2_state_root_hashes_slot: value - .l1_rollup_l2_state_root_hashes_slot - .to_be_bytes() - .to_vec(), - l2_ibc_contract_address: value.l2_ibc_contract_address.into(), - l2_ibc_contract_commitment_slot: value - .l2_ibc_contract_commitment_slot - .to_be_bytes() - .into(), - frozen_height: Some(value.frozen_height.into()), +#[cfg(feature = "proto")] +pub mod proto { + use core::str::FromStr; + + use crate::{ + errors::{required, InvalidLength, MissingField}, + ibc::lightclients::linea::client_state::ClientState, + uint::U256, + }; + + impl From for protos::union::ibc::lightclients::linea::v1::ClientState { + fn from(value: ClientState) -> Self { + Self { + chain_id: value.chain_id.to_string(), + l1_client_id: value.l1_client_id, + l1_latest_height: Some(value.l1_latest_height.into()), + l1_rollup_contract_address: value.l1_rollup_contract_address.into(), + l1_rollup_current_l2_block_number_slot: value + .l1_rollup_current_l2_block_number_slot + .to_be_bytes() + .to_vec(), + l1_rollup_current_l2_timestamp_slot: value + .l1_rollup_current_l2_timestamp_slot + .to_be_bytes() + .to_vec(), + l1_rollup_l2_state_root_hashes_slot: value + .l1_rollup_l2_state_root_hashes_slot + .to_be_bytes() + .to_vec(), + l2_ibc_contract_address: value.l2_ibc_contract_address.into(), + l2_ibc_contract_commitment_slot: value + .l2_ibc_contract_commitment_slot + .to_be_bytes() + .into(), + frozen_height: Some(value.frozen_height.into()), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromClientStateError { - #[error(transparent)] - MissingField(MissingField), - // y no clone?!?? - #[error("unable to parse chain id")] - ChainId(#[source] Arc), - #[error("invalid l1 latest height")] - L1LatestHeight, - #[error("invalid rollup contract address")] - L1RollupContractAddress(#[source] InvalidLength), - #[error("invalid rollup current_l2_block_number slot")] - L1RollupCurrentL2BlockNumberSlot(#[source] InvalidLength), - #[error("invalid rollup current_l2_timestamp slot")] - L1RollupCurrentL2TimestampSlot(#[source] InvalidLength), - #[error("invalid rollup l2_state_roots mapping slot")] - L1RollupL2StateRootHashesSlot(#[source] InvalidLength), - #[error("invalid l2 ibc contract address")] - L2IbcContractAddress(#[source] InvalidLength), - #[error("invalid l2 ibc commitment slot")] - L2IbcContractCommitmentSlot(#[source] InvalidLength), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromClientStateError { + #[error(transparent)] + MissingField(MissingField), + #[error("unable to parse chain id")] + ChainId(#[source] ::Err), + #[error("invalid rollup contract address")] + L1RollupContractAddress(#[source] InvalidLength), + #[error("invalid rollup current_l2_block_number slot")] + L1RollupCurrentL2BlockNumberSlot(#[source] InvalidLength), + #[error("invalid rollup current_l2_timestamp slot")] + L1RollupCurrentL2TimestampSlot(#[source] InvalidLength), + #[error("invalid rollup l2_state_roots mapping slot")] + L1RollupL2StateRootHashesSlot(#[source] InvalidLength), + #[error("invalid l2 ibc contract address")] + L2IbcContractAddress(#[source] InvalidLength), + #[error("invalid l2 ibc commitment slot")] + L2IbcContractCommitmentSlot(#[source] InvalidLength), + } -impl TryFrom for ClientState { - type Error = TryFromClientStateError; + impl TryFrom for ClientState { + type Error = TryFromClientStateError; - fn try_from( - value: protos::union::ibc::lightclients::linea::v1::ClientState, - ) -> Result { - Ok(Self { - l1_client_id: value.l1_client_id, - chain_id: U256::from_str(&value.chain_id) - .map_err(|err| TryFromClientStateError::ChainId(Arc::new(err)))?, - l1_latest_height: required!(value.l1_latest_height)?.into(), - l1_rollup_contract_address: value - .l1_rollup_contract_address - .try_into() - .map_err(TryFromClientStateError::L1RollupContractAddress)?, - l1_rollup_current_l2_block_number_slot: U256::try_from_be_bytes( - &value.l1_rollup_current_l2_block_number_slot, - ) - .map_err(TryFromClientStateError::L1RollupCurrentL2BlockNumberSlot)?, - l1_rollup_current_l2_timestamp_slot: U256::try_from_be_bytes( - &value.l1_rollup_current_l2_timestamp_slot, - ) - .map_err(TryFromClientStateError::L1RollupCurrentL2TimestampSlot)?, - l1_rollup_l2_state_root_hashes_slot: U256::try_from_be_bytes( - &value.l1_rollup_l2_state_root_hashes_slot, - ) - .map_err(TryFromClientStateError::L1RollupL2StateRootHashesSlot)?, - l2_ibc_contract_address: value - .l2_ibc_contract_address - .try_into() - .map_err(TryFromClientStateError::L2IbcContractAddress)?, - l2_ibc_contract_commitment_slot: U256::try_from_be_bytes( - &value.l2_ibc_contract_commitment_slot, - ) - .map_err(TryFromClientStateError::L2IbcContractCommitmentSlot)?, - frozen_height: value.frozen_height.unwrap_or_default().into(), - }) + fn try_from( + value: protos::union::ibc::lightclients::linea::v1::ClientState, + ) -> Result { + Ok(Self { + l1_client_id: value.l1_client_id, + chain_id: U256::from_str(&value.chain_id) + .map_err(TryFromClientStateError::ChainId)?, + l1_latest_height: required!(value.l1_latest_height)?.into(), + l1_rollup_contract_address: value + .l1_rollup_contract_address + .try_into() + .map_err(TryFromClientStateError::L1RollupContractAddress)?, + l1_rollup_current_l2_block_number_slot: U256::try_from_be_bytes( + &value.l1_rollup_current_l2_block_number_slot, + ) + .map_err(TryFromClientStateError::L1RollupCurrentL2BlockNumberSlot)?, + l1_rollup_current_l2_timestamp_slot: U256::try_from_be_bytes( + &value.l1_rollup_current_l2_timestamp_slot, + ) + .map_err(TryFromClientStateError::L1RollupCurrentL2TimestampSlot)?, + l1_rollup_l2_state_root_hashes_slot: U256::try_from_be_bytes( + &value.l1_rollup_l2_state_root_hashes_slot, + ) + .map_err(TryFromClientStateError::L1RollupL2StateRootHashesSlot)?, + l2_ibc_contract_address: value + .l2_ibc_contract_address + .try_into() + .map_err(TryFromClientStateError::L2IbcContractAddress)?, + l2_ibc_contract_commitment_slot: U256::try_from_be_bytes( + &value.l2_ibc_contract_commitment_slot, + ) + .map_err(TryFromClientStateError::L2IbcContractCommitmentSlot)?, + frozen_height: value.frozen_height.unwrap_or_default().into(), + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/linea/consensus_state.rs b/lib/unionlabs/src/ibc/lightclients/linea/consensus_state.rs index 3cf85d7af3..5234732c1b 100644 --- a/lib/unionlabs/src/ibc/lightclients/linea/consensus_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/linea/consensus_state.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::{errors::InvalidLength, hash::H256}; +use crate::hash::H256; #[model(proto( raw(protos::union::ibc::lightclients::linea::v1::ConsensusState), @@ -12,33 +12,38 @@ pub struct ConsensusState { pub timestamp: u64, } -impl From for protos::union::ibc::lightclients::linea::v1::ConsensusState { - fn from(value: ConsensusState) -> Self { - Self { - ibc_storage_root: value.ibc_storage_root.into(), - timestamp: value.timestamp, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{errors::InvalidLength, ibc::lightclients::linea::consensus_state::ConsensusState}; + + impl From for protos::union::ibc::lightclients::linea::v1::ConsensusState { + fn from(value: ConsensusState) -> Self { + Self { + ibc_storage_root: value.ibc_storage_root.into(), + timestamp: value.timestamp, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromConsensusStateError { - #[error("invalid ibc storage root")] - IbcStorageRoot(#[source] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromConsensusStateError { + #[error("invalid ibc storage root")] + IbcStorageRoot(#[source] InvalidLength), + } -impl TryFrom for ConsensusState { - type Error = TryFromConsensusStateError; + impl TryFrom for ConsensusState { + type Error = TryFromConsensusStateError; - fn try_from( - value: protos::union::ibc::lightclients::linea::v1::ConsensusState, - ) -> Result { - Ok(Self { - ibc_storage_root: value - .ibc_storage_root - .try_into() - .map_err(TryFromConsensusStateError::IbcStorageRoot)?, - timestamp: value.timestamp, - }) + fn try_from( + value: protos::union::ibc::lightclients::linea::v1::ConsensusState, + ) -> Result { + Ok(Self { + ibc_storage_root: value + .ibc_storage_root + .try_into() + .map_err(TryFromConsensusStateError::IbcStorageRoot)?, + timestamp: value.timestamp, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/linea/header.rs b/lib/unionlabs/src/ibc/lightclients/linea/header.rs index 21527aab6c..9c122f2a53 100644 --- a/lib/unionlabs/src/ibc/lightclients/linea/header.rs +++ b/lib/unionlabs/src/ibc/lightclients/linea/header.rs @@ -1,15 +1,11 @@ use macros::model; use crate::{ - errors::{required, InvalidLength, MissingField}, ibc::{ core::client::height::Height, - lightclients::ethereum::{ - account_proof::{AccountProof, TryFromAccountProofError}, - storage_proof::{StorageProof, TryFromStorageProofError}, - }, + lightclients::ethereum::{account_proof::AccountProof, storage_proof::StorageProof}, }, - linea::proof::{InclusionProof, TryFromMerkleProofError}, + linea::proof::InclusionProof, }; #[model(proto(raw(protos::union::ibc::lightclients::linea::v1::Header), into, from))] @@ -22,55 +18,70 @@ pub struct Header { pub l2_ibc_contract_proof: InclusionProof, } -impl From
for protos::union::ibc::lightclients::linea::v1::Header { - fn from(value: Header) -> Self { - Self { - l1_height: Some(value.l1_height.into()), - l1_rollup_contract_proof: Some(value.l1_rollup_contract_proof.into()), - l2_timestamp_proof: Some(value.l2_timestamp_proof.into()), - l2_block_number_proof: Some(value.l2_block_number_proof.into()), - l2_state_root_proof: Some(value.l2_state_root_proof.into()), - l2_ibc_contract_proof: Some(value.l2_ibc_contract_proof.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField}, + ibc::lightclients::{ + ethereum::{ + account_proof::proto::TryFromAccountProofError, + storage_proof::proto::TryFromStorageProofError, + }, + linea::header::Header, + }, + linea::proof::proto::TryFromMerkleProofError, + }; + + impl From
for protos::union::ibc::lightclients::linea::v1::Header { + fn from(value: Header) -> Self { + Self { + l1_height: Some(value.l1_height.into()), + l1_rollup_contract_proof: Some(value.l1_rollup_contract_proof.into()), + l2_timestamp_proof: Some(value.l2_timestamp_proof.into()), + l2_block_number_proof: Some(value.l2_block_number_proof.into()), + l2_state_root_proof: Some(value.l2_state_root_proof.into()), + l2_ibc_contract_proof: Some(value.l2_ibc_contract_proof.into()), + } } } -} -#[derive(Debug, PartialEq, Clone)] -pub enum TryFromHeaderError { - MissingField(MissingField), - L1RollupContractProof(TryFromAccountProofError), - L2BlockNumber(InvalidLength), - L2BlockNumberProof(TryFromStorageProofError), - L2StateRoot(InvalidLength), - L2StateRootProof(TryFromStorageProofError), - L2Timestamp(InvalidLength), - L2TimestampProof(TryFromStorageProofError), - L2IbcContractProof(TryFromMerkleProofError), -} + #[derive(Debug, PartialEq, Clone)] + pub enum TryFromHeaderError { + MissingField(MissingField), + L1RollupContractProof(TryFromAccountProofError), + L2BlockNumber(InvalidLength), + L2BlockNumberProof(TryFromStorageProofError), + L2StateRoot(InvalidLength), + L2StateRootProof(TryFromStorageProofError), + L2Timestamp(InvalidLength), + L2TimestampProof(TryFromStorageProofError), + L2IbcContractProof(TryFromMerkleProofError), + } -impl TryFrom for Header { - type Error = TryFromHeaderError; + impl TryFrom for Header { + type Error = TryFromHeaderError; - fn try_from( - value: protos::union::ibc::lightclients::linea::v1::Header, - ) -> Result { - Ok(Self { - l1_height: required!(value.l1_height)?.into(), - l1_rollup_contract_proof: required!(value.l1_rollup_contract_proof)? - .try_into() - .map_err(TryFromHeaderError::L1RollupContractProof)?, - l2_timestamp_proof: required!(value.l2_timestamp_proof)? - .try_into() - .map_err(TryFromHeaderError::L2TimestampProof)?, - l2_block_number_proof: required!(value.l2_block_number_proof)? - .try_into() - .map_err(TryFromHeaderError::L2BlockNumberProof)?, - l2_state_root_proof: required!(value.l2_state_root_proof)? - .try_into() - .map_err(TryFromHeaderError::L2StateRootProof)?, - l2_ibc_contract_proof: required!(value.l2_ibc_contract_proof)? - .try_into() - .map_err(TryFromHeaderError::L2IbcContractProof)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::linea::v1::Header, + ) -> Result { + Ok(Self { + l1_height: required!(value.l1_height)?.into(), + l1_rollup_contract_proof: required!(value.l1_rollup_contract_proof)? + .try_into() + .map_err(TryFromHeaderError::L1RollupContractProof)?, + l2_timestamp_proof: required!(value.l2_timestamp_proof)? + .try_into() + .map_err(TryFromHeaderError::L2TimestampProof)?, + l2_block_number_proof: required!(value.l2_block_number_proof)? + .try_into() + .map_err(TryFromHeaderError::L2BlockNumberProof)?, + l2_state_root_proof: required!(value.l2_state_root_proof)? + .try_into() + .map_err(TryFromHeaderError::L2StateRootProof)?, + l2_ibc_contract_proof: required!(value.l2_ibc_contract_proof)? + .try_into() + .map_err(TryFromHeaderError::L2IbcContractProof)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/movement/client_state.rs b/lib/unionlabs/src/ibc/lightclients/movement/client_state.rs index 8007d7ade5..4099c54c22 100644 --- a/lib/unionlabs/src/ibc/lightclients/movement/client_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/movement/client_state.rs @@ -1,10 +1,7 @@ -use core::str::FromStr; - use macros::model; use crate::{ - aptos::account::AccountAddress, errors::InvalidLength, hash::H160, - ibc::core::client::height::Height, id::ClientId, + aptos::account::AccountAddress, hash::H160, ibc::core::client::height::Height, id::ClientId, }; #[model(proto( @@ -22,62 +19,74 @@ pub struct ClientState { pub latest_block_num: u64, } -impl From for protos::union::ibc::lightclients::movement::v1::ClientState { - fn from(value: ClientState) -> Self { - Self { - chain_id: value.chain_id, - l1_client_id: value.l1_client_id.to_string(), - l1_contract_address: value.l1_contract_address.into(), - l2_contract_address: value.l2_contract_address.0.into_bytes(), - table_handle: value.table_handle.0.into_bytes(), - frozen_height: Some(value.frozen_height.into()), - latest_block_num: value.latest_block_num, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::account::AccountAddress, + errors::InvalidLength, + ibc::lightclients::movement::client_state::ClientState, + id::{ClientId, ParsePrefixedIdError}, + }; + + impl From for protos::union::ibc::lightclients::movement::v1::ClientState { + fn from(value: ClientState) -> Self { + Self { + chain_id: value.chain_id, + // l1_client_id: value.l1_client_id, + l1_client_id: todo!(), + l1_contract_address: value.l1_contract_address.into(), + l2_contract_address: value.l2_contract_address.0.into_bytes(), + table_handle: value.table_handle.0.into_bytes(), + frozen_height: Some(value.frozen_height.into()), + latest_block_num: value.latest_block_num, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromClientStateError { - #[error("invalid l1 client id")] - L1ClientId(#[source] ::Err), - #[error("invalid l1 contract address")] - L1ContractAddress(#[source] InvalidLength), - #[error("invalid l2 contract address")] - L2ContractAddress(#[source] InvalidLength), - #[error("invalid table handle")] - TableHandle(#[source] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromClientStateError { + #[error("invalid l1 client id")] + L1ClientId(#[source] ParsePrefixedIdError), + #[error("invalid l1 contract address")] + L1ContractAddress(#[source] InvalidLength), + #[error("invalid l2 contract address")] + L2ContractAddress(#[source] InvalidLength), + #[error("invalid table handle")] + TableHandle(#[source] InvalidLength), + } -impl TryFrom for ClientState { - type Error = TryFromClientStateError; + impl TryFrom for ClientState { + type Error = TryFromClientStateError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::ClientState, - ) -> Result { - Ok(Self { - l1_client_id: ClientId::from_str(&value.l1_client_id) - .map_err(TryFromClientStateError::L1ClientId)?, - l1_contract_address: value - .l1_contract_address - .try_into() - .map_err(TryFromClientStateError::L1ContractAddress)?, - l2_contract_address: AccountAddress( - value - .l2_contract_address - .as_slice() - .try_into() - .map_err(TryFromClientStateError::L2ContractAddress)?, - ), - table_handle: AccountAddress( - value - .table_handle - .as_slice() + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::ClientState, + ) -> Result { + let (_, l1_client_id) = ClientId::parse_prefixed(&value.l1_client_id) + .map_err(TryFromClientStateError::L1ClientId)?; + Ok(Self { + l1_client_id, + l1_contract_address: value + .l1_contract_address .try_into() - .map_err(TryFromClientStateError::TableHandle)?, - ), - frozen_height: value.frozen_height.unwrap_or_default().into(), - latest_block_num: value.latest_block_num, - chain_id: value.chain_id, - }) + .map_err(TryFromClientStateError::L1ContractAddress)?, + l2_contract_address: AccountAddress( + value + .l2_contract_address + .as_slice() + .try_into() + .map_err(TryFromClientStateError::L2ContractAddress)?, + ), + table_handle: AccountAddress( + value + .table_handle + .as_slice() + .try_into() + .map_err(TryFromClientStateError::TableHandle)?, + ), + frozen_height: value.frozen_height.unwrap_or_default().into(), + latest_block_num: value.latest_block_num, + chain_id: value.chain_id, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/movement/consensus_state.rs b/lib/unionlabs/src/ibc/lightclients/movement/consensus_state.rs index 02a9358c7c..e34c821e38 100644 --- a/lib/unionlabs/src/ibc/lightclients/movement/consensus_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/movement/consensus_state.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::{errors::InvalidLength, hash::H256}; +use crate::hash::H256; #[model(proto( raw(protos::union::ibc::lightclients::movement::v1::ConsensusState), @@ -14,40 +14,47 @@ pub struct ConsensusState { pub state_proof_hash: H256, } -impl From for protos::union::ibc::lightclients::movement::v1::ConsensusState { - fn from(value: ConsensusState) -> Self { - Self { - state_root: value.state_root.into(), - timestamp: value.timestamp, - state_proof_hash: value.state_proof_hash.into(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::InvalidLength, ibc::lightclients::movement::consensus_state::ConsensusState, + }; + + impl From for protos::union::ibc::lightclients::movement::v1::ConsensusState { + fn from(value: ConsensusState) -> Self { + Self { + state_root: value.state_root.into(), + timestamp: value.timestamp, + state_proof_hash: value.state_proof_hash.into(), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromConsensusStateError { - #[error("invalid state root")] - StateRoot(#[source] InvalidLength), - #[error("invalid state proof hash")] - StateProofHash(#[source] InvalidLength), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromConsensusStateError { + #[error("invalid state root")] + StateRoot(#[source] InvalidLength), + #[error("invalid state proof hash")] + StateProofHash(#[source] InvalidLength), + } -impl TryFrom for ConsensusState { - type Error = TryFromConsensusStateError; + impl TryFrom for ConsensusState { + type Error = TryFromConsensusStateError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::ConsensusState, - ) -> Result { - Ok(Self { - state_root: value - .state_root - .try_into() - .map_err(TryFromConsensusStateError::StateRoot)?, - timestamp: value.timestamp, - state_proof_hash: value - .state_proof_hash - .try_into() - .map_err(TryFromConsensusStateError::StateProofHash)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::ConsensusState, + ) -> Result { + Ok(Self { + state_root: value + .state_root + .try_into() + .map_err(TryFromConsensusStateError::StateRoot)?, + timestamp: value.timestamp, + state_proof_hash: value + .state_proof_hash + .try_into() + .map_err(TryFromConsensusStateError::StateProofHash)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/movement/header.rs b/lib/unionlabs/src/ibc/lightclients/movement/header.rs index 88f029c626..a04caf60a6 100644 --- a/lib/unionlabs/src/ibc/lightclients/movement/header.rs +++ b/lib/unionlabs/src/ibc/lightclients/movement/header.rs @@ -1,17 +1,10 @@ use macros::model; use crate::{ - aptos::{ - state_proof::{StateProof, TryFromStateProofError}, - transaction_proof::{TransactionInfoWithProof, TryFromTransactionInfoWithProofError}, - }, - errors::{required, MissingField}, + aptos::{state_proof::StateProof, transaction_proof::TransactionInfoWithProof}, ibc::{ core::client::height::Height, - lightclients::ethereum::{ - account_proof::{AccountProof, TryFromAccountProofError}, - storage_proof::{StorageProof, TryFromStorageProofError}, - }, + lightclients::ethereum::{account_proof::AccountProof, storage_proof::StorageProof}, }, }; @@ -33,50 +26,69 @@ pub struct Header { pub new_height: u64, } -impl From
for protos::union::ibc::lightclients::movement::v1::Header { - fn from(value: Header) -> Self { - Self { - l1_height: Some(value.l1_height.into()), - trusted_height: Some(value.trusted_height.into()), - state_proof: Some(value.state_proof.into()), - tx_index: value.tx_index, - tx_proof: Some(value.tx_proof.into()), - state_proof_hash_proof: Some(value.state_proof_hash_proof.into()), - settlement_contract_proof: Some(value.settlement_contract_proof.into()), - new_height: value.new_height, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + aptos::{ + state_proof::proto::TryFromStateProofError, + transaction_proof::proto::TryFromTransactionInfoWithProofError, + }, + errors::{required, MissingField}, + ibc::lightclients::{ + ethereum::{ + account_proof::proto::TryFromAccountProofError, + storage_proof::proto::TryFromStorageProofError, + }, + movement::header::Header, + }, + }; + + impl From
for protos::union::ibc::lightclients::movement::v1::Header { + fn from(value: Header) -> Self { + Self { + l1_height: Some(value.l1_height.into()), + trusted_height: Some(value.trusted_height.into()), + state_proof: Some(value.state_proof.into()), + tx_index: value.tx_index, + tx_proof: Some(value.tx_proof.into()), + state_proof_hash_proof: Some(value.state_proof_hash_proof.into()), + settlement_contract_proof: Some(value.settlement_contract_proof.into()), + new_height: value.new_height, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromHeaderError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid state proof")] - StateProof(#[from] TryFromStateProofError), - #[error("invalid tx proof")] - TxProof(#[from] TryFromTransactionInfoWithProofError), - #[error("invalid state proof hash proof")] - StateProofHashProof(#[from] TryFromStorageProofError), - #[error("invalid settlement contract proof")] - SettlementContractProof(#[from] TryFromAccountProofError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromHeaderError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid state proof")] + StateProof(#[from] TryFromStateProofError), + #[error("invalid tx proof")] + TxProof(#[from] TryFromTransactionInfoWithProofError), + #[error("invalid state proof hash proof")] + StateProofHashProof(#[from] TryFromStorageProofError), + #[error("invalid settlement contract proof")] + SettlementContractProof(#[from] TryFromAccountProofError), + } -impl TryFrom for Header { - type Error = TryFromHeaderError; + impl TryFrom for Header { + type Error = TryFromHeaderError; - fn try_from( - value: protos::union::ibc::lightclients::movement::v1::Header, - ) -> Result { - Ok(Self { - l1_height: required!(value.l1_height)?.into(), - trusted_height: required!(value.trusted_height)?.into(), - state_proof: required!(value.state_proof)?.try_into()?, - tx_index: value.tx_index, - tx_proof: required!(value.tx_proof)?.try_into()?, - state_proof_hash_proof: required!(value.state_proof_hash_proof)?.try_into()?, - settlement_contract_proof: required!(value.settlement_contract_proof)?.try_into()?, - new_height: value.new_height, - }) + fn try_from( + value: protos::union::ibc::lightclients::movement::v1::Header, + ) -> Result { + Ok(Self { + l1_height: required!(value.l1_height)?.into(), + trusted_height: required!(value.trusted_height)?.into(), + state_proof: required!(value.state_proof)?.try_into()?, + tx_index: value.tx_index, + tx_proof: required!(value.tx_proof)?.try_into()?, + state_proof_hash_proof: required!(value.state_proof_hash_proof)?.try_into()?, + settlement_contract_proof: required!(value.settlement_contract_proof)? + .try_into()?, + new_height: value.new_height, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/scroll/client_state.rs b/lib/unionlabs/src/ibc/lightclients/scroll/client_state.rs index 37baba74d2..f52333562a 100644 --- a/lib/unionlabs/src/ibc/lightclients/scroll/client_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/scroll/client_state.rs @@ -1,10 +1,6 @@ -use alloc::sync::Arc; -use core::{fmt::Debug, str::FromStr}; - use macros::model; -use uint::FromDecStrErr; -use crate::{errors::InvalidLength, hash::H160, ibc::core::client::height::Height, uint::U256}; +use crate::{hash::H160, ibc::core::client::height::Height, uint::U256}; #[model(proto( raw(protos::union::ibc::lightclients::scroll::v1::ClientState), @@ -25,71 +21,85 @@ pub struct ClientState { pub ibc_commitment_slot: U256, } -impl From for protos::union::ibc::lightclients::scroll::v1::ClientState { - fn from(value: ClientState) -> Self { - Self { - l1_client_id: value.l1_client_id, - chain_id: value.chain_id.to_string(), - latest_slot: value.latest_slot, - latest_batch_index_slot: value.latest_batch_index_slot.to_be_bytes().to_vec(), - frozen_height: Some(value.frozen_height.into()), - l2_contract_address: value.l2_contract_address.into(), - l2_finalized_state_roots_slot: value.l2_finalized_state_roots_slot.to_be_bytes().into(), - ibc_contract_address: value.ibc_contract_address.into(), - ibc_commitment_slot: value.ibc_commitment_slot.to_be_bytes().into(), - l2_committed_batches_slot: value.l2_committed_batches_slot.to_be_bytes().into(), +#[cfg(feature = "proto")] +pub mod proto { + use core::str::FromStr; + + use crate::{ + errors::InvalidLength, ibc::lightclients::scroll::client_state::ClientState, uint::U256, + }; + + impl From for protos::union::ibc::lightclients::scroll::v1::ClientState { + fn from(value: ClientState) -> Self { + Self { + l1_client_id: value.l1_client_id, + chain_id: value.chain_id.to_string(), + latest_slot: value.latest_slot, + latest_batch_index_slot: value.latest_batch_index_slot.to_be_bytes().to_vec(), + frozen_height: Some(value.frozen_height.into()), + l2_contract_address: value.l2_contract_address.into(), + l2_finalized_state_roots_slot: value + .l2_finalized_state_roots_slot + .to_be_bytes() + .into(), + ibc_contract_address: value.ibc_contract_address.into(), + ibc_commitment_slot: value.ibc_commitment_slot.to_be_bytes().into(), + l2_committed_batches_slot: value.l2_committed_batches_slot.to_be_bytes().into(), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromClientStateError { - #[error("unable to parse chain id")] - ChainId(#[source] Arc), - #[error("invalid latest batch index slot")] - LatestBatchIndexSlot(#[source] InvalidLength), - #[error("invalid rollup contract address")] - RollupContractAddress(#[source] InvalidLength), - #[error("invalid rollup finalized state roots slot")] - RollupFinalizedStateRootsSlot(#[source] InvalidLength), - #[error("invalid ibc contract address")] - IbcContractAddress(#[source] InvalidLength), - #[error("invalid ibc commitment slot")] - IbcCommitmentSlot(#[source] InvalidLength), - #[error("invalid ibc committed batches slot")] - RollupCommittedBatchesSlot(#[source] InvalidLength), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromClientStateError { + #[error("unable to parse chain id")] + ChainId(#[source] ::Err), + #[error("invalid latest batch index slot")] + LatestBatchIndexSlot(#[source] InvalidLength), + #[error("invalid rollup contract address")] + RollupContractAddress(#[source] InvalidLength), + #[error("invalid rollup finalized state roots slot")] + RollupFinalizedStateRootsSlot(#[source] InvalidLength), + #[error("invalid ibc contract address")] + IbcContractAddress(#[source] InvalidLength), + #[error("invalid ibc commitment slot")] + IbcCommitmentSlot(#[source] InvalidLength), + #[error("invalid ibc committed batches slot")] + RollupCommittedBatchesSlot(#[source] InvalidLength), + } -impl TryFrom for ClientState { - type Error = TryFromClientStateError; + impl TryFrom for ClientState { + type Error = TryFromClientStateError; - fn try_from( - value: protos::union::ibc::lightclients::scroll::v1::ClientState, - ) -> Result { - Ok(Self { - l1_client_id: value.l1_client_id, - chain_id: U256::from_str(&value.chain_id) - .map_err(|err| TryFromClientStateError::ChainId(Arc::new(err)))?, - latest_slot: value.latest_slot, - latest_batch_index_slot: U256::try_from_be_bytes(&value.latest_batch_index_slot) - .map_err(TryFromClientStateError::LatestBatchIndexSlot)?, - frozen_height: value.frozen_height.unwrap_or_default().into(), - l2_contract_address: value - .l2_contract_address - .try_into() - .map_err(TryFromClientStateError::RollupContractAddress)?, - l2_finalized_state_roots_slot: U256::try_from_be_bytes( - &value.l2_finalized_state_roots_slot, - ) - .map_err(TryFromClientStateError::RollupFinalizedStateRootsSlot)?, - ibc_contract_address: value - .ibc_contract_address - .try_into() - .map_err(TryFromClientStateError::IbcContractAddress)?, - ibc_commitment_slot: U256::try_from_be_bytes(&value.ibc_commitment_slot) - .map_err(TryFromClientStateError::IbcCommitmentSlot)?, - l2_committed_batches_slot: U256::try_from_be_bytes(&value.l2_committed_batches_slot) + fn try_from( + value: protos::union::ibc::lightclients::scroll::v1::ClientState, + ) -> Result { + Ok(Self { + l1_client_id: value.l1_client_id, + chain_id: U256::from_str(&value.chain_id) + .map_err(TryFromClientStateError::ChainId)?, + latest_slot: value.latest_slot, + latest_batch_index_slot: U256::try_from_be_bytes(&value.latest_batch_index_slot) + .map_err(TryFromClientStateError::LatestBatchIndexSlot)?, + frozen_height: value.frozen_height.unwrap_or_default().into(), + l2_contract_address: value + .l2_contract_address + .try_into() + .map_err(TryFromClientStateError::RollupContractAddress)?, + l2_finalized_state_roots_slot: U256::try_from_be_bytes( + &value.l2_finalized_state_roots_slot, + ) + .map_err(TryFromClientStateError::RollupFinalizedStateRootsSlot)?, + ibc_contract_address: value + .ibc_contract_address + .try_into() + .map_err(TryFromClientStateError::IbcContractAddress)?, + ibc_commitment_slot: U256::try_from_be_bytes(&value.ibc_commitment_slot) + .map_err(TryFromClientStateError::IbcCommitmentSlot)?, + l2_committed_batches_slot: U256::try_from_be_bytes( + &value.l2_committed_batches_slot, + ) .map_err(TryFromClientStateError::RollupCommittedBatchesSlot)?, - }) + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/scroll/consensus_state.rs b/lib/unionlabs/src/ibc/lightclients/scroll/consensus_state.rs index f466b65a16..b6a276224d 100644 --- a/lib/unionlabs/src/ibc/lightclients/scroll/consensus_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/scroll/consensus_state.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::{errors::InvalidLength, hash::H256}; +use crate::hash::H256; #[model(proto( raw(protos::union::ibc::lightclients::scroll::v1::ConsensusState), @@ -13,40 +13,47 @@ pub struct ConsensusState { pub ibc_storage_root: H256, } -impl From for protos::union::ibc::lightclients::scroll::v1::ConsensusState { - fn from(value: ConsensusState) -> Self { - Self { - state_root: value.state_root.into(), - timestamp: value.timestamp, - ibc_storage_root: value.ibc_storage_root.into(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::InvalidLength, ibc::lightclients::scroll::consensus_state::ConsensusState, + }; + + impl From for protos::union::ibc::lightclients::scroll::v1::ConsensusState { + fn from(value: ConsensusState) -> Self { + Self { + state_root: value.state_root.into(), + timestamp: value.timestamp, + ibc_storage_root: value.ibc_storage_root.into(), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromConsensusStateError { - #[error("invalid state root")] - StateRoot(#[source] InvalidLength), - #[error("invalid ibc storage root")] - IbcStorageRoot(#[source] InvalidLength), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromConsensusStateError { + #[error("invalid state root")] + StateRoot(#[source] InvalidLength), + #[error("invalid ibc storage root")] + IbcStorageRoot(#[source] InvalidLength), + } -impl TryFrom for ConsensusState { - type Error = TryFromConsensusStateError; + impl TryFrom for ConsensusState { + type Error = TryFromConsensusStateError; - fn try_from( - value: protos::union::ibc::lightclients::scroll::v1::ConsensusState, - ) -> Result { - Ok(Self { - state_root: value - .state_root - .try_into() - .map_err(TryFromConsensusStateError::IbcStorageRoot)?, - timestamp: value.timestamp, - ibc_storage_root: value - .ibc_storage_root - .try_into() - .map_err(TryFromConsensusStateError::IbcStorageRoot)?, - }) + fn try_from( + value: protos::union::ibc::lightclients::scroll::v1::ConsensusState, + ) -> Result { + Ok(Self { + state_root: value + .state_root + .try_into() + .map_err(TryFromConsensusStateError::IbcStorageRoot)?, + timestamp: value.timestamp, + ibc_storage_root: value + .ibc_storage_root + .try_into() + .map_err(TryFromConsensusStateError::IbcStorageRoot)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/scroll/header.rs b/lib/unionlabs/src/ibc/lightclients/scroll/header.rs index cc3e76f8da..9430933668 100644 --- a/lib/unionlabs/src/ibc/lightclients/scroll/header.rs +++ b/lib/unionlabs/src/ibc/lightclients/scroll/header.rs @@ -1,14 +1,8 @@ use macros::model; -use crate::{ - errors::{required, InvalidLength, MissingField}, - ibc::{ - core::client::height::Height, - lightclients::ethereum::{ - account_proof::{AccountProof, TryFromAccountProofError}, - storage_proof::{StorageProof, TryFromStorageProofError}, - }, - }, +use crate::ibc::{ + core::client::height::Height, + lightclients::ethereum::{account_proof::AccountProof, storage_proof::StorageProof}, }; #[model(proto(raw(protos::union::ibc::lightclients::scroll::v1::Header), into, from))] @@ -20,62 +14,76 @@ pub struct Header { pub last_batch_index_proof: StorageProof, pub batch_hash_proof: StorageProof, pub l2_ibc_account_proof: AccountProof, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub batch_header: Vec, } -impl From
for protos::union::ibc::lightclients::scroll::v1::Header { - fn from(value: Header) -> Self { - Self { - l1_height: Some(value.l1_height.into()), - l1_account_proof: Some(value.l1_account_proof.into()), - l2_state_root_proof: Some(value.l2_state_root_proof.into()), - last_batch_index_proof: Some(value.last_batch_index_proof.into()), - l2_ibc_account_proof: Some(value.l2_ibc_account_proof.into()), - batch_hash_proof: Some(value.batch_hash_proof.into()), - batch_header: value.batch_header, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField}, + ibc::lightclients::{ + ethereum::{ + account_proof::proto::TryFromAccountProofError, + storage_proof::proto::TryFromStorageProofError, + }, + scroll::header::Header, + }, + }; + + impl From
for protos::union::ibc::lightclients::scroll::v1::Header { + fn from(value: Header) -> Self { + Self { + l1_height: Some(value.l1_height.into()), + l1_account_proof: Some(value.l1_account_proof.into()), + l2_state_root_proof: Some(value.l2_state_root_proof.into()), + last_batch_index_proof: Some(value.last_batch_index_proof.into()), + l2_ibc_account_proof: Some(value.l2_ibc_account_proof.into()), + batch_hash_proof: Some(value.batch_hash_proof.into()), + batch_header: value.batch_header, + } } } -} -#[derive(Debug, PartialEq, Clone)] -pub enum TryFromHeaderError { - MissingField(MissingField), - L1AccountProof(TryFromAccountProofError), - L2StateRoot(InvalidLength), - L2StateProof(TryFromStorageProofError), - LastBatchIndexProof(TryFromStorageProofError), - L2IbcAccountProof(TryFromAccountProofError), - BatchHashProof(TryFromStorageProofError), - L1MessageHash(InvalidLength), - BlobVersionedHash(InvalidLength), -} + #[derive(Debug, PartialEq, Clone)] + pub enum TryFromHeaderError { + MissingField(MissingField), + L1AccountProof(TryFromAccountProofError), + L2StateRoot(InvalidLength), + L2StateProof(TryFromStorageProofError), + LastBatchIndexProof(TryFromStorageProofError), + L2IbcAccountProof(TryFromAccountProofError), + BatchHashProof(TryFromStorageProofError), + L1MessageHash(InvalidLength), + BlobVersionedHash(InvalidLength), + } -impl TryFrom for Header { - type Error = TryFromHeaderError; + impl TryFrom for Header { + type Error = TryFromHeaderError; - fn try_from( - value: protos::union::ibc::lightclients::scroll::v1::Header, - ) -> Result { - Ok(Self { - l1_height: required!(value.l1_height)?.into(), - l1_account_proof: required!(value.l1_account_proof)? - .try_into() - .map_err(TryFromHeaderError::L1AccountProof)?, - l2_state_root_proof: required!(value.l2_state_root_proof)? - .try_into() - .map_err(TryFromHeaderError::L2StateProof)?, - last_batch_index_proof: required!(value.last_batch_index_proof)? - .try_into() - .map_err(TryFromHeaderError::LastBatchIndexProof)?, - l2_ibc_account_proof: required!(value.l2_ibc_account_proof)? - .try_into() - .map_err(TryFromHeaderError::L2IbcAccountProof)?, - batch_hash_proof: required!(value.batch_hash_proof)? - .try_into() - .map_err(TryFromHeaderError::BatchHashProof)?, - batch_header: value.batch_header, - }) + fn try_from( + value: protos::union::ibc::lightclients::scroll::v1::Header, + ) -> Result { + Ok(Self { + l1_height: required!(value.l1_height)?.into(), + l1_account_proof: required!(value.l1_account_proof)? + .try_into() + .map_err(TryFromHeaderError::L1AccountProof)?, + l2_state_root_proof: required!(value.l2_state_root_proof)? + .try_into() + .map_err(TryFromHeaderError::L2StateProof)?, + last_batch_index_proof: required!(value.last_batch_index_proof)? + .try_into() + .map_err(TryFromHeaderError::LastBatchIndexProof)?, + l2_ibc_account_proof: required!(value.l2_ibc_account_proof)? + .try_into() + .map_err(TryFromHeaderError::L2IbcAccountProof)?, + batch_hash_proof: required!(value.batch_hash_proof)? + .try_into() + .map_err(TryFromHeaderError::BatchHashProof)?, + batch_header: value.batch_header, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/tendermint/client_state.rs b/lib/unionlabs/src/ibc/lightclients/tendermint/client_state.rs index 9f0f94485a..5519ae3126 100644 --- a/lib/unionlabs/src/ibc/lightclients/tendermint/client_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/tendermint/client_state.rs @@ -1,13 +1,9 @@ use macros::model; use crate::{ - cosmos::ics23::proof_spec::{ProofSpec, TryFromProofSpecError}, - errors::{required, MissingField}, - google::protobuf::duration::{Duration, DurationError}, - ibc::{ - core::client::height::Height, - lightclients::tendermint::fraction::{Fraction, TryFromFractionError}, - }, + cosmos::ics23::proof_spec::ProofSpec, + google::protobuf::duration::Duration, + ibc::{core::client::height::Height, lightclients::tendermint::fraction::Fraction}, }; #[model(proto( @@ -27,70 +23,82 @@ pub struct ClientState { pub upgrade_path: Vec, } -impl From for protos::ibc::lightclients::tendermint::v1::ClientState { - fn from(value: ClientState) -> Self { - #[allow(deprecated)] - Self { - chain_id: value.chain_id, - trust_level: Some(value.trust_level.into()), - trusting_period: Some(value.trusting_period.into()), - unbonding_period: Some(value.unbonding_period.into()), - max_clock_drift: Some(value.max_clock_drift.into()), - frozen_height: value.frozen_height.map(Into::into), - latest_height: Some(value.latest_height.into()), - proof_specs: value.proof_specs.into_iter().map(Into::into).collect(), - upgrade_path: value.upgrade_path, - allow_update_after_expiry: Default::default(), - allow_update_after_misbehaviour: Default::default(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::ics23::proof_spec::proto::TryFromProofSpecError, + errors::{required, MissingField}, + google::protobuf::duration::DurationError, + ibc::lightclients::tendermint::{ + client_state::ClientState, fraction::proto::TryFromFractionError, + }, + }; + + impl From for protos::ibc::lightclients::tendermint::v1::ClientState { + fn from(value: ClientState) -> Self { + #[allow(deprecated)] + Self { + chain_id: value.chain_id, + trust_level: Some(value.trust_level.into()), + trusting_period: Some(value.trusting_period.into()), + unbonding_period: Some(value.unbonding_period.into()), + max_clock_drift: Some(value.max_clock_drift.into()), + frozen_height: value.frozen_height.map(Into::into), + latest_height: Some(value.latest_height.into()), + proof_specs: value.proof_specs.into_iter().map(Into::into).collect(), + upgrade_path: value.upgrade_path, + allow_update_after_expiry: Default::default(), + allow_update_after_misbehaviour: Default::default(), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromClientStateError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid trust level")] - TrustLevel(#[source] TryFromFractionError), - #[error("invalid trusting period")] - TrustingPeriod(#[source] DurationError), - #[error("invalid unbonding period")] - UnbondingPeriod(#[source] DurationError), - #[error("invalid max clock drift")] - MaxClockDrift(#[source] DurationError), - #[error("invalid proof specs")] - ProofSpecs(#[source] TryFromProofSpecError), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromClientStateError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid trust level")] + TrustLevel(#[source] TryFromFractionError), + #[error("invalid trusting period")] + TrustingPeriod(#[source] DurationError), + #[error("invalid unbonding period")] + UnbondingPeriod(#[source] DurationError), + #[error("invalid max clock drift")] + MaxClockDrift(#[source] DurationError), + #[error("invalid proof specs")] + ProofSpecs(#[source] TryFromProofSpecError), + } -impl TryFrom for ClientState { - type Error = TryFromClientStateError; + impl TryFrom for ClientState { + type Error = TryFromClientStateError; - fn try_from( - value: protos::ibc::lightclients::tendermint::v1::ClientState, - ) -> Result { - Ok(Self { - chain_id: value.chain_id, - trust_level: required!(value.trust_level)? - .try_into() - .map_err(TryFromClientStateError::TrustLevel)?, - trusting_period: required!(value.trusting_period)? - .try_into() - .map_err(TryFromClientStateError::TrustingPeriod)?, - unbonding_period: required!(value.unbonding_period)? - .try_into() - .map_err(TryFromClientStateError::TrustingPeriod)?, - max_clock_drift: required!(value.max_clock_drift)? - .try_into() - .map_err(TryFromClientStateError::TrustingPeriod)?, - frozen_height: value.frozen_height.map(Into::into), - latest_height: required!(value.latest_height)?.into(), - proof_specs: value - .proof_specs - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromClientStateError::ProofSpecs)?, - upgrade_path: value.upgrade_path, - }) + fn try_from( + value: protos::ibc::lightclients::tendermint::v1::ClientState, + ) -> Result { + Ok(Self { + chain_id: value.chain_id, + trust_level: required!(value.trust_level)? + .try_into() + .map_err(TryFromClientStateError::TrustLevel)?, + trusting_period: required!(value.trusting_period)? + .try_into() + .map_err(TryFromClientStateError::TrustingPeriod)?, + unbonding_period: required!(value.unbonding_period)? + .try_into() + .map_err(TryFromClientStateError::TrustingPeriod)?, + max_clock_drift: required!(value.max_clock_drift)? + .try_into() + .map_err(TryFromClientStateError::TrustingPeriod)?, + frozen_height: value.frozen_height.map(Into::into), + latest_height: required!(value.latest_height)?.into(), + proof_specs: value + .proof_specs + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromClientStateError::ProofSpecs)?, + upgrade_path: value.upgrade_path, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/tendermint/consensus_state.rs b/lib/unionlabs/src/ibc/lightclients/tendermint/consensus_state.rs index c2f320b4a5..1cc0fa569b 100644 --- a/lib/unionlabs/src/ibc/lightclients/tendermint/consensus_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/tendermint/consensus_state.rs @@ -1,10 +1,8 @@ use macros::model; use crate::{ - errors::{required, InvalidLength, MissingField}, - google::protobuf::timestamp::{Timestamp, TryFromTimestampError}, - hash::H256, - ibc::core::commitment::merkle_root::{MerkleRoot, TryFromMerkleRootError}, + google::protobuf::timestamp::Timestamp, hash::H256, + ibc::core::commitment::merkle_root::MerkleRoot, }; #[model(proto( @@ -18,45 +16,57 @@ pub struct ConsensusState { pub next_validators_hash: H256, } -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromConsensusStateError { - #[error(transparent)] - MissingField(MissingField), - #[error("invalid root")] - Root(#[from] TryFromMerkleRootError), - #[error("invalid next validators hash")] - NextValidatorsHash(#[from] InvalidLength), - #[error("invalid timestamp")] - Timestamp(#[from] TryFromTimestampError), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField}, + google::protobuf::timestamp::proto::TryFromTimestampError, + ibc::{ + core::commitment::merkle_root::proto::TryFromMerkleRootError, + lightclients::tendermint::consensus_state::ConsensusState, + }, + }; + + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromConsensusStateError { + #[error(transparent)] + MissingField(MissingField), + #[error("invalid root")] + Root(#[from] TryFromMerkleRootError), + #[error("invalid next validators hash")] + NextValidatorsHash(#[from] InvalidLength), + #[error("invalid timestamp")] + Timestamp(#[from] TryFromTimestampError), + } -impl TryFrom for ConsensusState { - type Error = TryFromConsensusStateError; + impl TryFrom for ConsensusState { + type Error = TryFromConsensusStateError; - fn try_from( - value: protos::ibc::lightclients::tendermint::v1::ConsensusState, - ) -> Result { - Ok(Self { - timestamp: required!(value.timestamp)? - .try_into() - .map_err(TryFromConsensusStateError::Timestamp)?, - root: required!(value.root)? - .try_into() - .map_err(TryFromConsensusStateError::Root)?, - next_validators_hash: value - .next_validators_hash - .try_into() - .map_err(TryFromConsensusStateError::NextValidatorsHash)?, - }) + fn try_from( + value: protos::ibc::lightclients::tendermint::v1::ConsensusState, + ) -> Result { + Ok(Self { + timestamp: required!(value.timestamp)? + .try_into() + .map_err(TryFromConsensusStateError::Timestamp)?, + root: required!(value.root)? + .try_into() + .map_err(TryFromConsensusStateError::Root)?, + next_validators_hash: value + .next_validators_hash + .try_into() + .map_err(TryFromConsensusStateError::NextValidatorsHash)?, + }) + } } -} -impl From for protos::ibc::lightclients::tendermint::v1::ConsensusState { - fn from(value: ConsensusState) -> Self { - Self { - timestamp: Some(value.timestamp.into()), - root: Some(value.root.into()), - next_validators_hash: value.next_validators_hash.into(), + impl From for protos::ibc::lightclients::tendermint::v1::ConsensusState { + fn from(value: ConsensusState) -> Self { + Self { + timestamp: Some(value.timestamp.into()), + root: Some(value.root.into()), + next_validators_hash: value.next_validators_hash.into(), + } } } } diff --git a/lib/unionlabs/src/ibc/lightclients/tendermint/fraction.rs b/lib/unionlabs/src/ibc/lightclients/tendermint/fraction.rs index 6098d6ec1d..f9f441fdbc 100644 --- a/lib/unionlabs/src/ibc/lightclients/tendermint/fraction.rs +++ b/lib/unionlabs/src/ibc/lightclients/tendermint/fraction.rs @@ -8,54 +8,38 @@ pub struct Fraction { pub denominator: NonZeroU64, } -impl From for protos::ibc::lightclients::tendermint::v1::Fraction { - fn from(value: Fraction) -> Self { - Self { - numerator: value.numerator, - denominator: value.denominator.get(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::ibc::lightclients::tendermint::fraction::Fraction; + + impl From for protos::ibc::lightclients::tendermint::v1::Fraction { + fn from(value: Fraction) -> Self { + Self { + numerator: value.numerator, + denominator: value.denominator.get(), + } } } -} - -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromFractionError { - #[error("zero denominator")] - ZeroDenominator, -} -impl TryFrom for Fraction { - type Error = TryFromFractionError; - - fn try_from( - value: protos::ibc::lightclients::tendermint::v1::Fraction, - ) -> Result { - Ok(Self { - numerator: value.numerator, - denominator: value - .denominator - .try_into() - .map_err(|_| TryFromFractionError::ZeroDenominator)?, - }) + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromFractionError { + #[error("zero denominator")] + ZeroDenominator, } -} - -#[cfg(feature = "ethabi")] -impl From for contracts::glue::IbcLightclientsTendermintV1FractionData { - fn from(value: Fraction) -> Self { - Self { - numerator: value.numerator, - denominator: value.denominator.get(), - } - } -} -#[cfg(feature = "ethabi")] -impl From for Fraction { - fn from(value: contracts::glue::IbcLightclientsTendermintV1FractionData) -> Self { - Self { - numerator: value.numerator, - // TODO: Don't panic here lol - denominator: NonZeroU64::new(value.denominator).expect("non-zero denominator"), + impl TryFrom for Fraction { + type Error = TryFromFractionError; + + fn try_from( + value: protos::ibc::lightclients::tendermint::v1::Fraction, + ) -> Result { + Ok(Self { + numerator: value.numerator, + denominator: value + .denominator + .try_into() + .map_err(|_| TryFromFractionError::ZeroDenominator)?, + }) } } } diff --git a/lib/unionlabs/src/ibc/lightclients/tendermint/header.rs b/lib/unionlabs/src/ibc/lightclients/tendermint/header.rs index de78614fc8..0b8e7cb170 100644 --- a/lib/unionlabs/src/ibc/lightclients/tendermint/header.rs +++ b/lib/unionlabs/src/ibc/lightclients/tendermint/header.rs @@ -1,12 +1,8 @@ use macros::model; use crate::{ - errors::{required, MissingField}, ibc::core::client::height::Height, - tendermint::types::{ - signed_header::{SignedHeader, TryFromSignedHeaderError}, - validator_set::{TryFromValidatorSetError, ValidatorSet}, - }, + tendermint::types::{signed_header::SignedHeader, validator_set::ValidatorSet}, }; #[model(proto(raw(protos::ibc::lightclients::tendermint::v1::Header), into, from))] @@ -17,50 +13,62 @@ pub struct Header { pub trusted_validators: ValidatorSet, } -impl From
for protos::ibc::lightclients::tendermint::v1::Header { - fn from(value: Header) -> Self { - Self { - signed_header: Some(value.signed_header.into()), - validator_set: Some(value.validator_set.into()), - trusted_height: Some(value.trusted_height.into()), - trusted_validators: Some(value.trusted_validators.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + ibc::lightclients::tendermint::header::Header, + tendermint::types::{ + signed_header::proto::TryFromSignedHeaderError, + validator_set::proto::TryFromValidatorSetError, + }, + }; + + impl From
for protos::ibc::lightclients::tendermint::v1::Header { + fn from(value: Header) -> Self { + Self { + signed_header: Some(value.signed_header.into()), + validator_set: Some(value.validator_set.into()), + trusted_height: Some(value.trusted_height.into()), + trusted_validators: Some(value.trusted_validators.into()), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromHeaderError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid signed header")] - SignedHeader(#[source] TryFromSignedHeaderError), - #[error("invalid validator set")] - ValidatorSet(#[source] TryFromValidatorSetError), - #[error("invalid trusted validators")] - TrustedValidators(#[source] TryFromValidatorSetError), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromHeaderError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid signed header")] + SignedHeader(#[source] TryFromSignedHeaderError), + #[error("invalid validator set")] + ValidatorSet(#[source] TryFromValidatorSetError), + #[error("invalid trusted validators")] + TrustedValidators(#[source] TryFromValidatorSetError), + } -impl TryFrom for Header { - type Error = TryFromHeaderError; + impl TryFrom for Header { + type Error = TryFromHeaderError; - fn try_from( - value: protos::ibc::lightclients::tendermint::v1::Header, - ) -> Result { - Ok(Self { - signed_header: value - .signed_header - .ok_or(TryFromHeaderError::MissingField(MissingField( - "signed header", - )))? - .try_into() - .map_err(TryFromHeaderError::SignedHeader)?, - validator_set: required!(value.validator_set)? - .try_into() - .map_err(TryFromHeaderError::ValidatorSet)?, - trusted_height: required!(value.trusted_height)?.into(), - trusted_validators: required!(value.trusted_validators)? - .try_into() - .map_err(TryFromHeaderError::TrustedValidators)?, - }) + fn try_from( + value: protos::ibc::lightclients::tendermint::v1::Header, + ) -> Result { + Ok(Self { + signed_header: value + .signed_header + .ok_or(TryFromHeaderError::MissingField(MissingField( + "signed header", + )))? + .try_into() + .map_err(TryFromHeaderError::SignedHeader)?, + validator_set: required!(value.validator_set)? + .try_into() + .map_err(TryFromHeaderError::ValidatorSet)?, + trusted_height: required!(value.trusted_height)?.into(), + trusted_validators: required!(value.trusted_validators)? + .try_into() + .map_err(TryFromHeaderError::TrustedValidators)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/wasm/client_message.rs b/lib/unionlabs/src/ibc/lightclients/wasm/client_message.rs index aad98a7915..46b333876e 100644 --- a/lib/unionlabs/src/ibc/lightclients/wasm/client_message.rs +++ b/lib/unionlabs/src/ibc/lightclients/wasm/client_message.rs @@ -1,8 +1,5 @@ -use frame_support_procedural::DebugNoBound; use macros::model; -use crate::encoding::{Decode, DecodeErrorOf, Encode, Proto}; - #[model(proto( raw(protos::ibc::lightclients::wasm::v1::ClientMessage), into, @@ -13,32 +10,42 @@ pub struct ClientMessage { pub data: Data, } -impl> From> - for protos::ibc::lightclients::wasm::v1::ClientMessage -{ - fn from(value: ClientMessage) -> Self { - Self { - data: value.data.encode(), +#[cfg(feature = "proto")] +pub mod proto { + use frame_support_procedural::DebugNoBound; + + use crate::{ + encoding::{Decode, DecodeErrorOf, Encode, Proto}, + ibc::lightclients::wasm::client_message::ClientMessage, + }; + + impl> From> + for protos::ibc::lightclients::wasm::v1::ClientMessage + { + fn from(value: ClientMessage) -> Self { + Self { + data: value.data.encode(), + } } } -} -#[derive(DebugNoBound, thiserror::Error)] -pub enum TryFromClientMessageError> { - #[error("error decoding `data`")] - Data(#[source] DecodeErrorOf), -} + #[derive(DebugNoBound, thiserror::Error)] + pub enum TryFromClientMessageError> { + #[error("error decoding `data`")] + Data(#[source] DecodeErrorOf), + } -impl> TryFrom - for ClientMessage -{ - type Error = TryFromClientMessageError; + impl> TryFrom + for ClientMessage + { + type Error = TryFromClientMessageError; - fn try_from( - value: protos::ibc::lightclients::wasm::v1::ClientMessage, - ) -> Result { - Ok(Self { - data: Data::decode(&value.data).map_err(TryFromClientMessageError::Data)?, - }) + fn try_from( + value: protos::ibc::lightclients::wasm::v1::ClientMessage, + ) -> Result { + Ok(Self { + data: Data::decode(&value.data).map_err(TryFromClientMessageError::Data)?, + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/wasm/client_state.rs b/lib/unionlabs/src/ibc/lightclients/wasm/client_state.rs index 8697982d55..139337b153 100644 --- a/lib/unionlabs/src/ibc/lightclients/wasm/client_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/wasm/client_state.rs @@ -1,12 +1,6 @@ -use frame_support_procedural::DebugNoBound; use macros::model; -use crate::{ - encoding::{Decode, DecodeErrorOf, Encode, Proto}, - errors::{required, InvalidLength, MissingField}, - hash::H256, - ibc::core::client::height::Height, -}; +use crate::{hash::H256, ibc::core::client::height::Height}; #[model(proto( raw(protos::ibc::lightclients::wasm::v1::ClientState), @@ -21,71 +15,82 @@ pub struct ClientState { pub latest_height: Height, } -impl From> for protos::ibc::lightclients::wasm::v1::ClientState -where - Data: Encode, -{ - fn from(val: ClientState) -> Self { - Self { - data: val.data.encode(), - checksum: val.checksum.into(), - // #[allow(deprecated)] - latest_height: Some(val.latest_height.into()), +#[cfg(feature = "proto")] +pub mod proto { + use frame_support_procedural::DebugNoBound; + + use crate::{ + encoding::{Decode, DecodeErrorOf, Encode, Proto}, + errors::{required, InvalidLength, MissingField}, + ibc::lightclients::wasm::client_state::ClientState, + }; + + impl From> for protos::ibc::lightclients::wasm::v1::ClientState + where + Data: Encode, + { + fn from(val: ClientState) -> Self { + Self { + data: val.data.encode(), + checksum: val.checksum.into(), + // #[allow(deprecated)] + latest_height: Some(val.latest_height.into()), + } } } -} -#[derive(DebugNoBound, thiserror::Error)] -pub enum TryFromWasmClientStateError> { - #[error(transparent)] - MissingField(MissingField), - #[error("unable to decode wasm client state data")] - Data(#[source] DecodeErrorOf), - #[error("invalid checksum")] - Checksum(#[from] InvalidLength), -} + #[derive(DebugNoBound, thiserror::Error)] + pub enum TryFromWasmClientStateError> { + #[error(transparent)] + MissingField(MissingField), + #[error("unable to decode wasm client state data")] + Data(#[source] DecodeErrorOf), + #[error("invalid checksum")] + Checksum(#[from] InvalidLength), + } -impl> Clone - for TryFromWasmClientStateError -{ - fn clone(&self) -> Self { - match self { - Self::MissingField(err) => Self::MissingField(err.clone()), - Self::Data(err) => Self::Data(err.clone()), - Self::Checksum(err) => Self::Checksum(err.clone()), + impl> Clone + for TryFromWasmClientStateError + { + fn clone(&self) -> Self { + match self { + Self::MissingField(err) => Self::MissingField(err.clone()), + Self::Data(err) => Self::Data(err.clone()), + Self::Checksum(err) => Self::Checksum(err.clone()), + } } } -} -impl> PartialEq - for TryFromWasmClientStateError -{ - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Self::MissingField(this), Self::MissingField(other)) => this == other, - (Self::Data(this), Self::Data(other)) => this == other, - (Self::Checksum(this), Self::Checksum(other)) => this == other, - _ => false, + impl> PartialEq + for TryFromWasmClientStateError + { + fn eq(&self, other: &Self) -> bool { + match (self, other) { + (Self::MissingField(this), Self::MissingField(other)) => this == other, + (Self::Data(this), Self::Data(other)) => this == other, + (Self::Checksum(this), Self::Checksum(other)) => this == other, + _ => false, + } } } -} -impl TryFrom for ClientState -where - Data: Decode, -{ - type Error = TryFromWasmClientStateError; + impl TryFrom for ClientState + where + Data: Decode, + { + type Error = TryFromWasmClientStateError; - fn try_from( - value: protos::ibc::lightclients::wasm::v1::ClientState, - ) -> Result { - Ok(Self { - data: Data::decode(&value.data).map_err(TryFromWasmClientStateError::Data)?, - checksum: value - .checksum - .try_into() - .map_err(TryFromWasmClientStateError::Checksum)?, - latest_height: required!(value.latest_height)?.into(), - }) + fn try_from( + value: protos::ibc::lightclients::wasm::v1::ClientState, + ) -> Result { + Ok(Self { + data: Data::decode(&value.data).map_err(TryFromWasmClientStateError::Data)?, + checksum: value + .checksum + .try_into() + .map_err(TryFromWasmClientStateError::Checksum)?, + latest_height: required!(value.latest_height)?.into(), + }) + } } } diff --git a/lib/unionlabs/src/ibc/lightclients/wasm/consensus_state.rs b/lib/unionlabs/src/ibc/lightclients/wasm/consensus_state.rs index 7bcd75a7bf..2edf75adc0 100644 --- a/lib/unionlabs/src/ibc/lightclients/wasm/consensus_state.rs +++ b/lib/unionlabs/src/ibc/lightclients/wasm/consensus_state.rs @@ -1,8 +1,4 @@ -use frame_support_procedural::DebugNoBound; use macros::model; -use static_assertions::assert_impl_all; - -use crate::encoding::{Decode, DecodeErrorOf, Encode, Proto}; #[model(proto( raw(protos::ibc::lightclients::wasm::v1::ConsensusState), @@ -14,55 +10,70 @@ pub struct ConsensusState { pub data: Data, } -impl> From> - for protos::ibc::lightclients::wasm::v1::ConsensusState -{ - fn from(value: ConsensusState) -> Self { - protos::ibc::lightclients::wasm::v1::ConsensusState { - data: value.data.encode(), +#[cfg(feature = "proto")] +pub mod proto { + use frame_support_procedural::DebugNoBound; + use static_assertions::assert_impl_all; + + use crate::{ + encoding::{Decode, DecodeErrorOf, Encode, Proto}, + ibc::lightclients::wasm::consensus_state::ConsensusState, + }; + + impl> From> + for protos::ibc::lightclients::wasm::v1::ConsensusState + { + fn from(value: ConsensusState) -> Self { + protos::ibc::lightclients::wasm::v1::ConsensusState { + data: value.data.encode(), + } } } -} -#[derive(DebugNoBound, thiserror::Error)] -pub enum TryFromWasmConsensusStateError> { - #[error("unable to decode wasm consensus state data")] - Data(#[source] DecodeErrorOf), -} + #[derive(DebugNoBound, thiserror::Error)] + pub enum TryFromWasmConsensusStateError> { + #[error("unable to decode wasm consensus state data")] + Data(#[source] DecodeErrorOf), + } -impl> Clone - for TryFromWasmConsensusStateError -{ - fn clone(&self) -> Self { - match self { - Self::Data(err) => Self::Data(err.clone()), + impl> Clone + for TryFromWasmConsensusStateError + { + fn clone(&self) -> Self { + match self { + Self::Data(err) => Self::Data(err.clone()), + } } } -} -impl> PartialEq - for TryFromWasmConsensusStateError -{ - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Self::Data(this), Self::Data(other)) => this == other, + impl> PartialEq + for TryFromWasmConsensusStateError + { + fn eq(&self, other: &Self) -> bool { + match (self, other) { + (Self::Data(this), Self::Data(other)) => this == other, + } } } -} -impl TryFrom for ConsensusState -where - Data: Decode, -{ - type Error = TryFromWasmConsensusStateError; + impl TryFrom for ConsensusState + where + Data: Decode, + { + type Error = TryFromWasmConsensusStateError; - fn try_from( - value: protos::ibc::lightclients::wasm::v1::ConsensusState, - ) -> Result { - Ok(Self { - data: Data::decode(&value.data).map_err(TryFromWasmConsensusStateError::Data)?, - }) + fn try_from( + value: protos::ibc::lightclients::wasm::v1::ConsensusState, + ) -> Result { + Ok(Self { + data: Data::decode(&value.data).map_err(TryFromWasmConsensusStateError::Data)?, + }) + } } -} -assert_impl_all!(TryFromWasmConsensusStateError: core::error::Error); + assert_impl_all!( + TryFromWasmConsensusStateError< + crate::ibc::lightclients::scroll::consensus_state::ConsensusState + >: core::error::Error + ); +} diff --git a/lib/unionlabs/src/ics24.rs b/lib/unionlabs/src/ics24.rs index 8b440f108f..9f05c7c6ff 100644 --- a/lib/unionlabs/src/ics24.rs +++ b/lib/unionlabs/src/ics24.rs @@ -1,235 +1,422 @@ -use core::{fmt::Display, num::NonZeroU64, str::FromStr}; +use core::num::NonZeroU64; -use macros::{ibc_path, model}; -use serde::{Deserialize, Serialize}; -use serde_utils::Hex; +use enumorph::Enumorph; +use macros::model; +use sha2::Digest; +use sha3::Keccak256; use crate::{ hash::H256, - ibc::core::{ - channel::channel::Channel, client::height::Height, - connection::connection_end::ConnectionEnd, - }, - id::{ChannelId, ClientId, ConnectionId, PortId}, - traits::Member, + ibc::core::client::height::Height, + id::{ChannelId, ClientId, ConnectionId, PortId, CHANNEL_ID_PREFIX, CONNECTION_ID_PREFIX}, }; -/// `IbcPath` represents the path to a light client's ibc storage. The values stored at each path -/// are strongly typed, i.e. `connections/{connection_id}` always stores a [`ConnectionEnd`]. -pub trait IbcPath: Member + Display + TryFrom + Into { - type Value: Member; -} +/// 0x0100000000000000000000000000000000000000000000000000000000000000 +pub const COMMITMENT_MAGIC: H256 = { + let mut bz = [0; 32]; + bz[0] = 1; + H256::new(bz) +}; +pub const COMMITMENT_NULL: H256 = H256::new([0; 32]); + +const CLIENT_STATE: u8 = 0x00; +const CONSENSUS_STATE: u8 = 0x01; +const CONNECTIONS: u8 = 0x02; +const CHANNELS: u8 = 0x03; +const PACKETS: u8 = 0x04; +const PACKET_ACKS: u8 = 0x05; +const NEXT_SEQ_SEND: u8 = 0x06; +const NEXT_SEQ_RECV: u8 = 0x07; +const NEXT_SEQ_ACK: u8 = 0x08; #[model] -#[derive(Hash, derive_more::Display, clap::Subcommand, enumorph::Enumorph)] +#[derive(Hash, Enumorph)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub enum Path { - #[display(fmt = "{_0}")] ClientState(ClientStatePath), - #[display(fmt = "{_0}")] ClientConsensusState(ClientConsensusStatePath), - #[display(fmt = "{_0}")] Connection(ConnectionPath), - #[display(fmt = "{_0}")] ChannelEnd(ChannelEndPath), - #[display(fmt = "{_0}")] Commitment(CommitmentPath), - #[display(fmt = "{_0}")] Acknowledgement(AcknowledgementPath), - #[display(fmt = "{_0}")] Receipt(ReceiptPath), - #[display(fmt = "{_0}")] NextSequenceSend(NextSequenceSendPath), - #[display(fmt = "{_0}")] NextSequenceRecv(NextSequenceRecvPath), - #[display(fmt = "{_0}")] NextSequenceAck(NextSequenceAckPath), - #[display(fmt = "{_0}")] NextConnectionSequence(NextConnectionSequencePath), - #[display(fmt = "{_0}")] NextClientSequence(NextClientSequencePath), } -impl FromStr for Path { - type Err = PathParseError; - - fn from_str(s: &str) -> Result { - s.parse() - .map(Self::ClientState) - .or_else(|_| s.parse().map(Self::ClientConsensusState)) - .or_else(|_| s.parse().map(Self::Connection)) - .or_else(|_| s.parse().map(Self::ChannelEnd)) - .or_else(|_| s.parse().map(Self::Commitment)) - .or_else(|_| s.parse().map(Self::Acknowledgement)) - .or_else(|_| s.parse().map(Self::Receipt)) - .or_else(|_| s.parse().map(Self::NextSequenceSend)) - .or_else(|_| s.parse().map(Self::NextSequenceRecv)) - .or_else(|_| s.parse().map(Self::NextSequenceAck)) - .or_else(|_| s.parse().map(Self::NextConnectionSequence)) - } -} - /// The raw client state bytes as encoded by the light client. -#[ibc_path("clients/{client_id}/clientState", Hex>)] +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct ClientStatePath { pub client_id: ClientId, } +impl ClientStatePath { + #[must_use] + pub fn ics24_commitment_path(&self, prefix: impl AsRef) -> String { + format!( + "clients/{}-{}/clientState", + prefix.as_ref(), + self.client_id.id() + ) + } + + #[must_use] + pub fn commitments_key(&self) -> H256 { + Keccak256::new() + .chain_update([CLIENT_STATE]) + .chain_update(self.client_id.id().to_be_bytes()) + .finalize() + .into() + } +} + /// The raw consensus state bytes as encoded by the light client. -#[ibc_path("clients/{client_id}/consensusStates/{height}", Hex>)] +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct ClientConsensusStatePath { pub client_id: ClientId, pub height: Height, } -// REVIEW: Make this an `Option`? -#[ibc_path("connections/{connection_id}", Option)] +impl ClientConsensusStatePath { + #[must_use] + pub fn ics24_commitment_path(&self, prefix: impl AsRef) -> String { + format!( + "clients/{}-{}/consensusStates/{}", + prefix.as_ref(), + self.client_id.id(), + self.height + ) + } + + #[must_use] + pub fn commitments_key(&self) -> H256 { + Keccak256::new() + .chain_update([CONSENSUS_STATE]) + .chain_update(self.client_id.id().to_be_bytes()) + .chain_update(self.height.height().to_be_bytes()) + .finalize() + .into() + } +} + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct ConnectionPath { pub connection_id: ConnectionId, } -// REVIEW: Make this an `Option`? -#[ibc_path( - "channelEnds/ports/{port_id}/channels/{channel_id}", - Option -)] +impl ConnectionPath { + #[must_use] + pub fn ics24_commitment_path(&self) -> String { + format!( + "connections/{CONNECTION_ID_PREFIX}-{}", + self.connection_id.id(), + ) + } + + #[must_use] + pub fn commitments_key(&self) -> H256 { + Keccak256::new() + .chain_update([CONNECTIONS]) + .chain_update(self.connection_id.id().to_be_bytes()) + .finalize() + .into() + } +} + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct ChannelEndPath { - pub port_id: PortId, pub channel_id: ChannelId, } -#[ibc_path( - "commitments/ports/{port_id}/channels/{channel_id}/sequences/{sequence}", - Option -)] +impl ChannelEndPath { + #[must_use] + pub fn ics24_commitment_path(&self, port_id: &PortId) -> String { + format!( + "channelEnds/ports/{}/channels/{CHANNEL_ID_PREFIX}-{}", + port_id, + self.channel_id.id(), + ) + } + + #[must_use] + pub fn commitments_key(&self) -> H256 { + Keccak256::new() + .chain_update([CHANNELS]) + .chain_update(self.channel_id.id().to_be_bytes()) + .finalize() + .into() + } +} + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct CommitmentPath { - pub port_id: PortId, pub channel_id: ChannelId, pub sequence: NonZeroU64, } +impl CommitmentPath { + #[must_use] + pub fn ics24_commitment_path(&self, port_id: &PortId) -> String { + format!( + "commitments/ports/{}/channels/{CHANNEL_ID_PREFIX}-{}/sequences/{}", + port_id, + self.channel_id.id(), + self.sequence, + ) + } + + #[must_use] + pub fn commitments_key(&self) -> H256 { + Keccak256::new() + .chain_update([PACKETS]) + .chain_update(self.channel_id.id().to_be_bytes()) + .chain_update(self.sequence.get().to_be_bytes()) + .finalize() + .into() + } +} + /// SHA-256 of the packet acknowledgement. /// /// If the packet has not yet been acknowledged (either because the packet does not exist or the packet has not been acknowledged yet), then the acknowledgement commitment is unset. -#[ibc_path("acks/ports/{port_id}/channels/{channel_id}/sequences/{sequence}", Option)] +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct AcknowledgementPath { - pub port_id: PortId, pub channel_id: ChannelId, pub sequence: NonZeroU64, } +impl AcknowledgementPath { + #[must_use] + pub fn ics24_commitment_path(&self, port_id: &PortId) -> String { + format!( + "acks/ports/{}/channels/{CHANNEL_ID_PREFIX}-{}/sequences/{}", + port_id, + self.channel_id.id(), + self.sequence, + ) + } + + #[must_use] + pub fn commitments_key(&self) -> H256 { + Keccak256::new() + .chain_update([PACKET_ACKS]) + .chain_update(self.channel_id.id().to_be_bytes()) + .chain_update(self.sequence.get().to_be_bytes()) + .finalize() + .into() + } +} + /// This defaults to `false` for packets which have not yet been received. -#[ibc_path( - "receipts/ports/{port_id}/channels/{channel_id}/sequences/{sequence}", - bool -)] +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct ReceiptPath { - pub port_id: PortId, pub channel_id: ChannelId, pub sequence: NonZeroU64, } -#[ibc_path("nextSequenceSend/ports/{port_id}/channels/{channel_id}", u64)] +impl ReceiptPath { + #[must_use] + pub fn ics24_commitment_path(&self, port_id: &PortId) -> String { + format!( + "receipts/ports/{}/channels/{CHANNEL_ID_PREFIX}-{}/sequences/{}", + port_id, + self.channel_id.id(), + self.sequence, + ) + } + + #[must_use] + pub fn commitments_key(&self) -> H256 { + Keccak256::new() + .chain_update([PACKETS]) + .chain_update(self.channel_id.id().to_be_bytes()) + .chain_update(self.sequence.get().to_be_bytes()) + .finalize() + .into() + } +} + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct NextSequenceSendPath { - pub port_id: PortId, pub channel_id: ChannelId, } -#[ibc_path("nextSequenceRecv/ports/{port_id}/channels/{channel_id}", u64)] +impl NextSequenceSendPath { + #[must_use] + pub fn ics24_commitment_path(&self, port_id: &PortId) -> String { + format!( + "nextSequenceSend/ports/{}/channels/{CHANNEL_ID_PREFIX}-{}", + port_id, + self.channel_id.id(), + ) + } + + #[must_use] + pub fn commitments_key(&self) -> H256 { + Keccak256::new() + .chain_update([NEXT_SEQ_SEND]) + .chain_update(self.channel_id.id().to_be_bytes()) + .finalize() + .into() + } +} + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct NextSequenceRecvPath { - pub port_id: PortId, pub channel_id: ChannelId, } -#[ibc_path("nextSequenceAck/ports/{port_id}/channels/{channel_id}", u64)] +impl NextSequenceRecvPath { + #[must_use] + pub fn ics24_commitment_path(&self, port_id: &PortId) -> String { + format!( + "nextSequenceRecv/ports/{}/channels/{CHANNEL_ID_PREFIX}-{}", + port_id, + self.channel_id.id(), + ) + } + + #[must_use] + pub fn commitments_key(&self) -> H256 { + Keccak256::new() + .chain_update([NEXT_SEQ_RECV]) + .chain_update(self.channel_id.id().to_be_bytes()) + .finalize() + .into() + } +} + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct NextSequenceAckPath { - pub port_id: PortId, pub channel_id: ChannelId, } -#[ibc_path("nextConnectionSequence", u64)] +impl NextSequenceAckPath { + #[must_use] + pub fn ics24_commitment_path(&self, port_id: &PortId) -> String { + format!( + "nextSequenceAck/ports/{}/channels/{CHANNEL_ID_PREFIX}-{}", + port_id, + self.channel_id.id(), + ) + } + + #[must_use] + pub fn commitments_key(&self) -> H256 { + Keccak256::new() + .chain_update([NEXT_SEQ_ACK]) + .chain_update(self.channel_id.id().to_be_bytes()) + .finalize() + .into() + } +} + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct NextConnectionSequencePath {} -#[ibc_path("nextClientSequence", u64)] +impl NextConnectionSequencePath { + #[must_use] + pub fn ics24_commitment_path(&self) -> String { + "nextConnectionSequence".to_owned() + } +} + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "valuable", derive(valuable::Valuable))] pub struct NextClientSequencePath {} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum PathParseError { - #[error("invalid static segment, expected `{expected}` but found `{found}`")] - InvalidStaticSegment { - expected: &'static str, - found: String, - }, - #[error("missing static segment `{0}`")] - MissingStaticSegment(&'static str), - // TODO: Figure out a way to provide more context here? - #[error("missing segment")] - MissingSegment, - #[error("too many segments")] - TooManySegments, - // contains the stringified parse error - #[error("error parsing segment: {0}")] - Parse(String), +impl NextClientSequencePath { + #[must_use] + pub fn ics24_commitment_path(&self) -> String { + "nextClientSequence".to_owned() + } } #[cfg(test)] mod tests { use super::*; - use crate::{ibc::core::client::height::Height, validated::ValidateT}; + use crate::ibc::core::client::height::Height; #[test] fn parse_ibc_paths_from_str() { assert_eq!( - "clients/08-wasm-0/clientState".parse::().unwrap(), - Path::ClientState(ClientStatePath { - client_id: "08-wasm-0".to_string().validate().unwrap() - }) + ClientStatePath { + client_id: ClientId::new(0) + } + .ics24_commitment_path("08-wasm"), + "clients/08-wasm-0/clientState".to_string(), + ); + assert_eq!( + ClientConsensusStatePath { + client_id: ClientId::new(0), + height: Height::new(1) + } + .ics24_commitment_path("08-wasm"), + "clients/08-wasm-0/consensusStates/0-1", ); assert_eq!( - "clients/08-wasm-0/consensusStates/0-1" - .parse::() - .unwrap(), - Path::ClientConsensusState(ClientConsensusStatePath { - client_id: "08-wasm-0".to_string().validate().unwrap(), - height: Height { - revision_number: 0, - revision_height: 1 - } - }) + ClientConsensusStatePath { + client_id: ClientId::new(0), + height: Height::new_with_revision(1, 1) + } + .ics24_commitment_path("08-wasm"), + "clients/08-wasm-0/consensusStates/1-1", ); assert_eq!( - "connections/connection-0".parse::().unwrap(), - Path::Connection(ConnectionPath { - connection_id: "connection-0".to_string().validate().unwrap() - }) + ConnectionPath { + connection_id: ConnectionId::new(0) + } + .ics24_commitment_path(), + "connections/connection-0", ); assert_eq!( - "channelEnds/ports/port/channels/channel-0" - .parse::() - .unwrap(), - Path::ChannelEnd(ChannelEndPath { - port_id: "port".to_string().validate().unwrap(), - channel_id: "channel-0".to_string().validate().unwrap() - }) + ChannelEndPath { + channel_id: ChannelId::new(0), + } + .ics24_commitment_path(&"port".parse().unwrap()), + "channelEnds/ports/port/channels/channel-0", ); assert_eq!( - "commitments/ports/port/channels/channel-0/sequences/1" - .parse::() - .unwrap(), - Path::Commitment(CommitmentPath { - port_id: "port".to_string().validate().unwrap(), - channel_id: "channel-0".to_string().validate().unwrap(), + CommitmentPath { + channel_id: ChannelId::new(0), sequence: 1.try_into().unwrap() - }) + } + .ics24_commitment_path(&"port".parse().unwrap()), + "commitments/ports/port/channels/channel-0/sequences/1", ); assert_eq!( - "acks/ports/port/channels/channel-0/sequences/1" - .parse::() - .unwrap(), - Path::Acknowledgement(AcknowledgementPath { - port_id: "port".to_string().validate().unwrap(), - channel_id: "channel-0".to_string().validate().unwrap(), + AcknowledgementPath { + channel_id: ChannelId::new(0), sequence: 1.try_into().unwrap() - }) + } + .ics24_commitment_path(&"port".parse().unwrap()), + "acks/ports/port/channels/channel-0/sequences/1", ); } } diff --git a/lib/unionlabs/src/id.rs b/lib/unionlabs/src/id.rs index 66bd1878d9..70d1be2bb5 100644 --- a/lib/unionlabs/src/id.rs +++ b/lib/unionlabs/src/id.rs @@ -1,125 +1,336 @@ -use core::fmt::Debug; - -use crate::{ - errors::{ExpectedLength, InvalidLength}, - validated::{Validate, Validated}, +use alloc::borrow::Cow; +use core::{ + fmt::{self, Debug}, + num::ParseIntError, + str::FromStr, }; -pub type PortIdValidator = (Bounded<2, 128>, Ics024IdentifierCharacters); -pub type PortId = Validated; +use macros::model; + +use crate::errors::{ExpectedLength, InvalidLength}; + +const DELIMITER: char = '-'; + +pub const CONNECTION_ID_PREFIX: &str = "connection"; +pub const CHANNEL_ID_PREFIX: &str = "channel"; + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "serde", serde(transparent))] +#[debug("ClientId({})", self.0)] +#[cfg_attr(feature = "schemars", derive(::schemars::JsonSchema))] +#[cfg_attr( + feature = "valuable", + derive(valuable::Valuable), + valuable(transparent) +)] +pub struct ClientId(#[doc(hidden)] u32); + +impl ClientId { + #[must_use] + pub const fn new(id: u32) -> Self { + Self(id) + } + + pub fn parse_prefixed(s: &str) -> Result<(&str, Self), ParsePrefixedIdError> { + // NOTE: rsplit bc prefixes can contain `-` + let Some((prefix, id)) = s.rsplit_once(DELIMITER) else { + return Err(ParsePrefixedIdError::MissingPrefix); + }; + + id.parse() + .map(|id| (prefix, Self(id))) + .map_err(ParsePrefixedIdError::ParseIntError) + } + + #[must_use] + pub fn to_string_prefixed(&self, prefix: &str) -> String { + format!("{prefix}-{}", self.0) + } -pub type ClientIdValidator = (Bounded<9, 64>, Ics024IdentifierCharacters); -pub type ClientId = Validated; + #[must_use] + pub const fn id(&self) -> u32 { + self.0 + } +} -pub type ConnectionIdValidator = (Bounded<10, 64>, Ics024IdentifierCharacters); -pub type ConnectionId = Validated; +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "serde", serde(transparent))] +#[debug("ConnectionId({})", self.0)] +#[cfg_attr(feature = "schemars", derive(::schemars::JsonSchema))] +#[cfg_attr( + feature = "valuable", + derive(valuable::Valuable), + valuable(transparent) +)] +pub struct ConnectionId(#[doc(hidden)] u32); -pub type ChannelIdValidator = (Bounded<8, 64>, Ics024IdentifierCharacters); -pub type ChannelId = Validated; +impl ConnectionId { + #[must_use] + pub const fn new(id: u32) -> Self { + Self(id) + } -#[cfg(feature = "schemars")] -static_assertions::assert_impl_all!(ClientId: schemars::JsonSchema); + pub fn parse_prefixed(s: &str) -> Result { + let Some((prefix, id)) = s.split_once(DELIMITER) else { + return Err(ParsePrefixedIdError::MissingPrefix); + }; -// https://github.com/cosmos/ibc/tree/main/spec/core/ics-024-host-requirements#paths-identifiers-separators -pub struct Ics024IdentifierCharacters; + if prefix != CONNECTION_ID_PREFIX { + return Err(ParsePrefixedIdError::UnexpectedPrefix { + expected: CONNECTION_ID_PREFIX, + found: s.to_owned(), + }); + } + + id.parse() + .map(Self) + .map_err(ParsePrefixedIdError::ParseIntError) + } + + #[must_use] + pub fn to_string_prefixed(&self) -> String { + format!("{CONNECTION_ID_PREFIX}-{}", self.0) + } + + #[must_use] + pub const fn id(&self) -> u32 { + self.0 + } +} + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "serde", serde(transparent))] +#[debug("ChannelId({})", self.0)] +#[cfg_attr(feature = "schemars", derive(::schemars::JsonSchema))] +#[cfg_attr( + feature = "valuable", + derive(valuable::Valuable), + valuable(transparent) +)] +pub struct ChannelId(#[doc(hidden)] u32); + +impl ChannelId { + #[must_use] + pub const fn new(id: u32) -> Self { + Self(id) + } + + pub fn parse_prefixed(s: &str) -> Result { + let Some((prefix, id)) = s.split_once(DELIMITER) else { + return Err(ParsePrefixedIdError::MissingPrefix); + }; + + if prefix != CHANNEL_ID_PREFIX { + return Err(ParsePrefixedIdError::UnexpectedPrefix { + expected: CHANNEL_ID_PREFIX, + found: s.to_owned(), + }); + } + + id.parse() + .map(Self) + .map_err(ParsePrefixedIdError::ParseIntError) + } + + #[must_use] + pub fn to_string_prefixed(&self) -> String { + format!("{CHANNEL_ID_PREFIX}-{}", self.0) + } + + #[must_use] + pub const fn id(&self) -> u32 { + self.0 + } +} + +#[model] +#[derive(Hash)] +#[cfg_attr(feature = "serde", serde(try_from = "String", into = "String"))] +#[debug("PortId({})", self.0)] +#[cfg_attr(feature = "schemars", derive(::schemars::JsonSchema))] +pub struct PortId(#[doc(hidden)] Cow<'static, str>); + +#[cfg(feature = "valuable")] +impl valuable::Valuable for PortId { + fn as_value(&self) -> valuable::Value<'_> { + valuable::Value::String(&self.0) + } + + fn visit(&self, visit: &mut dyn valuable::Visit) { + visit.visit_value(self.as_value()); + } +} #[derive(Debug, Clone, PartialEq, thiserror::Error)] -#[error("invalid ics-024 identifier character: `{0}`")] -pub struct InvalidIcs024IdentifierCharacter(char); - -impl> Validate for Ics024IdentifierCharacters { - type Error = InvalidIcs024IdentifierCharacter; - - fn validate(s: T) -> Result { - for c in s.as_ref().chars() { - match c { - 'a'..='z' - | 'A'..='Z' - | '0'..='9' - | '.' - | '_' - | '+' - | '-' - | '#' - | '[' - | ']' - | '<' - | '>' => {} - _ => return Err(InvalidIcs024IdentifierCharacter(c)), - } +pub enum ParsePrefixedIdError { + #[error("missing prefix")] + MissingPrefix, + #[error("expected prefix `{expected}` but found `{found}`")] + UnexpectedPrefix { + expected: &'static str, + found: String, + }, + #[error("error parsing integer portion of id")] + ParseIntError(#[from] ParseIntError), +} + +impl PortId { + pub const MIN_LEN: usize = 2; + pub const MAX_LEN: usize = 128; + + pub fn new(s: impl Into>) -> Result { + let s: Cow<'_, str> = s.into(); + + validate_id(&s, Self::MIN_LEN, Self::MAX_LEN)?; + + Ok(Self(s)) + } + + pub const fn new_static(s: &'static str) -> Result { + if let Err(e) = validate_id(s, Self::MIN_LEN, Self::MAX_LEN) { + return Err(e); } - Ok(s) + Ok(Self(Cow::Borrowed(s))) + } + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 } } -pub struct Bounded; +const fn validate_id(s: &str, min_len: usize, max_len: usize) -> Result<(), Ics24IdParseError> { + let len = s.len(); -impl, const MIN: usize, const MAX: usize> Validate for Bounded { - type Error = InvalidLength; + if len < min_len || len > max_len { + return Err(Ics24IdParseError::InvalidLength(InvalidLength { + expected: ExpectedLength::Between(min_len, max_len), + found: len, + })); + } - fn validate(s: T) -> Result { - const { assert!(MIN <= MAX) }; + let mut i = len - 1; + let bz = s.as_bytes(); - let len = s.as_ref().len(); + // https://github.com/cosmos/ibc/tree/main/spec/core/ics-024-host-requirements#paths-identifiers-separators + loop { + if i == 0 { + break; + } - if (MIN..=MAX).contains(&len) { - Ok(s) - } else { - Err(InvalidLength { - expected: ExpectedLength::Between(MIN, MAX), - found: len, - }) + let c = bz[i]; + match c { + b'a'..=b'z' + | b'A'..=b'Z' + | b'0'..=b'9' + | b'.' + | b'_' + | b'+' + | b'-' + | b'#' + | b'[' + | b']' + | b'<' + | b'>' => {} + _ => { + return Err(Ics24IdParseError::InvalidCharacter( + InvalidIcs024IdentifierCharacter(c), + )) + } } + + i -= 1; } + + Ok(()) } -#[cfg(test)] -mod tests { - use alloc::borrow::Cow; +impl From for String { + fn from(value: PortId) -> Self { + value.0.into() + } +} - use super::*; - use crate::validated::ValidateT; +impl TryFrom for PortId { + type Error = Ics24IdParseError; - fn ics024( - s: Cow<'_, str>, - ) -> Result, >>::Error> { - s.validate::() - .map(Validated::value) + fn try_from(value: String) -> Result { + Self::new(value) } +} - #[test] - fn ics024_identifier_characters() { - assert_eq!(ics024("".into()), Ok("".into())); - assert_eq!(ics024("valid".into()), Ok("valid".into())); - assert_eq!( - ics024( - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890._+-#[]<>".into() - ), - Ok("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890._+-#[]<>".into()) - ); - assert_eq!( - ics024("/".into()), - Err(InvalidIcs024IdentifierCharacter('/')) - ); +impl FromStr for PortId { + type Err = Ics24IdParseError; + + fn from_str(s: &str) -> Result { + Self::new(s.to_owned()) } +} - fn bound( - s: Cow<'_, str>, - ) -> Result, as Validate>>::Error> { - s.validate::>().map(Validated::value) +impl fmt::Display for PortId { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::Display::fmt(&self.0, f) } +} + +#[derive(Debug, Clone, PartialEq, thiserror::Error)] +pub enum Ics24IdParseError { + #[error(transparent)] + InvalidCharacter(InvalidIcs024IdentifierCharacter), + #[error(transparent)] + InvalidLength(InvalidLength), +} + +// #[cfg(feature = "schemars")] +// static_assertions::assert_impl_all!(ClientId: schemars::JsonSchema); + +#[derive(Debug, Clone, PartialEq, thiserror::Error)] +#[error("invalid ics-024 identifier character: `{0:x}`")] +pub struct InvalidIcs024IdentifierCharacter(u8); + +#[cfg(test)] +mod tests { + use super::*; #[test] - fn bounded() { - assert_eq!(bound::<0, 1>("".into()), Ok("".into())); - assert_eq!(bound::<0, 1>("a".into()), Ok("a".into())); + fn port_id() { assert_eq!( - bound::<0, 1>("aa".into()), - Err(InvalidLength { - expected: ExpectedLength::Between(0, 1), - found: 2 - }) + PortId::new(""), + Err(Ics24IdParseError::InvalidLength(InvalidLength { + expected: ExpectedLength::Between(PortId::MIN_LEN, PortId::MAX_LEN), + found: 0 + })) ); + assert_eq!( + PortId::new("a"), + Err(Ics24IdParseError::InvalidLength(InvalidLength { + expected: ExpectedLength::Between(PortId::MIN_LEN, PortId::MAX_LEN), + found: 1 + })) + ); + assert_eq!(PortId::new("aa").as_ref().map(PortId::as_str), Ok("aa")); + assert_eq!( + PortId::new("a".repeat(PortId::MAX_LEN)) + .as_ref() + .map(PortId::as_str), + Ok(&*"a".repeat(PortId::MAX_LEN)) + ); + + // assert_eq!(ics024("".into()), Ok("".into())); + // assert_eq!(ics024("valid".into()), Ok("valid".into())); + // assert_eq!( + // ics024( + // "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890._+-#[]<>".into() + // ), + // Ok("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890._+-#[]<>".into()) + // ); + // assert_eq!( + // ics024("/".into()), + // Err(InvalidIcs024IdentifierCharacter(b'/')) + // ); } } diff --git a/lib/unionlabs/src/lib.rs b/lib/unionlabs/src/lib.rs index 9ef30ccce9..813615e103 100644 --- a/lib/unionlabs/src/lib.rs +++ b/lib/unionlabs/src/lib.rs @@ -21,14 +21,9 @@ use core::{ str::FromStr, }; -use serde::{Deserialize, Serialize}; pub use typenum; -use crate::{ - ibc::core::client::height::{Height, HeightFromStrError}, - id::Bounded, - validated::Validated, -}; +use crate::ibc::core::client::height::{Height, HeightFromStrError}; pub const DELAY_PERIOD: u64 = 0; @@ -70,9 +65,6 @@ pub mod berachain; /// Types specific to aptos. pub mod aptos; -/// Wrapper types around [`milagro_bls`] types, providing more conversions and a simpler signing interface. -pub mod bls; - /// Well-known events emitted by ibc-enabled chains. pub mod events; @@ -82,8 +74,6 @@ pub mod constants; pub mod ics24; -pub mod validated; - pub mod hash; pub mod encoding; @@ -96,8 +86,6 @@ pub mod id; pub mod signer; -pub mod traits; - // TODO: Replace with something like pub mod uint; @@ -109,6 +97,7 @@ pub mod errors; #[allow(clippy::missing_panics_doc)] pub mod test_utils; +#[cfg(feature = "proto")] #[derive(Debug, Clone, PartialEq, thiserror::Error)] pub enum TryFromProtoBytesError { #[error("unable to convert from the raw prost type")] @@ -117,6 +106,7 @@ pub enum TryFromProtoBytesError { Decode(#[source] prost::DecodeError), } +#[cfg(feature = "proto")] pub trait TypeUrl { fn type_url() -> String; } @@ -127,13 +117,9 @@ pub enum TryFromEthAbiBytesError { #[error("unable to convert from the raw ethers type")] TryFromEthAbi(#[source] E), #[error("unable to decode from raw ethabi bytes")] - Decode(ethers_core::abi::AbiError), + Decode(alloy_core::sol_types::Error), } -/// An empty string. Will only parse/serialize to/from `""`. -pub type EmptyString = Validated; -pub type EmptyStringValidator = Bounded<0, 0>; - #[doc(hidden)] pub use paste::paste; @@ -153,8 +139,7 @@ macro_rules! export_wasm_client_type { /// /// We need to be able to determine the light client from the light client code itself (not instantiated yet). /// Light clients supported by voyager must export a `#[no_mangle] static WASM_CLIENT_TYPE_: u8 = 0` variable. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "snake_case")] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum WasmClientType { EthereumMinimal, EthereumMainnet, @@ -169,87 +154,8 @@ pub enum WasmClientType { Movement, } -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "snake_case")] -pub enum ClientType { - Wasm(WasmClientType), - Tendermint, - Cometbls, - _11Cometbls, -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn wasm_client_type_serde() { - assert_eq!( - r#"{"wasm":"ethereum_minimal"}"#, - serde_json::to_string(&ClientType::Wasm(WasmClientType::EthereumMinimal)).unwrap() - ); - } -} - -impl ClientType { - #[must_use] - pub const fn identifier_prefix(self) -> &'static str { - match self { - ClientType::Wasm(_) => "08-wasm", - ClientType::Tendermint => "07-tendermint", - ClientType::Cometbls => "cometbls", - ClientType::_11Cometbls => "11-cometbls", - } - } -} - -impl FromStr for WasmClientType { - type Err = WasmClientTypeParseError; - - fn from_str(s: &str) -> Result { - match s { - "EthereumMinimal" => Ok(WasmClientType::EthereumMinimal), - "EthereumMainnet" => Ok(WasmClientType::EthereumMainnet), - "Cometbls" => Ok(WasmClientType::Cometbls), - "Tendermint" => Ok(WasmClientType::Tendermint), - "Scroll" => Ok(WasmClientType::Scroll), - "Arbitrum" => Ok(WasmClientType::Arbitrum), - "Linea" => Ok(WasmClientType::Linea), - "Berachain" => Ok(WasmClientType::Berachain), - "EvmInCosmos" => Ok(WasmClientType::EvmInCosmos), - "Movement" => Ok(WasmClientType::Movement), - _ => Err(WasmClientTypeParseError::UnknownType(s.to_string())), - } - } -} - -impl Display for WasmClientType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::EthereumMinimal => write!(f, "EthereumMinimal"), - Self::EthereumMainnet => write!(f, "EthereumMainnet"), - Self::Cometbls => write!(f, "Cometbls"), - Self::Tendermint => write!(f, "Tendermint"), - Self::Scroll => write!(f, "Scroll"), - Self::Arbitrum => write!(f, "Arbitrum"), - Self::Linea => write!(f, "Linea"), - Self::Berachain => write!(f, "Berachain"), - Self::EvmInCosmos => write!(f, "EvmInCosmos"), - Self::Movement => write!(f, "Movement"), - } - } -} - -#[derive(Debug, PartialEq, Eq, thiserror::Error)] -pub enum WasmClientTypeParseError { - #[error("unknown wasm client type `{0}`")] - UnknownType(String), -} - // TODO: Move this and the above types into tools/parse-wasm-client-type, and make it into a library with an optional `parse` feature (so as to not bring in the very heavy wasmparser stack where it's not needed) -pub fn parse_wasm_client_type( - bz: impl AsRef<[u8]>, -) -> Result, WasmClientTypeParseError> { +pub fn parse_wasm_client_type(bz: impl AsRef<[u8]>) -> Option { wasmparser::Parser::new(0) .parse_all(bz.as_ref()) .find_map(|payload| { @@ -265,16 +171,16 @@ pub fn parse_wasm_client_type( .and_then(|export| export.name.strip_prefix("WASM_CLIENT_TYPE_")) }) }) - .map(str::parse) - .transpose() + .map(Into::into) } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] // REVIEW: Add a variant "greater than" to indicate that any height >= H is valid? Might help with optimization passes pub enum QueryHeight { - #[serde(rename = "latest")] + #[cfg_attr(feature = "serde", serde(rename = "latest"))] Latest, - #[serde(untagged)] + #[cfg_attr(feature = "serde", serde(untagged))] Specific(Height), } diff --git a/lib/unionlabs/src/linea/account.rs b/lib/unionlabs/src/linea/account.rs index 4e790e55ea..4393ab5a60 100644 --- a/lib/unionlabs/src/linea/account.rs +++ b/lib/unionlabs/src/linea/account.rs @@ -1,5 +1,3 @@ -use serde::{Deserialize, Serialize}; - use crate::{ errors::{ExpectedLength, InvalidLength}, hash::H256, @@ -10,7 +8,8 @@ use crate::{ pub const ZKACCOUNT_BYTES_LEN: usize = 32 * 6; // https://github.com/Consensys/shomei/blob/955b4d8100f1a12702cdefc3fa79b16dd1c038e6/core/src/main/java/net/consensys/shomei/ZkAccount.java -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq)] +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] pub struct ZkAccount { pub nonce: U256, pub balance: U256, @@ -57,7 +56,8 @@ impl From for Vec { } } -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq)] +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] pub struct MimcSafeBytes { pub lsb: H256, pub msb: H256, diff --git a/lib/unionlabs/src/linea/proof.rs b/lib/unionlabs/src/linea/proof.rs index 42b99a82a4..fb38137f9b 100644 --- a/lib/unionlabs/src/linea/proof.rs +++ b/lib/unionlabs/src/linea/proof.rs @@ -1,41 +1,18 @@ use macros::model; -use serde::{Deserialize, Serialize}; -use crate::errors::{required, MissingField}; - -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromMerkleProofError { - #[error(transparent)] - MissingField(#[from] MissingField), -} - -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] +#[derive(Clone, Debug, PartialEq, Eq)] +#[cfg_attr( + feature = "serde", + derive(::serde::Serialize, ::serde::Deserialize), + serde(rename_all = "camelCase") +)] pub struct MerklePath { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] pub value: Vec, - #[serde(with = "::serde_utils::hex_string_list")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string_list"))] pub proof_related_nodes: Vec>, } -impl From for protos::union::ibc::lightclients::linea::v1::MerklePath { - fn from(value: MerklePath) -> Self { - Self { - value: value.value, - proof_related_nodes: value.proof_related_nodes, - } - } -} - -impl From for MerklePath { - fn from(value: protos::union::ibc::lightclients::linea::v1::MerklePath) -> Self { - Self { - value: value.value, - proof_related_nodes: value.proof_related_nodes, - } - } -} - #[model( proto( raw(protos::union::ibc::lightclients::linea::v1::InclusionProof), @@ -44,39 +21,18 @@ impl From for MerklePat ), no_serde )] -#[derive(Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] +#[cfg_attr( + feature = "serde", + derive(::serde::Serialize, ::serde::Deserialize), + serde(rename_all = "camelCase") +)] pub struct InclusionProof { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] pub key: Vec, pub leaf_index: u64, pub proof: MerklePath, } -impl From for protos::union::ibc::lightclients::linea::v1::InclusionProof { - fn from(value: InclusionProof) -> Self { - Self { - key: value.key, - leaf_index: value.leaf_index, - merkle_path: Some(value.proof.into()), - } - } -} - -impl TryFrom for InclusionProof { - type Error = TryFromMerkleProofError; - - fn try_from( - value: protos::union::ibc::lightclients::linea::v1::InclusionProof, - ) -> Result { - Ok(Self { - key: value.key, - leaf_index: value.leaf_index, - proof: required!(value.merkle_path)?.into(), - }) - } -} - #[model( proto( raw(protos::union::ibc::lightclients::linea::v1::NonInclusionProof), @@ -85,10 +41,13 @@ impl TryFrom for In ), no_serde )] -#[derive(Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] +#[cfg_attr( + feature = "serde", + derive(::serde::Serialize, ::serde::Deserialize), + serde(rename_all = "camelCase") +)] pub struct NonInclusionProof { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] pub key: Vec, pub left_leaf_index: u64, pub left_proof: MerklePath, @@ -96,80 +55,144 @@ pub struct NonInclusionProof { pub right_proof: MerklePath, } -impl From for protos::union::ibc::lightclients::linea::v1::NonInclusionProof { - fn from(value: NonInclusionProof) -> Self { - Self { - key: value.key, - left_leaf_index: value.left_leaf_index, - left_proof: Some(value.left_proof.into()), - right_leaf_index: value.right_leaf_index, - right_proof: Some(value.right_proof.into()), +#[derive(Clone, PartialEq, Debug)] +#[cfg_attr( + feature = "serde", + derive(::serde::Serialize, ::serde::Deserialize), + serde(untagged) +)] +pub enum MerkleProof { + Inclusion(InclusionProof), + NonInclusion(NonInclusionProof), +} + +#[derive(Clone, Debug)] +#[cfg_attr( + feature = "serde", + derive(::serde::Serialize, ::serde::Deserialize), + serde(rename_all = "camelCase") +)] +pub struct GetProof { + pub account_proof: MerkleProof, + pub storage_proofs: Vec, +} + +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + linea::proof::{InclusionProof, MerklePath, MerkleProof, NonInclusionProof}, + }; + + impl From for protos::union::ibc::lightclients::linea::v1::MerkleProof { + fn from(value: MerkleProof) -> Self { + Self { + proof: Some(match value { + MerkleProof::Inclusion(inclusion) => { + protos::union::ibc::lightclients::linea::v1::merkle_proof::Proof::Inclusion( + inclusion.into(), + ) + } + MerkleProof::NonInclusion(noninclusion) => { + protos::union::ibc::lightclients::linea::v1::merkle_proof::Proof::Noninclusion( + noninclusion.into(), + ) + } + }), + } } } -} -impl TryFrom for NonInclusionProof { - type Error = TryFromMerkleProofError; - - fn try_from( - value: protos::union::ibc::lightclients::linea::v1::NonInclusionProof, - ) -> Result { - Ok(Self { - key: value.key, - left_leaf_index: value.left_leaf_index, - left_proof: required!(value.left_proof)?.into(), - right_leaf_index: value.right_leaf_index, - right_proof: required!(value.right_proof)?.into(), - }) + impl TryFrom for MerkleProof { + type Error = TryFromMerkleProofError; + + fn try_from( + value: protos::union::ibc::lightclients::linea::v1::MerkleProof, + ) -> Result { + Ok(match required!(value.proof)? { + protos::union::ibc::lightclients::linea::v1::merkle_proof::Proof::Inclusion( + inclusion, + ) => MerkleProof::Inclusion(inclusion.try_into()?), + protos::union::ibc::lightclients::linea::v1::merkle_proof::Proof::Noninclusion( + noninclusion, + ) => MerkleProof::NonInclusion(noninclusion.try_into()?), + }) + } } -} -#[derive(Clone, PartialEq, Debug, Serialize, Deserialize)] -#[serde(untagged)] -pub enum MerkleProof { - Inclusion(InclusionProof), - NonInclusion(NonInclusionProof), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromMerkleProofError { + #[error(transparent)] + MissingField(#[from] MissingField), + } -impl From for protos::union::ibc::lightclients::linea::v1::MerkleProof { - fn from(value: MerkleProof) -> Self { - Self { - proof: Some(match value { - MerkleProof::Inclusion(inclusion) => { - protos::union::ibc::lightclients::linea::v1::merkle_proof::Proof::Inclusion( - inclusion.into(), - ) - } - MerkleProof::NonInclusion(noninclusion) => { - protos::union::ibc::lightclients::linea::v1::merkle_proof::Proof::Noninclusion( - noninclusion.into(), - ) - } - }), + impl From for protos::union::ibc::lightclients::linea::v1::NonInclusionProof { + fn from(value: NonInclusionProof) -> Self { + Self { + key: value.key, + left_leaf_index: value.left_leaf_index, + left_proof: Some(value.left_proof.into()), + right_leaf_index: value.right_leaf_index, + right_proof: Some(value.right_proof.into()), + } } } -} -impl TryFrom for MerkleProof { - type Error = TryFromMerkleProofError; - - fn try_from( - value: protos::union::ibc::lightclients::linea::v1::MerkleProof, - ) -> Result { - Ok(match required!(value.proof)? { - protos::union::ibc::lightclients::linea::v1::merkle_proof::Proof::Inclusion( - inclusion, - ) => MerkleProof::Inclusion(inclusion.try_into()?), - protos::union::ibc::lightclients::linea::v1::merkle_proof::Proof::Noninclusion( - noninclusion, - ) => MerkleProof::NonInclusion(noninclusion.try_into()?), - }) + impl TryFrom for NonInclusionProof { + type Error = TryFromMerkleProofError; + + fn try_from( + value: protos::union::ibc::lightclients::linea::v1::NonInclusionProof, + ) -> Result { + Ok(Self { + key: value.key, + left_leaf_index: value.left_leaf_index, + left_proof: required!(value.left_proof)?.into(), + right_leaf_index: value.right_leaf_index, + right_proof: required!(value.right_proof)?.into(), + }) + } } -} -#[derive(Clone, Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct GetProof { - pub account_proof: MerkleProof, - pub storage_proofs: Vec, + impl From for protos::union::ibc::lightclients::linea::v1::InclusionProof { + fn from(value: InclusionProof) -> Self { + Self { + key: value.key, + leaf_index: value.leaf_index, + merkle_path: Some(value.proof.into()), + } + } + } + + impl TryFrom for InclusionProof { + type Error = TryFromMerkleProofError; + + fn try_from( + value: protos::union::ibc::lightclients::linea::v1::InclusionProof, + ) -> Result { + Ok(Self { + key: value.key, + leaf_index: value.leaf_index, + proof: required!(value.merkle_path)?.into(), + }) + } + } + + impl From for protos::union::ibc::lightclients::linea::v1::MerklePath { + fn from(value: MerklePath) -> Self { + Self { + value: value.value, + proof_related_nodes: value.proof_related_nodes, + } + } + } + + impl From for MerklePath { + fn from(value: protos::union::ibc::lightclients::linea::v1::MerklePath) -> Self { + Self { + value: value.value, + proof_related_nodes: value.proof_related_nodes, + } + } + } } diff --git a/lib/unionlabs/src/macros.rs b/lib/unionlabs/src/macros.rs index 23426ee4c4..426e6c5aea 100644 --- a/lib/unionlabs/src/macros.rs +++ b/lib/unionlabs/src/macros.rs @@ -14,12 +14,12 @@ macro_rules! hex_string_array_wrapper { Eq, PartialOrd, Ord, - ::ssz::Ssz, Hash )] - #[ssz(transparent)] + #[cfg_attr(feature = "ssz", derive(::ssz::Ssz), ssz(transparent))] pub struct $Struct(pub [u8; $N]); + #[cfg(feature = "serde")] impl ::serde::Serialize for $Struct { fn serialize(&self, serializer: S) -> Result where @@ -39,6 +39,7 @@ macro_rules! hex_string_array_wrapper { } } + #[cfg(feature = "serde")] impl<'de> ::serde::Deserialize<'de> for $Struct { fn deserialize(deserializer: D) -> Result where @@ -227,93 +228,11 @@ macro_rules! hex_string_array_wrapper { } } - #[cfg(feature = "ethabi")] - impl From<$Struct> for ::ethers_core::types::Bytes { - fn from(value: $Struct) -> Self { - ::ethers_core::types::Bytes::from(value.0) - } - } - - #[cfg(feature = "ethabi")] - impl TryFrom<::ethers_core::types::Bytes> for $Struct { - type Error = >>::Error; - - fn try_from(value: ::ethers_core::types::Bytes) -> Result { - Self::try_from(&value.0[..]) - } - } - - #[cfg(feature = "ethabi")] - impl TryFrom<&'_ ::ethers_core::types::Bytes> for $Struct { - type Error = >>::Error; - - fn try_from(value: &::ethers_core::types::Bytes) -> Result { - Self::try_from(&value.0[..]) - } - } - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::AbiType for $Struct { - fn param_type() -> ::ethers_core::abi::ParamType { - ::ethers_core::abi::ParamType::FixedBytes($N) - } - } - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::AbiArrayType for $Struct {} - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::AbiEncode for $Struct { - fn encode(self) -> Vec { - self.0.encode() - } - } - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::AbiDecode for $Struct { - fn decode(bytes: impl AsRef<[u8]>) -> Result { - <[u8; $N]>::decode(bytes).map(Self) - } - } - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::Tokenizable for $Struct { - fn from_token(token: ::ethers_core::abi::Token) -> Result { - <[u8; $N]>::from_token(token).map(Self) - } - - fn into_token(self) -> ::ethers_core::abi::Token { - self.0.into_token() - } - } - - #[cfg(feature = "ethabi")] - impl ::ethers_core::abi::TokenizableItem for $Struct {} - impl AsRef<[u8]> for $Struct { fn as_ref(&self) -> &[u8] { &self.0 } } - - impl ::rlp::Encodable for $Struct { - fn rlp_append(&self, s: &mut ::rlp::RlpStream) { - s.encoder().encode_value(self.as_ref()); - } - } - - impl ::rlp::Decodable for $Struct { - fn decode(rlp: &rlp::Rlp) -> Result { - rlp.decoder() - .decode_value(|bytes| match bytes.len().cmp(&$N) { - ::core::cmp::Ordering::Less => Err(::rlp::DecoderError::RlpIsTooShort), - ::core::cmp::Ordering::Greater => Err(::rlp::DecoderError::RlpIsTooBig), - ::core::cmp::Ordering::Equal => { - Ok($Struct(bytes.try_into().expect("size is checked; qed;"))) - } - }) - } - } )+ }; } @@ -333,10 +252,11 @@ macro_rules! wrapper_enum { )+ } ) => { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, serde::Serialize, serde::Deserialize)] - #[serde(rename_all = "snake_case")] + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] $(#[$meta])* + #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize), serde(rename_all = "snake_case"))] #[cfg_attr(feature = "schemars", derive(::schemars::JsonSchema))] + #[cfg_attr(feature = "valuable", derive(::valuable::Valuable))] pub enum $Enum { $( $(#[$inner_meta])* @@ -344,104 +264,109 @@ macro_rules! wrapper_enum { )+ } - mod ensure_enum_values_are_same_as_proto { - $( - #[allow(non_upper_case_globals, dead_code)] - const $Variant: () = assert!( - super::$Enum::$Variant as i32 == <$Proto>::$Variant as i32, - ); - )+ - } - - impl $Enum { - pub fn from_proto_str(s: &str) -> Option { - <$Proto>::from_str_name(s).map(Into::into) - } - } + #[cfg(feature = "proto")] + mod proto { + use super::$Enum; - impl core::str::FromStr for $Enum { - type Err = crate::errors::UnknownEnumVariant; - - fn from_str(s: &str) -> Result { + mod ensure_enum_values_are_same_as_proto { $( - if s == <$Proto>::$Variant.as_str_name() { - Ok($Enum::$Variant) - } else + #[allow(non_upper_case_globals, dead_code)] + const $Variant: () = assert!( + super::super::$Enum::$Variant as i32 == <$Proto>::$Variant as i32, + ); )+ - { - Err(crate::errors::UnknownEnumVariant(s.to_string())) + } + + impl $Enum { + pub fn from_proto_str(s: &str) -> Option { + <$Proto>::from_str_name(s).map(Into::into) } } - } - impl From<$Enum> for &'static str { - fn from(value: $Enum) -> Self { - match value { + impl core::str::FromStr for $Enum { + type Err = crate::errors::UnknownEnumVariant; + + fn from_str(s: &str) -> Result { $( - $Enum::$Variant => <$Proto>::$Variant.as_str_name(), + if s == <$Proto>::$Variant.as_str_name() { + Ok($Enum::$Variant) + } else )+ + { + Err(crate::errors::UnknownEnumVariant(s.to_string())) + } } } - } - impl core::fmt::Display for $Enum { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - f.write_str(<&'static str>::from(*self)) + impl From<$Enum> for &'static str { + fn from(value: $Enum) -> Self { + match value { + $( + $Enum::$Variant => <$Proto>::$Variant.as_str_name(), + )+ + } + } } - } - impl From<$Enum> for u8 { - fn from(value: $Enum) -> Self { - match value { - $( - $Enum::$Variant => $discriminant as u8, - )+ + impl core::fmt::Display for $Enum { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.write_str(<&'static str>::from(*self)) } } - } - impl From<$Enum> for i32 { - fn from(value: $Enum) -> Self { - u8::from(value).into() + impl From<$Enum> for u8 { + fn from(value: $Enum) -> Self { + match value { + $( + $Enum::$Variant => $discriminant as u8, + )+ + } + } + } + + impl From<$Enum> for i32 { + fn from(value: $Enum) -> Self { + u8::from(value).into() + } } - } - impl TryFrom for $Enum { - type Error = crate::errors::UnknownEnumVariant; + impl TryFrom for $Enum { + type Error = crate::errors::UnknownEnumVariant; - fn try_from(value: u8) -> Result { - i32::from(value) - .try_into() - .map_err(|_| crate::errors::UnknownEnumVariant(value)) + fn try_from(value: u8) -> Result { + i32::from(value) + .try_into() + .map_err(|_| crate::errors::UnknownEnumVariant(value)) + } } - } - impl TryFrom for $Enum { - type Error = crate::errors::UnknownEnumVariant; + impl TryFrom for $Enum { + type Error = crate::errors::UnknownEnumVariant; - fn try_from(value: i32) -> Result { - <$Proto>::try_from(value) - .map_err(|_| crate::errors::UnknownEnumVariant(value)) - .map(Into::into) + fn try_from(value: i32) -> Result { + <$Proto>::try_from(value) + .map_err(|_| crate::errors::UnknownEnumVariant(value)) + .map(Into::into) + } } - } - impl From<$Proto> for $Enum { - fn from(value: $Proto) -> Self { - match value { - $( - <$Proto>::$Variant => $Enum::$Variant, - )+ + impl From<$Proto> for $Enum { + fn from(value: $Proto) -> Self { + match value { + $( + <$Proto>::$Variant => $Enum::$Variant, + )+ + } } } - } - impl From<$Enum> for $Proto { - fn from(value: $Enum) -> Self { - match value { - $( - $Enum::$Variant => Self::$Variant, - )+ + impl From<$Enum> for $Proto { + fn from(value: $Enum) -> Self { + match value { + $( + $Enum::$Variant => Self::$Variant, + )+ + } } } } @@ -508,7 +433,7 @@ macro_rules! option_unwrap { } #[macro_export] -macro_rules! assert_all_eq ( +macro_rules! assert_all_eq { ($a:expr, $b:expr) => { assert_eq!($a, $b); }; @@ -519,5 +444,5 @@ macro_rules! assert_all_eq ( ($a:expr, $b:expr, $c:expr, $($rest:expr),*$(,)?) => { assert_eq!($a, $b); assert_all_eq!($b, $c, $($rest),*); - } -); + }; +} diff --git a/lib/unionlabs/src/never.rs b/lib/unionlabs/src/never.rs index 367cc14b8c..6c993411dd 100644 --- a/lib/unionlabs/src/never.rs +++ b/lib/unionlabs/src/never.rs @@ -1,9 +1,8 @@ use core::fmt::Display; -use serde::{Deserialize, Serialize}; - /// The empty/ "bottom" type. -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] pub enum Never {} impl Display for Never { diff --git a/lib/unionlabs/src/tendermint/abci/event.rs b/lib/unionlabs/src/tendermint/abci/event.rs index 3ca62c43e1..c8dd7fe966 100644 --- a/lib/unionlabs/src/tendermint/abci/event.rs +++ b/lib/unionlabs/src/tendermint/abci/event.rs @@ -8,20 +8,25 @@ pub struct Event { pub attributes: Vec, } -impl From for Event { - fn from(value: protos::tendermint::abci::Event) -> Self { - Self { - ty: value.r#type, - attributes: value.attributes.into_iter().map(Into::into).collect(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::tendermint::abci::event::Event; + + impl From for Event { + fn from(value: protos::tendermint::abci::Event) -> Self { + Self { + ty: value.r#type, + attributes: value.attributes.into_iter().map(Into::into).collect(), + } } } -} -impl From for protos::tendermint::abci::Event { - fn from(value: Event) -> Self { - Self { - r#type: value.ty, - attributes: value.attributes.into_iter().map(Into::into).collect(), + impl From for protos::tendermint::abci::Event { + fn from(value: Event) -> Self { + Self { + r#type: value.ty, + attributes: value.attributes.into_iter().map(Into::into).collect(), + } } } } diff --git a/lib/unionlabs/src/tendermint/abci/event_attribute.rs b/lib/unionlabs/src/tendermint/abci/event_attribute.rs index 4bf82e4ea1..7a3761082c 100644 --- a/lib/unionlabs/src/tendermint/abci/event_attribute.rs +++ b/lib/unionlabs/src/tendermint/abci/event_attribute.rs @@ -8,22 +8,27 @@ pub struct EventAttribute { pub index: bool, } -impl From for EventAttribute { - fn from(value: protos::tendermint::abci::EventAttribute) -> Self { - Self { - key: value.key, - value: value.value, - index: value.index, +#[cfg(feature = "proto")] +pub mod proto { + use crate::tendermint::abci::event_attribute::EventAttribute; + + impl From for EventAttribute { + fn from(value: protos::tendermint::abci::EventAttribute) -> Self { + Self { + key: value.key, + value: value.value, + index: value.index, + } } } -} -impl From for protos::tendermint::abci::EventAttribute { - fn from(value: EventAttribute) -> Self { - Self { - key: value.key, - value: value.value, - index: value.index, + impl From for protos::tendermint::abci::EventAttribute { + fn from(value: EventAttribute) -> Self { + Self { + key: value.key, + value: value.value, + index: value.index, + } } } } diff --git a/lib/unionlabs/src/tendermint/abci/exec_tx_result.rs b/lib/unionlabs/src/tendermint/abci/exec_tx_result.rs index 4db638026a..f24ae8c6e9 100644 --- a/lib/unionlabs/src/tendermint/abci/exec_tx_result.rs +++ b/lib/unionlabs/src/tendermint/abci/exec_tx_result.rs @@ -1,14 +1,11 @@ use macros::model; -use crate::{ - bounded::{BoundedI64, BoundedIntError}, - tendermint::abci::event::Event, -}; +use crate::{bounded::BoundedI64, tendermint::abci::event::Event}; #[model(proto(raw(protos::tendermint::abci::ExecTxResult), into, from))] pub struct ExecTxResult { pub code: u32, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub data: Vec, /// nondeterministic @@ -22,50 +19,55 @@ pub struct ExecTxResult { pub codespace: String, } -impl From for protos::tendermint::abci::ExecTxResult { - fn from(value: ExecTxResult) -> Self { - Self { - code: value.code, - data: value.data, - log: value.log, - info: value.info, - gas_wanted: value.gas_wanted.into(), - gas_used: value.gas_used.into(), - events: value.events.into_iter().map(Into::into).collect(), - codespace: value.codespace, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{bounded::BoundedIntError, tendermint::abci::exec_tx_result::ExecTxResult}; + + impl From for protos::tendermint::abci::ExecTxResult { + fn from(value: ExecTxResult) -> Self { + Self { + code: value.code, + data: value.data, + log: value.log, + info: value.info, + gas_wanted: value.gas_wanted.into(), + gas_used: value.gas_used.into(), + events: value.events.into_iter().map(Into::into).collect(), + codespace: value.codespace, + } } } -} -impl TryFrom for ExecTxResult { - type Error = TryFromExecTxResultError; + impl TryFrom for ExecTxResult { + type Error = TryFromExecTxResultError; - fn try_from(value: protos::tendermint::abci::ExecTxResult) -> Result { - Ok(Self { - code: value.code, - data: value.data, - log: value.log, - info: value.info, - gas_wanted: value - .gas_wanted - .try_into() - .map_err(TryFromExecTxResultError::GasWanted)?, - gas_used: value - .gas_used - .try_into() - .map_err(TryFromExecTxResultError::GasUsed)?, - events: value.events.into_iter().map(Into::into).collect(), - codespace: value.codespace, - }) + fn try_from(value: protos::tendermint::abci::ExecTxResult) -> Result { + Ok(Self { + code: value.code, + data: value.data, + log: value.log, + info: value.info, + gas_wanted: value + .gas_wanted + .try_into() + .map_err(TryFromExecTxResultError::GasWanted)?, + gas_used: value + .gas_used + .try_into() + .map_err(TryFromExecTxResultError::GasUsed)?, + events: value.events.into_iter().map(Into::into).collect(), + codespace: value.codespace, + }) + } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromExecTxResultError { - #[error("invalid gas_wanted")] - GasWanted(#[source] BoundedIntError), - #[error("invalid gas_used")] - GasUsed(#[source] BoundedIntError), + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromExecTxResultError { + #[error("invalid gas_wanted")] + GasWanted(#[source] BoundedIntError), + #[error("invalid gas_used")] + GasUsed(#[source] BoundedIntError), + } } #[cfg(test)] diff --git a/lib/unionlabs/src/tendermint/abci/response_query.rs b/lib/unionlabs/src/tendermint/abci/response_query.rs index e83dae2f49..d5dbce3d07 100644 --- a/lib/unionlabs/src/tendermint/abci/response_query.rs +++ b/lib/unionlabs/src/tendermint/abci/response_query.rs @@ -1,9 +1,6 @@ use macros::model; -use crate::{ - bounded::{BoundedI64, BoundedIntError}, - tendermint::crypto::proof_ops::ProofOps, -}; +use crate::{bounded::BoundedI64, tendermint::crypto::proof_ops::ProofOps}; #[model(proto(raw(protos::tendermint::abci::ResponseQuery), into, from))] pub struct ResponseQuery { @@ -13,10 +10,10 @@ pub struct ResponseQuery { /// nondeterministic pub info: String, pub index: i64, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub key: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub value: Vec, pub proof_ops: Option, @@ -24,45 +21,50 @@ pub struct ResponseQuery { pub codespace: String, } -impl From for protos::tendermint::abci::ResponseQuery { - fn from(value: ResponseQuery) -> Self { - Self { - code: value.code, - log: value.log, - info: value.info, - index: value.index, - key: value.key, - value: value.value, - proof_ops: value.proof_ops.map(Into::into), - height: value.height.inner(), - codespace: value.codespace, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{bounded::BoundedIntError, tendermint::abci::response_query::ResponseQuery}; + + impl From for protos::tendermint::abci::ResponseQuery { + fn from(value: ResponseQuery) -> Self { + Self { + code: value.code, + log: value.log, + info: value.info, + index: value.index, + key: value.key, + value: value.value, + proof_ops: value.proof_ops.map(Into::into), + height: value.height.inner(), + codespace: value.codespace, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromResponseQueryError { - #[error("invalid height")] - Height(#[source] BoundedIntError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromResponseQueryError { + #[error("invalid height")] + Height(#[source] BoundedIntError), + } -impl TryFrom for ResponseQuery { - type Error = TryFromResponseQueryError; + impl TryFrom for ResponseQuery { + type Error = TryFromResponseQueryError; - fn try_from(value: protos::tendermint::abci::ResponseQuery) -> Result { - Ok(Self { - code: value.code, - log: value.log, - info: value.info, - index: value.index, - key: value.key, - value: value.value, - proof_ops: value.proof_ops.map(Into::into), - height: value - .height - .try_into() - .map_err(TryFromResponseQueryError::Height)?, - codespace: value.codespace, - }) + fn try_from(value: protos::tendermint::abci::ResponseQuery) -> Result { + Ok(Self { + code: value.code, + log: value.log, + info: value.info, + index: value.index, + key: value.key, + value: value.value, + proof_ops: value.proof_ops.map(Into::into), + height: value + .height + .try_into() + .map_err(TryFromResponseQueryError::Height)?, + codespace: value.codespace, + }) + } } } diff --git a/lib/unionlabs/src/tendermint/crypto/proof.rs b/lib/unionlabs/src/tendermint/crypto/proof.rs index 600aaefd3b..4f6f8623f3 100644 --- a/lib/unionlabs/src/tendermint/crypto/proof.rs +++ b/lib/unionlabs/src/tendermint/crypto/proof.rs @@ -1,51 +1,54 @@ use macros::model; -use crate::{ - bounded::{BoundedI64, BoundedIntError}, - errors::InvalidLength, - hash::H256, -}; +use crate::{bounded::BoundedI64, hash::H256}; #[model(proto(raw(protos::tendermint::crypto::Proof), into, from))] pub struct Proof { pub total: BoundedI64<0, { i64::MAX }>, pub index: BoundedI64<0, { i64::MAX }>, pub leaf_hash: H256, - #[serde(with = "::serde_utils::hex_string_list")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string_list"))] #[debug(wrap = ::serde_utils::fmt::DebugListAsHex)] pub aunts: Vec>, } -impl From for protos::tendermint::crypto::Proof { - fn from(value: Proof) -> Self { - Self { - total: value.total.into(), - index: value.index.into(), - leaf_hash: value.leaf_hash.into(), - aunts: value.aunts, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + bounded::BoundedIntError, errors::InvalidLength, tendermint::crypto::proof::Proof, + }; + + impl From for protos::tendermint::crypto::Proof { + fn from(value: Proof) -> Self { + Self { + total: value.total.into(), + index: value.index.into(), + leaf_hash: value.leaf_hash.into(), + aunts: value.aunts, + } } } -} -impl TryFrom for Proof { - type Error = TryFromProofError; + impl TryFrom for Proof { + type Error = TryFromProofError; - fn try_from(value: protos::tendermint::crypto::Proof) -> Result { - Ok(Self { - total: value.total.try_into().map_err(TryFromProofError::Total)?, - index: value.index.try_into().map_err(TryFromProofError::Index)?, - leaf_hash: value.leaf_hash.try_into()?, - aunts: value.aunts, - }) + fn try_from(value: protos::tendermint::crypto::Proof) -> Result { + Ok(Self { + total: value.total.try_into().map_err(TryFromProofError::Total)?, + index: value.index.try_into().map_err(TryFromProofError::Index)?, + leaf_hash: value.leaf_hash.try_into()?, + aunts: value.aunts, + }) + } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromProofError { - #[error("invalid total")] - Total(#[source] BoundedIntError), - #[error("invalid index")] - Index(#[source] BoundedIntError), - #[error("invalid leaf hash")] - LeafHash(#[from] InvalidLength), + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromProofError { + #[error("invalid total")] + Total(#[source] BoundedIntError), + #[error("invalid index")] + Index(#[source] BoundedIntError), + #[error("invalid leaf hash")] + LeafHash(#[from] InvalidLength), + } } diff --git a/lib/unionlabs/src/tendermint/crypto/proof_op.rs b/lib/unionlabs/src/tendermint/crypto/proof_op.rs index 4aa47a9f09..1b7bb91cbe 100644 --- a/lib/unionlabs/src/tendermint/crypto/proof_op.rs +++ b/lib/unionlabs/src/tendermint/crypto/proof_op.rs @@ -3,30 +3,35 @@ use macros::model; #[model(proto(raw(protos::tendermint::crypto::ProofOp), into, from))] pub struct ProofOp { pub ty: String, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub key: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub data: Vec, } -impl From for protos::tendermint::crypto::ProofOp { - fn from(value: ProofOp) -> Self { - Self { - r#type: value.ty, - key: value.key, - data: value.data, +#[cfg(feature = "proto")] +pub mod proto { + use crate::tendermint::crypto::proof_op::ProofOp; + + impl From for protos::tendermint::crypto::ProofOp { + fn from(value: ProofOp) -> Self { + Self { + r#type: value.ty, + key: value.key, + data: value.data, + } } } -} -impl From for ProofOp { - fn from(value: protos::tendermint::crypto::ProofOp) -> Self { - Self { - ty: value.r#type, - key: value.key, - data: value.data, + impl From for ProofOp { + fn from(value: protos::tendermint::crypto::ProofOp) -> Self { + Self { + ty: value.r#type, + key: value.key, + data: value.data, + } } } } diff --git a/lib/unionlabs/src/tendermint/crypto/proof_ops.rs b/lib/unionlabs/src/tendermint/crypto/proof_ops.rs index e83aaf12db..dda7ab8c3e 100644 --- a/lib/unionlabs/src/tendermint/crypto/proof_ops.rs +++ b/lib/unionlabs/src/tendermint/crypto/proof_ops.rs @@ -7,18 +7,23 @@ pub struct ProofOps { pub ops: Vec, } -impl From for protos::tendermint::crypto::ProofOps { - fn from(value: ProofOps) -> Self { - Self { - ops: value.ops.into_iter().map(Into::into).collect(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::tendermint::crypto::proof_ops::ProofOps; + + impl From for protos::tendermint::crypto::ProofOps { + fn from(value: ProofOps) -> Self { + Self { + ops: value.ops.into_iter().map(Into::into).collect(), + } } } -} -impl From for ProofOps { - fn from(value: protos::tendermint::crypto::ProofOps) -> Self { - Self { - ops: value.ops.into_iter().map(Into::into).collect(), + impl From for ProofOps { + fn from(value: protos::tendermint::crypto::ProofOps) -> Self { + Self { + ops: value.ops.into_iter().map(Into::into).collect(), + } } } } diff --git a/lib/unionlabs/src/tendermint/crypto/public_key.rs b/lib/unionlabs/src/tendermint/crypto/public_key.rs index 07b639343c..538623ae7f 100644 --- a/lib/unionlabs/src/tendermint/crypto/public_key.rs +++ b/lib/unionlabs/src/tendermint/crypto/public_key.rs @@ -1,67 +1,75 @@ use macros::model; -use crate::errors::{required, MissingField}; - // TODO: These are fixed sizes, not arbitrary bytes #[model(proto(raw(protos::tendermint::crypto::PublicKey), into, from))] pub enum PublicKey { Ed25519( - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] Vec, ), Secp256k1( - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] Vec, ), Bn254( - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] Vec, ), Bls12_381( - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] Vec, ), } -impl From for protos::tendermint::crypto::PublicKey { - fn from(value: PublicKey) -> Self { - Self { - sum: Some(match value { - PublicKey::Ed25519(key) => { - protos::tendermint::crypto::public_key::Sum::Ed25519(key) - } - PublicKey::Secp256k1(key) => { - protos::tendermint::crypto::public_key::Sum::Secp256k1(key) - } - PublicKey::Bn254(key) => protos::tendermint::crypto::public_key::Sum::Bn254(key), - PublicKey::Bls12_381(key) => { - protos::tendermint::crypto::public_key::Sum::Bls12_381(key) - } - }), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + tendermint::crypto::public_key::PublicKey, + }; + + impl From for protos::tendermint::crypto::PublicKey { + fn from(value: PublicKey) -> Self { + Self { + sum: Some(match value { + PublicKey::Ed25519(key) => { + protos::tendermint::crypto::public_key::Sum::Ed25519(key) + } + PublicKey::Secp256k1(key) => { + protos::tendermint::crypto::public_key::Sum::Secp256k1(key) + } + PublicKey::Bn254(key) => { + protos::tendermint::crypto::public_key::Sum::Bn254(key) + } + PublicKey::Bls12_381(key) => { + protos::tendermint::crypto::public_key::Sum::Bls12_381(key) + } + }), + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromPublicKeyError { - #[error(transparent)] - MissingField(#[from] MissingField), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromPublicKeyError { + #[error(transparent)] + MissingField(#[from] MissingField), + } -impl TryFrom for PublicKey { - type Error = TryFromPublicKeyError; + impl TryFrom for PublicKey { + type Error = TryFromPublicKeyError; - fn try_from(value: protos::tendermint::crypto::PublicKey) -> Result { - Ok(match required!(value.sum)? { - protos::tendermint::crypto::public_key::Sum::Ed25519(key) => Self::Ed25519(key), - protos::tendermint::crypto::public_key::Sum::Secp256k1(key) => Self::Secp256k1(key), - protos::tendermint::crypto::public_key::Sum::Bn254(key) => Self::Bn254(key), - protos::tendermint::crypto::public_key::Sum::Bls12_381(key) => Self::Bls12_381(key), - }) + fn try_from(value: protos::tendermint::crypto::PublicKey) -> Result { + Ok(match required!(value.sum)? { + protos::tendermint::crypto::public_key::Sum::Ed25519(key) => Self::Ed25519(key), + protos::tendermint::crypto::public_key::Sum::Secp256k1(key) => Self::Secp256k1(key), + protos::tendermint::crypto::public_key::Sum::Bn254(key) => Self::Bn254(key), + protos::tendermint::crypto::public_key::Sum::Bls12_381(key) => Self::Bls12_381(key), + }) + } } } diff --git a/lib/unionlabs/src/tendermint/p2p/default_node_info.rs b/lib/unionlabs/src/tendermint/p2p/default_node_info.rs index 3182feef63..d8ce146b20 100644 --- a/lib/unionlabs/src/tendermint/p2p/default_node_info.rs +++ b/lib/unionlabs/src/tendermint/p2p/default_node_info.rs @@ -1,10 +1,7 @@ use macros::model; -use crate::{ - errors::{required, MissingField}, - tendermint::p2p::{ - default_node_info_other::DefaultNodeInfoOther, protocol_version::ProtocolVersion, - }, +use crate::tendermint::p2p::{ + default_node_info_other::DefaultNodeInfoOther, protocol_version::ProtocolVersion, }; #[model(proto(raw(protos::tendermint::p2p::DefaultNodeInfo)))] @@ -15,32 +12,40 @@ pub struct DefaultNodeInfo { pub network: String, pub version: String, // REVIEW: Is this fixed size (10 bytes)? - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub channels: Vec, pub moniker: String, pub other: DefaultNodeInfoOther, } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromDefaultNodeInfoError { - #[error(transparent)] - MissingField(#[from] MissingField), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + tendermint::p2p::default_node_info::DefaultNodeInfo, + }; + + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromDefaultNodeInfoError { + #[error(transparent)] + MissingField(#[from] MissingField), + } -impl TryFrom for DefaultNodeInfo { - type Error = TryFromDefaultNodeInfoError; + impl TryFrom for DefaultNodeInfo { + type Error = TryFromDefaultNodeInfoError; - fn try_from(value: protos::tendermint::p2p::DefaultNodeInfo) -> Result { - Ok(Self { - protocol_version: required!(value.protocol_version)?.into(), - default_node_id: value.default_node_id, - listen_addr: value.listen_addr, - network: value.network, - version: value.version, - channels: value.channels, - moniker: value.moniker, - other: required!(value.other)?.into(), - }) + fn try_from(value: protos::tendermint::p2p::DefaultNodeInfo) -> Result { + Ok(Self { + protocol_version: required!(value.protocol_version)?.into(), + default_node_id: value.default_node_id, + listen_addr: value.listen_addr, + network: value.network, + version: value.version, + channels: value.channels, + moniker: value.moniker, + other: required!(value.other)?.into(), + }) + } } } diff --git a/lib/unionlabs/src/tendermint/p2p/default_node_info_other.rs b/lib/unionlabs/src/tendermint/p2p/default_node_info_other.rs index f7c30a7d86..e73ddcf071 100644 --- a/lib/unionlabs/src/tendermint/p2p/default_node_info_other.rs +++ b/lib/unionlabs/src/tendermint/p2p/default_node_info_other.rs @@ -7,6 +7,7 @@ pub struct DefaultNodeInfoOther { pub rpc_address: String, } +#[cfg(feature = "proto")] impl From for DefaultNodeInfoOther { fn from(value: protos::tendermint::p2p::DefaultNodeInfoOther) -> Self { Self { diff --git a/lib/unionlabs/src/tendermint/p2p/protocol_version.rs b/lib/unionlabs/src/tendermint/p2p/protocol_version.rs index 5097526c93..b73286cafe 100644 --- a/lib/unionlabs/src/tendermint/p2p/protocol_version.rs +++ b/lib/unionlabs/src/tendermint/p2p/protocol_version.rs @@ -7,6 +7,7 @@ pub struct ProtocolVersion { pub app: u64, } +#[cfg(feature = "proto")] impl From for ProtocolVersion { fn from(value: protos::tendermint::p2p::ProtocolVersion) -> Self { Self { diff --git a/lib/unionlabs/src/tendermint/types/block.rs b/lib/unionlabs/src/tendermint/types/block.rs index 7a7537790a..df04f55403 100644 --- a/lib/unionlabs/src/tendermint/types/block.rs +++ b/lib/unionlabs/src/tendermint/types/block.rs @@ -1,13 +1,7 @@ use macros::model; -use crate::{ - errors::{required, MissingField}, - tendermint::types::{ - commit::{Commit, TryFromCommitError}, - data::Data, - evidence_list::{EvidenceList, TryFromEvidenceListError}, - header::{Header, TryFromHeaderError}, - }, +use crate::tendermint::types::{ + commit::Commit, data::Data, evidence_list::EvidenceList, header::Header, }; #[model(proto(raw(protos::tendermint::types::Block), from, into))] @@ -18,38 +12,49 @@ pub struct Block { pub last_commit: Commit, } -impl From for protos::tendermint::types::Block { - fn from(value: Block) -> Self { - Self { - header: Some(value.header.into()), - data: Some(value.data.into()), - evidence: Some(value.evidence.into()), - last_commit: Some(value.last_commit.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + tendermint::types::{ + block::Block, commit::proto::TryFromCommitError, + evidence_list::proto::TryFromEvidenceListError, header::proto::TryFromHeaderError, + }, + }; + + impl From for protos::tendermint::types::Block { + fn from(value: Block) -> Self { + Self { + header: Some(value.header.into()), + data: Some(value.data.into()), + evidence: Some(value.evidence.into()), + last_commit: Some(value.last_commit.into()), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromBlockError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid header")] - Header(#[from] TryFromHeaderError), - #[error("invalid evidence list")] - EvidenceList(#[from] TryFromEvidenceListError), - #[error("invalid commit")] - Commit(#[from] TryFromCommitError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromBlockError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid header")] + Header(#[from] TryFromHeaderError), + #[error("invalid evidence list")] + EvidenceList(#[from] TryFromEvidenceListError), + #[error("invalid commit")] + Commit(#[from] TryFromCommitError), + } -impl TryFrom for Block { - type Error = TryFromBlockError; + impl TryFrom for Block { + type Error = TryFromBlockError; - fn try_from(value: protos::tendermint::types::Block) -> Result { - Ok(Self { - header: required!(value.header)?.try_into()?, - data: required!(value.data)?.into(), - evidence: required!(value.evidence)?.try_into()?, - last_commit: required!(value.last_commit)?.try_into()?, - }) + fn try_from(value: protos::tendermint::types::Block) -> Result { + Ok(Self { + header: required!(value.header)?.try_into()?, + data: required!(value.data)?.into(), + evidence: required!(value.evidence)?.try_into()?, + last_commit: required!(value.last_commit)?.try_into()?, + }) + } } } diff --git a/lib/unionlabs/src/tendermint/types/block_id.rs b/lib/unionlabs/src/tendermint/types/block_id.rs index efe7e04dca..d0ad9e3fda 100644 --- a/lib/unionlabs/src/tendermint/types/block_id.rs +++ b/lib/unionlabs/src/tendermint/types/block_id.rs @@ -1,12 +1,6 @@ use macros::model; -#[cfg(feature = "ethabi")] -use crate::tendermint::types::part_set_header::TryFromEthAbiPartSetHeaderError; -use crate::{ - errors::{required, InvalidLength, MissingField}, - hash::H256, - tendermint::types::part_set_header::{PartSetHeader, TryFromPartSetHeaderError}, -}; +use crate::{hash::H256, tendermint::types::part_set_header::PartSetHeader}; #[derive(Default)] #[model(proto(raw(protos::tendermint::types::BlockId), into, from))] @@ -16,47 +10,56 @@ pub struct BlockId { pub part_set_header: PartSetHeader, } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromBlockIdError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid hash")] - Hash(#[source] InvalidLength), - #[error("invalid part set header")] - PartSetHeader(#[from] TryFromPartSetHeaderError), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField}, + hash::H256, + tendermint::types::{block_id::BlockId, part_set_header::proto::TryFromPartSetHeaderError}, + }; -impl TryFrom for BlockId { - type Error = TryFromBlockIdError; + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromBlockIdError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid hash")] + Hash(#[source] InvalidLength), + #[error("invalid part set header")] + PartSetHeader(#[from] TryFromPartSetHeaderError), + } - fn try_from(value: protos::tendermint::types::BlockId) -> Result { - Ok(Self { - hash: maybe_empty_h256(&value.hash).map_err(TryFromBlockIdError::Hash)?, - part_set_header: required!(value.part_set_header)?.try_into()?, - }) + impl TryFrom for BlockId { + type Error = TryFromBlockIdError; + + fn try_from(value: protos::tendermint::types::BlockId) -> Result { + Ok(Self { + hash: maybe_empty_h256(&value.hash).map_err(TryFromBlockIdError::Hash)?, + part_set_header: required!(value.part_set_header)?.try_into()?, + }) + } } -} -pub(crate) fn maybe_empty_h256(value: &[u8]) -> Result, InvalidLength> { - Ok(if value.is_empty() { - None - } else { - Some( - value - .try_into() - .map_err(|err: InvalidLength| InvalidLength { - expected: crate::errors::ExpectedLength::Either(0, 32), - found: err.found, - })?, - ) - }) -} + pub(crate) fn maybe_empty_h256(value: &[u8]) -> Result, InvalidLength> { + Ok(if value.is_empty() { + None + } else { + Some( + value + .try_into() + .map_err(|err: InvalidLength| InvalidLength { + expected: crate::errors::ExpectedLength::Either(0, 32), + found: err.found, + })?, + ) + }) + } -impl From for protos::tendermint::types::BlockId { - fn from(value: BlockId) -> Self { - Self { - hash: value.hash.map(Into::into).unwrap_or_default(), - part_set_header: Some(value.part_set_header.into()), + impl From for protos::tendermint::types::BlockId { + fn from(value: BlockId) -> Self { + Self { + hash: value.hash.map(Into::into).unwrap_or_default(), + part_set_header: Some(value.part_set_header.into()), + } } } } @@ -80,35 +83,3 @@ fn proto_roundtrip() { }, }); } - -#[cfg(feature = "ethabi")] -impl From for contracts::glue::TendermintTypesBlockIDData { - fn from(value: BlockId) -> Self { - Self { - hash: value.hash.map(|h| h.get().into()).unwrap_or_default(), - part_set_header: value.part_set_header.into(), - } - } -} - -#[cfg(feature = "ethabi")] -#[derive(Debug, Clone, PartialEq)] -pub enum TryFromEthAbiBlockIdError { - Hash(crate::errors::InvalidLength), - PartSetHeader(TryFromEthAbiPartSetHeaderError), -} - -#[cfg(feature = "ethabi")] -impl TryFrom for BlockId { - type Error = TryFromEthAbiBlockIdError; - - fn try_from(value: contracts::glue::TendermintTypesBlockIDData) -> Result { - Ok(Self { - hash: maybe_empty_h256(&value.hash).map_err(TryFromEthAbiBlockIdError::Hash)?, - part_set_header: value - .part_set_header - .try_into() - .map_err(TryFromEthAbiBlockIdError::PartSetHeader)?, - }) - } -} diff --git a/lib/unionlabs/src/tendermint/types/canonical_block_header.rs b/lib/unionlabs/src/tendermint/types/canonical_block_header.rs index 58f979fdad..5ce6363317 100644 --- a/lib/unionlabs/src/tendermint/types/canonical_block_header.rs +++ b/lib/unionlabs/src/tendermint/types/canonical_block_header.rs @@ -8,6 +8,7 @@ pub struct CanonicalPartSetHeader { pub hash: H256, } +#[cfg(feature = "proto")] impl From for protos::tendermint::types::CanonicalPartSetHeader { fn from(value: CanonicalPartSetHeader) -> Self { Self { diff --git a/lib/unionlabs/src/tendermint/types/canonical_block_id.rs b/lib/unionlabs/src/tendermint/types/canonical_block_id.rs index 9b5f0bc651..7668f2e8a5 100644 --- a/lib/unionlabs/src/tendermint/types/canonical_block_id.rs +++ b/lib/unionlabs/src/tendermint/types/canonical_block_id.rs @@ -8,6 +8,7 @@ pub struct CanonicalBlockId { pub part_set_header: CanonicalPartSetHeader, } +#[cfg(feature = "proto")] impl From for protos::tendermint::types::CanonicalBlockId { fn from(value: CanonicalBlockId) -> Self { Self { diff --git a/lib/unionlabs/src/tendermint/types/canonical_vote.rs b/lib/unionlabs/src/tendermint/types/canonical_vote.rs index 01ca308eff..da41a3f199 100644 --- a/lib/unionlabs/src/tendermint/types/canonical_vote.rs +++ b/lib/unionlabs/src/tendermint/types/canonical_vote.rs @@ -19,6 +19,7 @@ pub struct CanonicalVote { pub timestamp: Timestamp, } +#[cfg(feature = "proto")] impl From for protos::tendermint::types::LegacyCanonicalVote { fn from(value: CanonicalVote) -> Self { Self { diff --git a/lib/unionlabs/src/tendermint/types/commit.rs b/lib/unionlabs/src/tendermint/types/commit.rs index 09d1d91437..2cf8cdded6 100644 --- a/lib/unionlabs/src/tendermint/types/commit.rs +++ b/lib/unionlabs/src/tendermint/types/commit.rs @@ -1,16 +1,8 @@ use macros::model; -#[cfg(feature = "ethabi")] -use crate::tendermint::types::{ - block_id::TryFromEthAbiBlockIdError, commit_sig::TryFromEthAbiCommitSigError, -}; use crate::{ - bounded::{BoundedI32, BoundedI64, BoundedIntError}, - errors::{required, MissingField}, - tendermint::types::{ - block_id::{BlockId, TryFromBlockIdError}, - commit_sig::{CommitSig, TryFromCommitSigError}, - }, + bounded::{BoundedI32, BoundedI64}, + tendermint::types::{block_id::BlockId, commit_sig::CommitSig}, }; #[model(proto(raw(protos::tendermint::types::Commit), into, from))] @@ -21,99 +13,62 @@ pub struct Commit { pub signatures: Vec, } -impl From for protos::tendermint::types::Commit { - fn from(value: Commit) -> Self { - Self { - height: value.height.into(), - round: value.round.into(), - block_id: Some(value.block_id.into()), - signatures: value.signatures.into_iter().map(Into::into).collect(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + bounded::BoundedIntError, + errors::{required, MissingField}, + tendermint::types::{ + block_id::proto::TryFromBlockIdError, commit::Commit, + commit_sig::proto::TryFromCommitSigError, + }, + }; + + impl From for protos::tendermint::types::Commit { + fn from(value: Commit) -> Self { + Self { + height: value.height.into(), + round: value.round.into(), + block_id: Some(value.block_id.into()), + signatures: value.signatures.into_iter().map(Into::into).collect(), + } } } -} - -#[cfg(feature = "ethabi")] -#[derive(Debug, Clone, PartialEq)] -pub enum TryFromEthAbiCommitError { - Height(crate::bounded::BoundedIntError), - Round(crate::bounded::BoundedIntError), - BlockId(TryFromEthAbiBlockIdError), - Signatures(TryFromEthAbiCommitSigError), -} - -#[cfg(feature = "ethabi")] -impl TryFrom for Commit { - type Error = TryFromEthAbiCommitError; - fn try_from(value: contracts::glue::TendermintTypesCommitData) -> Result { - Ok(Self { - height: value - .height - .try_into() - .map_err(TryFromEthAbiCommitError::Height)?, - round: value - .round - .try_into() - .map_err(TryFromEthAbiCommitError::Round)?, - block_id: value - .block_id - .try_into() - .map_err(TryFromEthAbiCommitError::BlockId)?, - signatures: value - .signatures - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromEthAbiCommitError::Signatures)?, - }) + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromCommitError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid height")] + Height(#[source] BoundedIntError), + #[error("invalid round")] + Round(#[source] BoundedIntError), + #[error("invalid block id")] + BlockId(#[source] TryFromBlockIdError), + #[error("invalid signatures")] + Signatures(#[source] TryFromCommitSigError), } -} - -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromCommitError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid height")] - Height(#[source] BoundedIntError), - #[error("invalid round")] - Round(#[source] BoundedIntError), - #[error("invalid block id")] - BlockId(#[source] TryFromBlockIdError), - #[error("invalid signatures")] - Signatures(#[source] TryFromCommitSigError), -} -impl TryFrom for Commit { - type Error = TryFromCommitError; - - fn try_from(value: protos::tendermint::types::Commit) -> Result { - Ok(Self { - height: value - .height - .try_into() - .map_err(TryFromCommitError::Height)?, - round: value.round.try_into().map_err(TryFromCommitError::Round)?, - block_id: required!(value.block_id)? - .try_into() - .map_err(TryFromCommitError::BlockId)?, - signatures: value - .signatures - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromCommitError::Signatures)?, - }) - } -} + impl TryFrom for Commit { + type Error = TryFromCommitError; -#[cfg(feature = "ethabi")] -impl From for contracts::glue::TendermintTypesCommitData { - fn from(value: Commit) -> Self { - Self { - height: value.height.into(), - round: value.round.into(), - block_id: value.block_id.into(), - signatures: value.signatures.into_iter().map(Into::into).collect(), + fn try_from(value: protos::tendermint::types::Commit) -> Result { + Ok(Self { + height: value + .height + .try_into() + .map_err(TryFromCommitError::Height)?, + round: value.round.try_into().map_err(TryFromCommitError::Round)?, + block_id: required!(value.block_id)? + .try_into() + .map_err(TryFromCommitError::BlockId)?, + signatures: value + .signatures + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromCommitError::Signatures)?, + }) } } } diff --git a/lib/unionlabs/src/tendermint/types/commit_sig.rs b/lib/unionlabs/src/tendermint/types/commit_sig.rs index 3382d5cf5e..223d21b09c 100644 --- a/lib/unionlabs/src/tendermint/types/commit_sig.rs +++ b/lib/unionlabs/src/tendermint/types/commit_sig.rs @@ -1,13 +1,6 @@ use macros::model; -#[cfg(feature = "ethabi")] -use crate::google::protobuf::timestamp::TryFromEthAbiTimestampError; -use crate::{ - errors::{required, InvalidLength, MissingField, UnknownEnumVariant}, - google::protobuf::timestamp::{Timestamp, TryFromTimestampError}, - hash::H160, - tendermint::types::block_id_flag::BlockIdFlag, -}; +use crate::{google::protobuf::timestamp::Timestamp, hash::H160}; #[model(proto(raw(protos::tendermint::types::CommitSig), into, from))] pub enum CommitSig { @@ -15,211 +8,124 @@ pub enum CommitSig { Commit { validator_address: H160, timestamp: Timestamp, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] signature: Vec, }, Nil { validator_address: H160, timestamp: Timestamp, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] signature: Vec, }, } -impl From for protos::tendermint::types::CommitSig { - fn from(value: CommitSig) -> Self { - match value { - CommitSig::Absent => Self { - block_id_flag: BlockIdFlag::Absent.into(), - validator_address: vec![], - timestamp: None, - signature: vec![], - }, - CommitSig::Commit { - validator_address, - timestamp, - signature, - } => Self { - block_id_flag: BlockIdFlag::Commit.into(), - validator_address: validator_address.into(), - timestamp: Some(timestamp.into()), - signature, - }, - CommitSig::Nil { - validator_address, - timestamp, - signature, - } => Self { - block_id_flag: BlockIdFlag::Nil.into(), - validator_address: validator_address.into(), - timestamp: Some(timestamp.into()), - signature, - }, - } - } -} - -#[cfg(feature = "ethabi")] -#[derive(Debug, Clone, PartialEq)] -pub enum TryFromEthAbiCommitSigError { - BlockIdFlag(UnknownEnumVariant), - ValidatorAddress(crate::errors::InvalidLength), - Timestamp(TryFromEthAbiTimestampError), - UnknownBlockIdFlag, - AbsentWithValidatorAddress, - AbsentWithTimestamp, - AbsentWithSignature, -} - -#[cfg(feature = "ethabi")] -impl TryFrom for CommitSig { - type Error = TryFromEthAbiCommitSigError; - - fn try_from(value: contracts::glue::TendermintTypesCommitSigData) -> Result { - let block_id_flag = BlockIdFlag::try_from(value.block_id_flag) - .map_err(TryFromEthAbiCommitSigError::BlockIdFlag)?; - - match block_id_flag { - BlockIdFlag::Unknown => Err(TryFromEthAbiCommitSigError::UnknownBlockIdFlag), - BlockIdFlag::Absent => { - if !value.validator_address.is_empty() { - Err(TryFromEthAbiCommitSigError::AbsentWithValidatorAddress) - } else if value.timestamp != contracts::glue::GoogleProtobufTimestampData::default() - { - Err(TryFromEthAbiCommitSigError::AbsentWithTimestamp) - } else if !value.signature.is_empty() { - Err(TryFromEthAbiCommitSigError::AbsentWithSignature) - } else { - Ok(Self::Absent) - } +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField, UnknownEnumVariant}, + google::protobuf::timestamp::{proto::TryFromTimestampError, Timestamp}, + tendermint::types::{block_id_flag::BlockIdFlag, commit_sig::CommitSig}, + }; + + impl From for protos::tendermint::types::CommitSig { + fn from(value: CommitSig) -> Self { + match value { + CommitSig::Absent => Self { + block_id_flag: BlockIdFlag::Absent.into(), + validator_address: vec![], + timestamp: None, + signature: vec![], + }, + CommitSig::Commit { + validator_address, + timestamp, + signature, + } => Self { + block_id_flag: BlockIdFlag::Commit.into(), + validator_address: validator_address.into(), + timestamp: Some(timestamp.into()), + signature, + }, + CommitSig::Nil { + validator_address, + timestamp, + signature, + } => Self { + block_id_flag: BlockIdFlag::Nil.into(), + validator_address: validator_address.into(), + timestamp: Some(timestamp.into()), + signature, + }, } - BlockIdFlag::Commit => Ok(Self::Commit { - validator_address: value - .validator_address - .to_vec() - .try_into() - .map_err(TryFromEthAbiCommitSigError::ValidatorAddress)?, - timestamp: value - .timestamp - .try_into() - .map_err(TryFromEthAbiCommitSigError::Timestamp)?, - signature: value.signature.to_vec(), - }), - BlockIdFlag::Nil => Ok(Self::Nil { - validator_address: value - .validator_address - .to_vec() - .try_into() - .map_err(TryFromEthAbiCommitSigError::ValidatorAddress)?, - timestamp: value - .timestamp - .try_into() - .map_err(TryFromEthAbiCommitSigError::Timestamp)?, - signature: value.signature.to_vec(), - }), } } -} - -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromCommitSigError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid validator address")] - ValidatorAddress(InvalidLength), - #[error("invalid block id flag")] - BlockIdFlag(UnknownEnumVariant), - #[error("invalid timestamp")] - Timestamp(TryFromTimestampError), - #[error("block id flag was `Unknown`")] - UnknownBlockIdFlag, - #[error("an absent commit sig had an address")] - AbsentWithValidatorAddress, - #[error("an absent commit sig had a timestamp")] - AbsentWithTimestamp, - #[error("an absent commit sig had a signature")] - AbsentWithSignature, -} -impl TryFrom for CommitSig { - type Error = TryFromCommitSigError; - - fn try_from(value: protos::tendermint::types::CommitSig) -> Result { - let block_id_flag = BlockIdFlag::try_from(value.block_id_flag) - .map_err(TryFromCommitSigError::BlockIdFlag)?; + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromCommitSigError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid validator address")] + ValidatorAddress(InvalidLength), + #[error("invalid block id flag")] + BlockIdFlag(UnknownEnumVariant), + #[error("invalid timestamp")] + Timestamp(TryFromTimestampError), + #[error("block id flag was `Unknown`")] + UnknownBlockIdFlag, + #[error("an absent commit sig had an address")] + AbsentWithValidatorAddress, + #[error("an absent commit sig had a timestamp")] + AbsentWithTimestamp, + #[error("an absent commit sig had a signature")] + AbsentWithSignature, + } - match block_id_flag { - BlockIdFlag::Unknown => Err(TryFromCommitSigError::UnknownBlockIdFlag), - BlockIdFlag::Absent => { - if !value.validator_address.is_empty() { - Err(TryFromCommitSigError::AbsentWithValidatorAddress) - } else if value - .timestamp - .is_some_and(|ts| ts != Timestamp::default().into()) - { - Err(TryFromCommitSigError::AbsentWithTimestamp) - } else if !value.signature.is_empty() { - Err(TryFromCommitSigError::AbsentWithSignature) - } else { - Ok(Self::Absent) + impl TryFrom for CommitSig { + type Error = TryFromCommitSigError; + + fn try_from(value: protos::tendermint::types::CommitSig) -> Result { + let block_id_flag = BlockIdFlag::try_from(value.block_id_flag) + .map_err(TryFromCommitSigError::BlockIdFlag)?; + + match block_id_flag { + BlockIdFlag::Unknown => Err(TryFromCommitSigError::UnknownBlockIdFlag), + BlockIdFlag::Absent => { + if !value.validator_address.is_empty() { + Err(TryFromCommitSigError::AbsentWithValidatorAddress) + } else if value + .timestamp + .is_some_and(|ts| ts != Timestamp::default().into()) + { + Err(TryFromCommitSigError::AbsentWithTimestamp) + } else if !value.signature.is_empty() { + Err(TryFromCommitSigError::AbsentWithSignature) + } else { + Ok(Self::Absent) + } } + BlockIdFlag::Commit => Ok(Self::Commit { + validator_address: value + .validator_address + .try_into() + .map_err(TryFromCommitSigError::ValidatorAddress)?, + timestamp: required!(value.timestamp)? + .try_into() + .map_err(TryFromCommitSigError::Timestamp)?, + signature: value.signature, + }), + BlockIdFlag::Nil => Ok(Self::Nil { + validator_address: value + .validator_address + .try_into() + .map_err(TryFromCommitSigError::ValidatorAddress)?, + timestamp: required!(value.timestamp)? + .try_into() + .map_err(TryFromCommitSigError::Timestamp)?, + signature: value.signature, + }), } - BlockIdFlag::Commit => Ok(Self::Commit { - validator_address: value - .validator_address - .try_into() - .map_err(TryFromCommitSigError::ValidatorAddress)?, - timestamp: required!(value.timestamp)? - .try_into() - .map_err(TryFromCommitSigError::Timestamp)?, - signature: value.signature, - }), - BlockIdFlag::Nil => Ok(Self::Nil { - validator_address: value - .validator_address - .try_into() - .map_err(TryFromCommitSigError::ValidatorAddress)?, - timestamp: required!(value.timestamp)? - .try_into() - .map_err(TryFromCommitSigError::Timestamp)?, - signature: value.signature, - }), - } - } -} - -#[cfg(feature = "ethabi")] -impl From for contracts::glue::TendermintTypesCommitSigData { - fn from(value: CommitSig) -> Self { - match value { - CommitSig::Absent => Self { - block_id_flag: BlockIdFlag::Absent.into(), - validator_address: vec![].into(), - timestamp: contracts::glue::GoogleProtobufTimestampData::default(), - signature: vec![].into(), - }, - CommitSig::Commit { - validator_address, - timestamp, - signature, - } => Self { - block_id_flag: BlockIdFlag::Commit.into(), - validator_address: validator_address.get().into(), - timestamp: timestamp.into(), - signature: signature.into(), - }, - CommitSig::Nil { - validator_address, - timestamp, - signature, - } => Self { - block_id_flag: BlockIdFlag::Nil.into(), - validator_address: validator_address.get().into(), - timestamp: timestamp.into(), - signature: signature.into(), - }, } } } diff --git a/lib/unionlabs/src/tendermint/types/data.rs b/lib/unionlabs/src/tendermint/types/data.rs index dc9f32ce67..65231b95c1 100644 --- a/lib/unionlabs/src/tendermint/types/data.rs +++ b/lib/unionlabs/src/tendermint/types/data.rs @@ -2,19 +2,24 @@ use macros::model; #[model(proto(raw(protos::tendermint::types::Data), from, into))] pub struct Data { - #[serde(with = "::serde_utils::hex_string_list")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string_list"))] #[debug(wrap = ::serde_utils::fmt::DebugListAsHex)] pub txs: Vec>, } -impl From for protos::tendermint::types::Data { - fn from(value: Data) -> Self { - Self { txs: value.txs } +#[cfg(feature = "proto")] +pub mod proto { + use crate::tendermint::types::data::Data; + + impl From for protos::tendermint::types::Data { + fn from(value: Data) -> Self { + Self { txs: value.txs } + } } -} -impl From for Data { - fn from(value: protos::tendermint::types::Data) -> Self { - Self { txs: value.txs } + impl From for Data { + fn from(value: protos::tendermint::types::Data) -> Self { + Self { txs: value.txs } + } } } diff --git a/lib/unionlabs/src/tendermint/types/duplicate_vote_evidence.rs b/lib/unionlabs/src/tendermint/types/duplicate_vote_evidence.rs index f1bfb5339a..880e2851e3 100644 --- a/lib/unionlabs/src/tendermint/types/duplicate_vote_evidence.rs +++ b/lib/unionlabs/src/tendermint/types/duplicate_vote_evidence.rs @@ -1,10 +1,6 @@ use macros::model; -use crate::{ - errors::{required, MissingField}, - google::protobuf::timestamp::{Timestamp, TryFromTimestampError}, - tendermint::types::vote::{TryFromVoteError, Vote}, -}; +use crate::{google::protobuf::timestamp::Timestamp, tendermint::types::vote::Vote}; #[model(proto(raw(protos::tendermint::types::DuplicateVoteEvidence), from, into))] pub struct DuplicateVoteEvidence { @@ -15,46 +11,57 @@ pub struct DuplicateVoteEvidence { pub timestamp: Timestamp, } -impl From for protos::tendermint::types::DuplicateVoteEvidence { - fn from(value: DuplicateVoteEvidence) -> Self { - Self { - vote_a: Some(value.vote_a.into()), - vote_b: Some(value.vote_b.into()), - total_voting_power: value.total_voting_power, - validator_power: value.validator_power, - timestamp: Some(value.timestamp.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + google::protobuf::timestamp::proto::TryFromTimestampError, + tendermint::types::{ + duplicate_vote_evidence::DuplicateVoteEvidence, vote::proto::TryFromVoteError, + }, + }; + + impl From for protos::tendermint::types::DuplicateVoteEvidence { + fn from(value: DuplicateVoteEvidence) -> Self { + Self { + vote_a: Some(value.vote_a.into()), + vote_b: Some(value.vote_b.into()), + total_voting_power: value.total_voting_power, + validator_power: value.validator_power, + timestamp: Some(value.timestamp.into()), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromDuplicateVoteEvidenceError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid vote a")] - VoteA(#[source] TryFromVoteError), - #[error("invalid vote b")] - VoteB(#[source] TryFromVoteError), - #[error("invalid timestamp")] - Timestamp(#[from] TryFromTimestampError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromDuplicateVoteEvidenceError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid vote a")] + VoteA(#[source] TryFromVoteError), + #[error("invalid vote b")] + VoteB(#[source] TryFromVoteError), + #[error("invalid timestamp")] + Timestamp(#[from] TryFromTimestampError), + } -impl TryFrom for DuplicateVoteEvidence { - type Error = TryFromDuplicateVoteEvidenceError; + impl TryFrom for DuplicateVoteEvidence { + type Error = TryFromDuplicateVoteEvidenceError; - fn try_from( - value: protos::tendermint::types::DuplicateVoteEvidence, - ) -> Result { - Ok(Self { - vote_a: required!(value.vote_a)? - .try_into() - .map_err(TryFromDuplicateVoteEvidenceError::VoteA)?, - vote_b: required!(value.vote_b)? - .try_into() - .map_err(TryFromDuplicateVoteEvidenceError::VoteB)?, - total_voting_power: value.total_voting_power, - validator_power: value.validator_power, - timestamp: required!(value.timestamp)?.try_into()?, - }) + fn try_from( + value: protos::tendermint::types::DuplicateVoteEvidence, + ) -> Result { + Ok(Self { + vote_a: required!(value.vote_a)? + .try_into() + .map_err(TryFromDuplicateVoteEvidenceError::VoteA)?, + vote_b: required!(value.vote_b)? + .try_into() + .map_err(TryFromDuplicateVoteEvidenceError::VoteB)?, + total_voting_power: value.total_voting_power, + validator_power: value.validator_power, + timestamp: required!(value.timestamp)?.try_into()?, + }) + } } } diff --git a/lib/unionlabs/src/tendermint/types/evidence.rs b/lib/unionlabs/src/tendermint/types/evidence.rs index 71481342ce..4acfde2d0b 100644 --- a/lib/unionlabs/src/tendermint/types/evidence.rs +++ b/lib/unionlabs/src/tendermint/types/evidence.rs @@ -1,13 +1,8 @@ use macros::model; -use crate::{ - errors::{required, MissingField}, - tendermint::types::{ - duplicate_vote_evidence::{DuplicateVoteEvidence, TryFromDuplicateVoteEvidenceError}, - light_client_attack_evidence::{ - LightClientAttackEvidence, TryFromLightClientAttackEvidenceError, - }, - }, +use crate::tendermint::types::{ + duplicate_vote_evidence::DuplicateVoteEvidence, + light_client_attack_evidence::LightClientAttackEvidence, }; #[model(proto(raw(protos::tendermint::types::Evidence), into, from))] @@ -17,51 +12,63 @@ pub enum Evidence { LightClientAttack(LightClientAttackEvidence), } -impl From for protos::tendermint::types::Evidence { - fn from(value: Evidence) -> Self { - Self { - sum: Some(match value { - Evidence::DuplicateVote(e) => { - protos::tendermint::types::evidence::Sum::DuplicateVoteEvidence(e.into()) - } - Evidence::LightClientAttack(e) => { - protos::tendermint::types::evidence::Sum::LightClientAttackEvidence(e.into()) - } - }), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + tendermint::types::{ + duplicate_vote_evidence::proto::TryFromDuplicateVoteEvidenceError, evidence::Evidence, + light_client_attack_evidence::proto::TryFromLightClientAttackEvidenceError, + }, + }; + + impl From for protos::tendermint::types::Evidence { + fn from(value: Evidence) -> Self { + Self { + sum: Some(match value { + Evidence::DuplicateVote(e) => { + protos::tendermint::types::evidence::Sum::DuplicateVoteEvidence(e.into()) + } + Evidence::LightClientAttack(e) => { + protos::tendermint::types::evidence::Sum::LightClientAttackEvidence( + e.into(), + ) + } + }), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromEvidenceError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid duplicate vote evidence")] - DuplicateVote(#[from] TryFromDuplicateVoteEvidenceError), - #[error("invalid light client attack evidence")] - LightClientAttack(#[from] TryFromLightClientAttackEvidenceError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromEvidenceError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid duplicate vote evidence")] + DuplicateVote(#[from] TryFromDuplicateVoteEvidenceError), + #[error("invalid light client attack evidence")] + LightClientAttack(#[from] TryFromLightClientAttackEvidenceError), + } -impl TryFrom for Evidence { - type Error = TryFromEvidenceError; + impl TryFrom for Evidence { + type Error = TryFromEvidenceError; - fn try_from(value: protos::tendermint::types::Evidence) -> Result { - Ok(match required!(value.sum)? { - protos::tendermint::types::evidence::Sum::DuplicateVoteEvidence(e) => { - Self::DuplicateVote(e.try_into()?) - } - protos::tendermint::types::evidence::Sum::LightClientAttackEvidence(e) => { - Self::LightClientAttack(e.try_into()?) - } - }) + fn try_from(value: protos::tendermint::types::Evidence) -> Result { + Ok(match required!(value.sum)? { + protos::tendermint::types::evidence::Sum::DuplicateVoteEvidence(e) => { + Self::DuplicateVote(e.try_into()?) + } + protos::tendermint::types::evidence::Sum::LightClientAttackEvidence(e) => { + Self::LightClientAttack(e.try_into()?) + } + }) + } } -} -#[cfg(test)] -mod tests { - #[test] - fn json() { - let json = r#" + #[cfg(test)] + pub(crate) mod tests { + #[test] + fn json() { + let json = r#" { "type": "tendermint/DuplicateVoteEvidence", "value": { @@ -108,8 +115,10 @@ mod tests { } "#; - let evidence = serde_json::from_str::(json).unwrap(); + let evidence = + serde_json::from_str::(json).unwrap(); - dbg!(evidence); + dbg!(evidence); + } } } diff --git a/lib/unionlabs/src/tendermint/types/evidence_list.rs b/lib/unionlabs/src/tendermint/types/evidence_list.rs index 36138059ed..4c7d9e4dbf 100644 --- a/lib/unionlabs/src/tendermint/types/evidence_list.rs +++ b/lib/unionlabs/src/tendermint/types/evidence_list.rs @@ -1,36 +1,43 @@ use macros::model; -use crate::tendermint::types::evidence::{Evidence, TryFromEvidenceError}; +use crate::tendermint::types::evidence::Evidence; #[model(proto(raw(protos::tendermint::types::EvidenceList), into, from))] pub struct EvidenceList { pub evidence: Vec, } -impl From for protos::tendermint::types::EvidenceList { - fn from(value: EvidenceList) -> Self { - Self { - evidence: value.evidence.into_iter().map(Into::into).collect(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::tendermint::types::{ + evidence::proto::TryFromEvidenceError, evidence_list::EvidenceList, + }; + + impl From for protos::tendermint::types::EvidenceList { + fn from(value: EvidenceList) -> Self { + Self { + evidence: value.evidence.into_iter().map(Into::into).collect(), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromEvidenceListError { - #[error("invalid evidence")] - Evidence(#[from] TryFromEvidenceError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromEvidenceListError { + #[error("invalid evidence")] + Evidence(#[from] TryFromEvidenceError), + } -impl TryFrom for EvidenceList { - type Error = TryFromEvidenceListError; + impl TryFrom for EvidenceList { + type Error = TryFromEvidenceListError; - fn try_from(value: protos::tendermint::types::EvidenceList) -> Result { - Ok(Self { - evidence: value - .evidence - .into_iter() - .map(TryInto::try_into) - .collect::>()?, - }) + fn try_from(value: protos::tendermint::types::EvidenceList) -> Result { + Ok(Self { + evidence: value + .evidence + .into_iter() + .map(TryInto::try_into) + .collect::>()?, + }) + } } } diff --git a/lib/unionlabs/src/tendermint/types/header.rs b/lib/unionlabs/src/tendermint/types/header.rs index c0bfa6efc8..063ccb5545 100644 --- a/lib/unionlabs/src/tendermint/types/header.rs +++ b/lib/unionlabs/src/tendermint/types/header.rs @@ -1,22 +1,10 @@ use macros::model; -use prost::Message; -use protos::google::protobuf::{BytesValue, Int64Value, StringValue}; -use rs_merkle::{algorithms::Sha256, Hasher}; use crate::{ - bounded::{BoundedI64, BoundedIntError}, - errors::{required, InvalidLength, MissingField}, - google::protobuf::timestamp::{Timestamp, TryFromTimestampError}, + bounded::BoundedI64, + google::protobuf::timestamp::Timestamp, hash::{H160, H256}, - tendermint::{ - types::block_id::{BlockId, TryFromBlockIdError}, - version::consensus::Consensus, - }, -}; -#[cfg(feature = "ethabi")] -use crate::{ - google::protobuf::timestamp::TryFromEthAbiTimestampError, - tendermint::types::block_id::TryFromEthAbiBlockIdError, + tendermint::{types::block_id::BlockId, version::consensus::Consensus}, }; #[model(proto(raw(protos::tendermint::types::Header), into, from))] @@ -24,7 +12,7 @@ pub struct Header { /// basic block info pub version: Consensus, pub chain_id: String, - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub height: BoundedI64<0, { i64::MAX }>, pub time: Timestamp, /// prev block info @@ -56,9 +44,14 @@ pub struct Header { } impl Header { + #[cfg(feature = "proto")] #[must_use] #[allow(clippy::too_many_lines)] pub fn calculate_merkle_root(&self) -> Option { + use prost::Message; + use protos::google::protobuf::{BytesValue, Int64Value, StringValue}; + use rs_merkle::{algorithms::Sha256, Hasher}; + const LEAF_PREFIX: u8 = 0; const INNER_PREFIX: u8 = 1; @@ -173,218 +166,121 @@ impl Header { } } -impl From
for protos::tendermint::types::Header { - fn from(value: Header) -> Self { - Self { - version: Some(value.version.into()), - chain_id: value.chain_id, - height: value.height.into(), - time: Some(value.time.into()), - last_block_id: Some(value.last_block_id.into()), - last_commit_hash: value.last_commit_hash.into(), - data_hash: value.data_hash.into(), - validators_hash: value.validators_hash.into(), - next_validators_hash: value.next_validators_hash.into(), - consensus_hash: value.consensus_hash.into(), - app_hash: value.app_hash.into(), - last_results_hash: value.last_results_hash.into(), - evidence_hash: value.evidence_hash.into(), - proposer_address: value.proposer_address.into(), - } - } -} - -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromHeaderError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid last block id")] - LastBlockId(#[source] TryFromBlockIdError), - #[error("invalid height")] - Height(#[source] BoundedIntError), - #[error("invalid timestamp")] - Timestamp(#[source] TryFromTimestampError), - #[error("invalid last commit hash")] - LastCommitHash(#[source] InvalidLength), - #[error("invalid data hash")] - DataHash(#[source] InvalidLength), - #[error("invalid validators hash")] - ValidatorsHash(#[source] InvalidLength), - #[error("invalid next validators hash")] - NextValidatorsHash(#[source] InvalidLength), - #[error("invalid consensus hash")] - ConsensusHash(#[source] InvalidLength), - #[error("invalid app hash")] - AppHash(#[source] InvalidLength), - #[error("invalid last results hash")] - LastResultsHash(#[source] InvalidLength), - #[error("invalid evidence hash")] - EvidenceHash(#[source] InvalidLength), - #[error("invalid proposer address")] - ProposerAddress(#[source] InvalidLength), -} - -impl TryFrom for Header { - type Error = TryFromHeaderError; - - fn try_from(value: protos::tendermint::types::Header) -> Result { - Ok(Self { - version: required!(value.version)?.into(), - chain_id: value.chain_id, - height: value - .height - .try_into() - .map_err(TryFromHeaderError::Height)?, - time: required!(value.time)? - .try_into() - .map_err(TryFromHeaderError::Timestamp)?, - last_block_id: required!(value.last_block_id)? - .try_into() - .map_err(TryFromHeaderError::LastBlockId)?, - last_commit_hash: value - .last_commit_hash - .try_into() - .map_err(TryFromHeaderError::LastCommitHash)?, - data_hash: value - .data_hash - .try_into() - .map_err(TryFromHeaderError::DataHash)?, - validators_hash: value - .validators_hash - .try_into() - .map_err(TryFromHeaderError::ValidatorsHash)?, - next_validators_hash: value - .next_validators_hash - .try_into() - .map_err(TryFromHeaderError::NextValidatorsHash)?, - consensus_hash: value - .consensus_hash - .try_into() - .map_err(TryFromHeaderError::ConsensusHash)?, - app_hash: value - .app_hash - .try_into() - .map_err(TryFromHeaderError::AppHash)?, - last_results_hash: value - .last_results_hash - .try_into() - .map_err(TryFromHeaderError::LastResultsHash)?, - evidence_hash: value - .evidence_hash - .try_into() - .map_err(TryFromHeaderError::EvidenceHash)?, - proposer_address: value - .proposer_address - .try_into() - .map_err(TryFromHeaderError::ProposerAddress)?, - }) - } -} +#[cfg(feature = "proto")] +pub mod proto { + use super::Header; + use crate::{ + bounded::BoundedIntError, + errors::{required, InvalidLength, MissingField}, + google::protobuf::timestamp::proto::TryFromTimestampError, + tendermint::types::block_id::proto::TryFromBlockIdError, + }; -#[cfg(feature = "ethabi")] -impl From
for contracts::glue::TendermintTypesHeaderData { - fn from(value: Header) -> Self { - Self { - version: value.version.into(), - chain_id: value.chain_id, - height: value.height.into(), - time: value.time.into(), - last_block_id: value.last_block_id.into(), - last_commit_hash: value.last_commit_hash.get().into(), - data_hash: value.data_hash.get().into(), - validators_hash: value.validators_hash.get().into(), - next_validators_hash: value.next_validators_hash.get().into(), - consensus_hash: value.consensus_hash.get().into(), - app_hash: value.app_hash.get().into(), - last_results_hash: value.last_results_hash.get().into(), - evidence_hash: value.evidence_hash.get().into(), - proposer_address: value.proposer_address.get().into(), + impl From
for protos::tendermint::types::Header { + fn from(value: Header) -> Self { + Self { + version: Some(value.version.into()), + chain_id: value.chain_id, + height: value.height.into(), + time: Some(value.time.into()), + last_block_id: Some(value.last_block_id.into()), + last_commit_hash: value.last_commit_hash.into(), + data_hash: value.data_hash.into(), + validators_hash: value.validators_hash.into(), + next_validators_hash: value.next_validators_hash.into(), + consensus_hash: value.consensus_hash.into(), + app_hash: value.app_hash.into(), + last_results_hash: value.last_results_hash.into(), + evidence_hash: value.evidence_hash.into(), + proposer_address: value.proposer_address.into(), + } } } -} -#[cfg(feature = "ethabi")] -#[derive(Debug, Clone, PartialEq)] -pub enum TryFromEthAbiHeaderError { - LastBlockId(TryFromEthAbiBlockIdError), - Height(BoundedIntError), - Timestamp(TryFromEthAbiTimestampError), - LastCommitHash(InvalidLength), - DataHash(InvalidLength), - ValidatorsHash(InvalidLength), - NextValidatorsHash(InvalidLength), - ConsensusHash(InvalidLength), - AppHash(InvalidLength), - LastResultsHash(InvalidLength), - EvidenceHash(InvalidLength), - ProposerAddress(InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromHeaderError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid last block id")] + LastBlockId(#[source] TryFromBlockIdError), + #[error("invalid height")] + Height(#[source] BoundedIntError), + #[error("invalid timestamp")] + Timestamp(#[source] TryFromTimestampError), + #[error("invalid last commit hash")] + LastCommitHash(#[source] InvalidLength), + #[error("invalid data hash")] + DataHash(#[source] InvalidLength), + #[error("invalid validators hash")] + ValidatorsHash(#[source] InvalidLength), + #[error("invalid next validators hash")] + NextValidatorsHash(#[source] InvalidLength), + #[error("invalid consensus hash")] + ConsensusHash(#[source] InvalidLength), + #[error("invalid app hash")] + AppHash(#[source] InvalidLength), + #[error("invalid last results hash")] + LastResultsHash(#[source] InvalidLength), + #[error("invalid evidence hash")] + EvidenceHash(#[source] InvalidLength), + #[error("invalid proposer address")] + ProposerAddress(#[source] InvalidLength), + } -#[cfg(feature = "ethabi")] -impl TryFrom for Header { - type Error = TryFromEthAbiHeaderError; + impl TryFrom for Header { + type Error = TryFromHeaderError; - fn try_from(value: contracts::glue::TendermintTypesHeaderData) -> Result { - Ok(Self { - version: value.version.into(), - chain_id: value.chain_id, - height: value - .height - .try_into() - .map_err(TryFromEthAbiHeaderError::Height)?, - time: value - .time - .try_into() - .map_err(TryFromEthAbiHeaderError::Timestamp)?, - last_block_id: value - .last_block_id - .try_into() - .map_err(TryFromEthAbiHeaderError::LastBlockId)?, - last_commit_hash: value - .last_commit_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiHeaderError::LastCommitHash)?, - data_hash: value - .data_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiHeaderError::DataHash)?, - validators_hash: value - .validators_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiHeaderError::ValidatorsHash)?, - next_validators_hash: value - .next_validators_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiHeaderError::NextValidatorsHash)?, - consensus_hash: value - .consensus_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiHeaderError::ConsensusHash)?, - app_hash: value - .app_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiHeaderError::AppHash)?, - last_results_hash: value - .last_results_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiHeaderError::LastResultsHash)?, - evidence_hash: value - .evidence_hash - .to_vec() - .try_into() - .map_err(TryFromEthAbiHeaderError::EvidenceHash)?, - proposer_address: value - .proposer_address - .to_vec() - .try_into() - .map_err(TryFromEthAbiHeaderError::ProposerAddress)?, - }) + fn try_from(value: protos::tendermint::types::Header) -> Result { + Ok(Self { + version: required!(value.version)?.into(), + chain_id: value.chain_id, + height: value + .height + .try_into() + .map_err(TryFromHeaderError::Height)?, + time: required!(value.time)? + .try_into() + .map_err(TryFromHeaderError::Timestamp)?, + last_block_id: required!(value.last_block_id)? + .try_into() + .map_err(TryFromHeaderError::LastBlockId)?, + last_commit_hash: value + .last_commit_hash + .try_into() + .map_err(TryFromHeaderError::LastCommitHash)?, + data_hash: value + .data_hash + .try_into() + .map_err(TryFromHeaderError::DataHash)?, + validators_hash: value + .validators_hash + .try_into() + .map_err(TryFromHeaderError::ValidatorsHash)?, + next_validators_hash: value + .next_validators_hash + .try_into() + .map_err(TryFromHeaderError::NextValidatorsHash)?, + consensus_hash: value + .consensus_hash + .try_into() + .map_err(TryFromHeaderError::ConsensusHash)?, + app_hash: value + .app_hash + .try_into() + .map_err(TryFromHeaderError::AppHash)?, + last_results_hash: value + .last_results_hash + .try_into() + .map_err(TryFromHeaderError::LastResultsHash)?, + evidence_hash: value + .evidence_hash + .try_into() + .map_err(TryFromHeaderError::EvidenceHash)?, + proposer_address: value + .proposer_address + .try_into() + .map_err(TryFromHeaderError::ProposerAddress)?, + }) + } } } diff --git a/lib/unionlabs/src/tendermint/types/light_block.rs b/lib/unionlabs/src/tendermint/types/light_block.rs index d645d77807..a2b9cda60f 100644 --- a/lib/unionlabs/src/tendermint/types/light_block.rs +++ b/lib/unionlabs/src/tendermint/types/light_block.rs @@ -1,12 +1,6 @@ use macros::model; -use crate::{ - errors::{required, MissingField}, - tendermint::types::{ - signed_header::{SignedHeader, TryFromSignedHeaderError}, - validator_set::{TryFromValidatorSetError, ValidatorSet}, - }, -}; +use crate::tendermint::types::{signed_header::SignedHeader, validator_set::ValidatorSet}; #[model(proto(raw(protos::tendermint::types::LightBlock), from, into))] pub struct LightBlock { @@ -14,32 +8,43 @@ pub struct LightBlock { pub validator_set: ValidatorSet, } -impl From for protos::tendermint::types::LightBlock { - fn from(value: LightBlock) -> Self { - Self { - signed_header: Some(value.signed_header.into()), - validator_set: Some(value.validator_set.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + tendermint::types::{ + light_block::LightBlock, signed_header::proto::TryFromSignedHeaderError, + validator_set::proto::TryFromValidatorSetError, + }, + }; + + impl From for protos::tendermint::types::LightBlock { + fn from(value: LightBlock) -> Self { + Self { + signed_header: Some(value.signed_header.into()), + validator_set: Some(value.validator_set.into()), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromLightBlockError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid signed header")] - SignedHeader(#[from] TryFromSignedHeaderError), - #[error("invalid validator set")] - ValidatorSet(#[from] TryFromValidatorSetError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromLightBlockError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid signed header")] + SignedHeader(#[from] TryFromSignedHeaderError), + #[error("invalid validator set")] + ValidatorSet(#[from] TryFromValidatorSetError), + } -impl TryFrom for LightBlock { - type Error = TryFromLightBlockError; + impl TryFrom for LightBlock { + type Error = TryFromLightBlockError; - fn try_from(value: protos::tendermint::types::LightBlock) -> Result { - Ok(Self { - signed_header: required!(value.signed_header)?.try_into()?, - validator_set: required!(value.validator_set)?.try_into()?, - }) + fn try_from(value: protos::tendermint::types::LightBlock) -> Result { + Ok(Self { + signed_header: required!(value.signed_header)?.try_into()?, + validator_set: required!(value.validator_set)?.try_into()?, + }) + } } } diff --git a/lib/unionlabs/src/tendermint/types/light_client_attack_evidence.rs b/lib/unionlabs/src/tendermint/types/light_client_attack_evidence.rs index f84ef88e52..1e7092d159 100644 --- a/lib/unionlabs/src/tendermint/types/light_client_attack_evidence.rs +++ b/lib/unionlabs/src/tendermint/types/light_client_attack_evidence.rs @@ -1,13 +1,9 @@ use macros::model; use crate::{ - bounded::{BoundedI64, BoundedIntError}, - errors::{required, MissingField}, - google::protobuf::timestamp::{Timestamp, TryFromTimestampError}, - tendermint::types::{ - light_block::{LightBlock, TryFromLightBlockError}, - validator::{TryFromValidatorError, Validator}, - }, + bounded::BoundedI64, + google::protobuf::timestamp::Timestamp, + tendermint::types::{light_block::LightBlock, validator::Validator}, }; #[model(proto(raw(protos::tendermint::types::LightClientAttackEvidence)))] @@ -19,52 +15,66 @@ pub struct LightClientAttackEvidence { pub timestamp: Timestamp, } -impl From for protos::tendermint::types::LightClientAttackEvidence { - fn from(value: LightClientAttackEvidence) -> Self { - Self { - conflicting_block: Some(value.conflicting_block.into()), - common_height: value.common_height.into(), - byzantine_validators: value - .byzantine_validators - .into_iter() - .map(Into::into) - .collect(), - total_voting_power: value.total_voting_power, - timestamp: Some(value.timestamp.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + bounded::BoundedIntError, + errors::{required, MissingField}, + google::protobuf::timestamp::proto::TryFromTimestampError, + tendermint::types::{ + light_block::proto::TryFromLightBlockError, + light_client_attack_evidence::LightClientAttackEvidence, + validator::proto::TryFromValidatorError, + }, + }; + + impl From for protos::tendermint::types::LightClientAttackEvidence { + fn from(value: LightClientAttackEvidence) -> Self { + Self { + conflicting_block: Some(value.conflicting_block.into()), + common_height: value.common_height.into(), + byzantine_validators: value + .byzantine_validators + .into_iter() + .map(Into::into) + .collect(), + total_voting_power: value.total_voting_power, + timestamp: Some(value.timestamp.into()), + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromLightClientAttackEvidenceError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid conflicting block")] - ConflictingBlock(#[from] TryFromLightBlockError), - #[error("invalid common height")] - CommonHeight(#[from] BoundedIntError), - #[error("invalid byzantine validators")] - ByzantineValidators(#[from] TryFromValidatorError), - #[error("invalid timestamp")] - ValidatorSet(#[from] TryFromTimestampError), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromLightClientAttackEvidenceError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid conflicting block")] + ConflictingBlock(#[from] TryFromLightBlockError), + #[error("invalid common height")] + CommonHeight(#[from] BoundedIntError), + #[error("invalid byzantine validators")] + ByzantineValidators(#[from] TryFromValidatorError), + #[error("invalid timestamp")] + ValidatorSet(#[from] TryFromTimestampError), + } -impl TryFrom for LightClientAttackEvidence { - type Error = TryFromLightClientAttackEvidenceError; + impl TryFrom for LightClientAttackEvidence { + type Error = TryFromLightClientAttackEvidenceError; - fn try_from( - value: protos::tendermint::types::LightClientAttackEvidence, - ) -> Result { - Ok(Self { - conflicting_block: required!(value.conflicting_block)?.try_into()?, - common_height: value.common_height.try_into()?, - byzantine_validators: value - .byzantine_validators - .into_iter() - .map(TryInto::try_into) - .collect::>()?, - total_voting_power: value.total_voting_power, - timestamp: required!(value.timestamp)?.try_into()?, - }) + fn try_from( + value: protos::tendermint::types::LightClientAttackEvidence, + ) -> Result { + Ok(Self { + conflicting_block: required!(value.conflicting_block)?.try_into()?, + common_height: value.common_height.try_into()?, + byzantine_validators: value + .byzantine_validators + .into_iter() + .map(TryInto::try_into) + .collect::>()?, + total_voting_power: value.total_voting_power, + timestamp: required!(value.timestamp)?.try_into()?, + }) + } } } diff --git a/lib/unionlabs/src/tendermint/types/part_set_header.rs b/lib/unionlabs/src/tendermint/types/part_set_header.rs index 926fbe55ba..6ead31de36 100644 --- a/lib/unionlabs/src/tendermint/types/part_set_header.rs +++ b/lib/unionlabs/src/tendermint/types/part_set_header.rs @@ -1,6 +1,6 @@ use macros::model; -use crate::{errors::InvalidLength, hash::H256, tendermint::types::block_id::maybe_empty_h256}; +use crate::hash::H256; #[derive(Default)] #[model(proto(raw(protos::tendermint::types::PartSetHeader), into, from))] @@ -10,58 +10,36 @@ pub struct PartSetHeader { pub hash: Option, } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromPartSetHeaderError { - #[error("invalid hash")] - Hash(#[source] InvalidLength), -} - -impl TryFrom for PartSetHeader { - type Error = TryFromPartSetHeaderError; - - fn try_from(value: protos::tendermint::types::PartSetHeader) -> Result { - Ok(Self { - total: value.total, - hash: maybe_empty_h256(&value.hash).map_err(TryFromPartSetHeaderError::Hash)?, - }) +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::InvalidLength, + tendermint::types::{block_id::proto::maybe_empty_h256, part_set_header::PartSetHeader}, + }; + + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromPartSetHeaderError { + #[error("invalid hash")] + Hash(#[source] InvalidLength), } -} -impl From for protos::tendermint::types::PartSetHeader { - fn from(value: PartSetHeader) -> Self { - Self { - total: value.total, - hash: value.hash.map(Into::into).unwrap_or_default(), - } - } -} + impl TryFrom for PartSetHeader { + type Error = TryFromPartSetHeaderError; -#[cfg(feature = "ethabi")] -impl From for contracts::glue::TendermintTypesPartSetHeaderData { - fn from(value: PartSetHeader) -> Self { - Self { - total: value.total, - hash: value.hash.map(|h| h.get().into()).unwrap_or_default(), + fn try_from(value: protos::tendermint::types::PartSetHeader) -> Result { + Ok(Self { + total: value.total, + hash: maybe_empty_h256(&value.hash).map_err(TryFromPartSetHeaderError::Hash)?, + }) } } -} - -#[cfg(feature = "ethabi")] -#[derive(Debug, Clone, PartialEq)] -pub enum TryFromEthAbiPartSetHeaderError { - Hash(InvalidLength), -} - -#[cfg(feature = "ethabi")] -impl TryFrom for PartSetHeader { - type Error = TryFromEthAbiPartSetHeaderError; - fn try_from( - value: contracts::glue::TendermintTypesPartSetHeaderData, - ) -> Result { - Ok(Self { - total: value.total, - hash: maybe_empty_h256(&value.hash).map_err(TryFromEthAbiPartSetHeaderError::Hash)?, - }) + impl From for protos::tendermint::types::PartSetHeader { + fn from(value: PartSetHeader) -> Self { + Self { + total: value.total, + hash: value.hash.map(Into::into).unwrap_or_default(), + } + } } } diff --git a/lib/unionlabs/src/tendermint/types/signed_header.rs b/lib/unionlabs/src/tendermint/types/signed_header.rs index cc8e98fb21..65f5e77ff9 100644 --- a/lib/unionlabs/src/tendermint/types/signed_header.rs +++ b/lib/unionlabs/src/tendermint/types/signed_header.rs @@ -1,16 +1,6 @@ use macros::model; -#[cfg(feature = "ethabi")] -use crate::tendermint::types::{ - commit::TryFromEthAbiCommitError, header::TryFromEthAbiHeaderError, -}; -use crate::{ - errors::{required, MissingField}, - tendermint::types::{ - commit::{Commit, TryFromCommitError}, - header::{Header, TryFromHeaderError}, - }, -}; +use crate::tendermint::types::{commit::Commit, header::Header}; #[model(proto(raw(protos::tendermint::types::SignedHeader), into, from))] pub struct SignedHeader { @@ -18,73 +8,47 @@ pub struct SignedHeader { pub commit: Commit, } -impl From for protos::tendermint::types::SignedHeader { - fn from(value: SignedHeader) -> Self { - Self { - header: Some(value.header.into()), - commit: Some(value.commit.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + tendermint::types::{ + commit::proto::TryFromCommitError, header::proto::TryFromHeaderError, + signed_header::SignedHeader, + }, + }; + + impl From for protos::tendermint::types::SignedHeader { + fn from(value: SignedHeader) -> Self { + Self { + header: Some(value.header.into()), + commit: Some(value.commit.into()), + } } } -} - -#[cfg(feature = "ethabi")] -#[derive(Debug, Clone, PartialEq)] -pub enum TryFromEthAbiSignedHeaderError { - Header(TryFromEthAbiHeaderError), - Commit(TryFromEthAbiCommitError), -} -#[cfg(feature = "ethabi")] -impl TryFrom for SignedHeader { - type Error = TryFromEthAbiSignedHeaderError; - - fn try_from( - value: contracts::glue::TendermintTypesSignedHeaderData, - ) -> Result { - Ok(Self { - header: value - .header - .try_into() - .map_err(TryFromEthAbiSignedHeaderError::Header)?, - commit: value - .commit - .try_into() - .map_err(TryFromEthAbiSignedHeaderError::Commit)?, - }) + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromSignedHeaderError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid header")] + Header(#[source] TryFromHeaderError), + #[error("invalid commit")] + Commit(#[source] TryFromCommitError), } -} - -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromSignedHeaderError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid header")] - Header(#[source] TryFromHeaderError), - #[error("invalid commit")] - Commit(#[source] TryFromCommitError), -} - -impl TryFrom for SignedHeader { - type Error = TryFromSignedHeaderError; - - fn try_from(value: protos::tendermint::types::SignedHeader) -> Result { - Ok(Self { - header: required!(value.header)? - .try_into() - .map_err(TryFromSignedHeaderError::Header)?, - commit: required!(value.commit)? - .try_into() - .map_err(TryFromSignedHeaderError::Commit)?, - }) - } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::TendermintTypesSignedHeaderData { - fn from(value: SignedHeader) -> Self { - Self { - header: value.header.into(), - commit: value.commit.into(), + impl TryFrom for SignedHeader { + type Error = TryFromSignedHeaderError; + + fn try_from(value: protos::tendermint::types::SignedHeader) -> Result { + Ok(Self { + header: required!(value.header)? + .try_into() + .map_err(TryFromSignedHeaderError::Header)?, + commit: required!(value.commit)? + .try_into() + .map_err(TryFromSignedHeaderError::Commit)?, + }) } } } diff --git a/lib/unionlabs/src/tendermint/types/simple_validator.rs b/lib/unionlabs/src/tendermint/types/simple_validator.rs index 423ed6a8b4..09b3350014 100644 --- a/lib/unionlabs/src/tendermint/types/simple_validator.rs +++ b/lib/unionlabs/src/tendermint/types/simple_validator.rs @@ -9,6 +9,7 @@ pub struct SimpleValidator { pub voting_power: i64, } +#[cfg(feature = "proto")] impl From for protos::tendermint::types::SimpleValidator { fn from(value: SimpleValidator) -> Self { Self { diff --git a/lib/unionlabs/src/tendermint/types/tx_proof.rs b/lib/unionlabs/src/tendermint/types/tx_proof.rs index dfdf04340e..d0e6ef7a2f 100644 --- a/lib/unionlabs/src/tendermint/types/tx_proof.rs +++ b/lib/unionlabs/src/tendermint/types/tx_proof.rs @@ -1,48 +1,52 @@ use macros::model; -use crate::{ - errors::{required, InvalidLength, MissingField}, - hash::H256, - tendermint::crypto::proof::{Proof, TryFromProofError}, -}; +use crate::{hash::H256, tendermint::crypto::proof::Proof}; #[model(proto(raw(protos::tendermint::types::TxProof), into, from))] pub struct TxProof { pub root_hash: H256, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub data: Vec, pub proof: Proof, } -impl From for protos::tendermint::types::TxProof { - fn from(value: TxProof) -> Self { - Self { - root_hash: value.root_hash.into(), - data: value.data, - proof: Some(value.proof.into()), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField}, + tendermint::{crypto::proof::proto::TryFromProofError, types::tx_proof::TxProof}, + }; + + impl From for protos::tendermint::types::TxProof { + fn from(value: TxProof) -> Self { + Self { + root_hash: value.root_hash.into(), + data: value.data, + proof: Some(value.proof.into()), + } } } -} -impl TryFrom for TxProof { - type Error = TryFromTxProofError; + impl TryFrom for TxProof { + type Error = TryFromTxProofError; - fn try_from(value: protos::tendermint::types::TxProof) -> Result { - Ok(Self { - root_hash: value.root_hash.try_into()?, - data: value.data, - proof: required!(value.proof)?.try_into()?, - }) + fn try_from(value: protos::tendermint::types::TxProof) -> Result { + Ok(Self { + root_hash: value.root_hash.try_into()?, + data: value.data, + proof: required!(value.proof)?.try_into()?, + }) + } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromTxProofError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid root_hash")] - RootHash(#[from] InvalidLength), - #[error("invalid proof")] - Proof(#[from] TryFromProofError), + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromTxProofError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid root_hash")] + RootHash(#[from] InvalidLength), + #[error("invalid proof")] + Proof(#[from] TryFromProofError), + } } diff --git a/lib/unionlabs/src/tendermint/types/validator.rs b/lib/unionlabs/src/tendermint/types/validator.rs index 2220fd0b2b..53b7d00b4a 100644 --- a/lib/unionlabs/src/tendermint/types/validator.rs +++ b/lib/unionlabs/src/tendermint/types/validator.rs @@ -1,11 +1,6 @@ use macros::model; -use crate::{ - bounded::{BoundedI64, BoundedIntError}, - errors::{required, InvalidLength, MissingField}, - hash::H160, - tendermint::crypto::public_key::{PublicKey, TryFromPublicKeyError}, -}; +use crate::{bounded::BoundedI64, hash::H160, tendermint::crypto::public_key::PublicKey}; #[model(proto(raw(protos::tendermint::types::Validator), from))] pub struct Validator { @@ -15,46 +10,57 @@ pub struct Validator { pub proposer_priority: i64, } -impl From for protos::tendermint::types::Validator { - fn from(value: Validator) -> Self { - Self { - address: value.address.into(), - pub_key: Some(value.pub_key.into()), - voting_power: value.voting_power.into(), - proposer_priority: value.proposer_priority, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + bounded::BoundedIntError, + errors::{required, InvalidLength, MissingField}, + tendermint::{ + crypto::public_key::proto::TryFromPublicKeyError, types::validator::Validator, + }, + }; + + impl From for protos::tendermint::types::Validator { + fn from(value: Validator) -> Self { + Self { + address: value.address.into(), + pub_key: Some(value.pub_key.into()), + voting_power: value.voting_power.into(), + proposer_priority: value.proposer_priority, + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromValidatorError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid address")] - Address(#[source] InvalidLength), - #[error("invalid voting power")] - VotingPower(#[source] BoundedIntError), - #[error("invalid pubkey")] - PubKey(#[source] TryFromPublicKeyError), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromValidatorError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid address")] + Address(#[source] InvalidLength), + #[error("invalid voting power")] + VotingPower(#[source] BoundedIntError), + #[error("invalid pubkey")] + PubKey(#[source] TryFromPublicKeyError), + } -impl TryFrom for Validator { - type Error = TryFromValidatorError; + impl TryFrom for Validator { + type Error = TryFromValidatorError; - fn try_from(value: protos::tendermint::types::Validator) -> Result { - Ok(Self { - address: value - .address - .try_into() - .map_err(TryFromValidatorError::Address)?, - pub_key: required!(value.pub_key)? - .try_into() - .map_err(TryFromValidatorError::PubKey)?, - voting_power: value - .voting_power - .try_into() - .map_err(TryFromValidatorError::VotingPower)?, - proposer_priority: value.proposer_priority, - }) + fn try_from(value: protos::tendermint::types::Validator) -> Result { + Ok(Self { + address: value + .address + .try_into() + .map_err(TryFromValidatorError::Address)?, + pub_key: required!(value.pub_key)? + .try_into() + .map_err(TryFromValidatorError::PubKey)?, + voting_power: value + .voting_power + .try_into() + .map_err(TryFromValidatorError::VotingPower)?, + proposer_priority: value.proposer_priority, + }) + } } } diff --git a/lib/unionlabs/src/tendermint/types/validator_set.rs b/lib/unionlabs/src/tendermint/types/validator_set.rs index 9f94157753..6f4437cb6e 100644 --- a/lib/unionlabs/src/tendermint/types/validator_set.rs +++ b/lib/unionlabs/src/tendermint/types/validator_set.rs @@ -1,9 +1,6 @@ use macros::model; -use crate::{ - errors::{required, MissingField}, - tendermint::types::validator::{TryFromValidatorError, Validator}, -}; +use crate::tendermint::types::validator::Validator; #[model(proto(raw(protos::tendermint::types::ValidatorSet), into, from))] pub struct ValidatorSet { @@ -13,41 +10,49 @@ pub struct ValidatorSet { pub total_voting_power: i64, } -impl From for protos::tendermint::types::ValidatorSet { - fn from(value: ValidatorSet) -> Self { - Self { - validators: value.validators.into_iter().map(Into::into).collect(), - proposer: Some(value.proposer.into()), - total_voting_power: value.total_voting_power, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + tendermint::types::{validator::proto::TryFromValidatorError, validator_set::ValidatorSet}, + }; + + impl From for protos::tendermint::types::ValidatorSet { + fn from(value: ValidatorSet) -> Self { + Self { + validators: value.validators.into_iter().map(Into::into).collect(), + proposer: Some(value.proposer.into()), + total_voting_power: value.total_voting_power, + } } } -} -#[derive(Debug, PartialEq, Clone, thiserror::Error)] -pub enum TryFromValidatorSetError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid validators")] - Validators(#[source] TryFromValidatorError), - #[error("invalid proposer")] - Proposer(#[source] TryFromValidatorError), -} + #[derive(Debug, PartialEq, Clone, thiserror::Error)] + pub enum TryFromValidatorSetError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid validators")] + Validators(#[source] TryFromValidatorError), + #[error("invalid proposer")] + Proposer(#[source] TryFromValidatorError), + } -impl TryFrom for ValidatorSet { - type Error = TryFromValidatorSetError; + impl TryFrom for ValidatorSet { + type Error = TryFromValidatorSetError; - fn try_from(value: protos::tendermint::types::ValidatorSet) -> Result { - Ok(Self { - validators: value - .validators - .into_iter() - .map(TryInto::try_into) - .collect::, _>>() - .map_err(TryFromValidatorSetError::Validators)?, - proposer: required!(value.proposer)? - .try_into() - .map_err(TryFromValidatorSetError::Proposer)?, - total_voting_power: value.total_voting_power, - }) + fn try_from(value: protos::tendermint::types::ValidatorSet) -> Result { + Ok(Self { + validators: value + .validators + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + .map_err(TryFromValidatorSetError::Validators)?, + proposer: required!(value.proposer)? + .try_into() + .map_err(TryFromValidatorSetError::Proposer)?, + total_voting_power: value.total_voting_power, + }) + } } } diff --git a/lib/unionlabs/src/tendermint/types/vote.rs b/lib/unionlabs/src/tendermint/types/vote.rs index ce0f88c368..641a90252f 100644 --- a/lib/unionlabs/src/tendermint/types/vote.rs +++ b/lib/unionlabs/src/tendermint/types/vote.rs @@ -1,14 +1,10 @@ use macros::model; use crate::{ - bounded::{BoundedI32, BoundedI64, BoundedIntError}, - errors::{required, InvalidLength, MissingField, UnknownEnumVariant}, - google::protobuf::timestamp::{Timestamp, TryFromTimestampError}, + bounded::{BoundedI32, BoundedI64}, + google::protobuf::timestamp::Timestamp, hash::H160, - tendermint::types::{ - block_id::{BlockId, TryFromBlockIdError}, - signed_msg_type::SignedMsgType, - }, + tendermint::types::{block_id::BlockId, signed_msg_type::SignedMsgType}, }; #[model(proto(raw(protos::tendermint::types::Vote), from, into))] @@ -20,67 +16,77 @@ pub struct Vote { pub timestamp: Timestamp, pub validator_address: H160, pub validator_index: i32, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub signature: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub extension: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub extension_signature: Vec, } -impl From for protos::tendermint::types::Vote { - fn from(value: Vote) -> Self { - Self { - r#type: value.ty.into(), - height: value.height.inner(), - round: value.round.inner(), - block_id: Some(value.block_id.into()), - timestamp: Some(value.timestamp.into()), - validator_address: value.validator_address.into(), - validator_index: value.validator_index, - signature: value.signature, - extension: value.extension, - extension_signature: value.extension_signature, +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + bounded::BoundedIntError, + errors::{required, InvalidLength, MissingField, UnknownEnumVariant}, + google::protobuf::timestamp::proto::TryFromTimestampError, + tendermint::types::{block_id::proto::TryFromBlockIdError, vote::Vote}, + }; + + impl From for protos::tendermint::types::Vote { + fn from(value: Vote) -> Self { + Self { + r#type: value.ty.into(), + height: value.height.inner(), + round: value.round.inner(), + block_id: Some(value.block_id.into()), + timestamp: Some(value.timestamp.into()), + validator_address: value.validator_address.into(), + validator_index: value.validator_index, + signature: value.signature, + extension: value.extension, + extension_signature: value.extension_signature, + } } } -} -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromVoteError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("invalid type")] - Type(#[from] UnknownEnumVariant), - #[error("invalid height")] - Height(#[from] BoundedIntError), - #[error("invalid round")] - Round(#[from] BoundedIntError), - #[error("invalid block id")] - BlockId(#[from] TryFromBlockIdError), - #[error("invalid timestamp")] - Timestamp(#[from] TryFromTimestampError), - #[error("invalid validator address")] - ValidatorAddress(#[from] InvalidLength), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromVoteError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("invalid type")] + Type(#[from] UnknownEnumVariant), + #[error("invalid height")] + Height(#[from] BoundedIntError), + #[error("invalid round")] + Round(#[from] BoundedIntError), + #[error("invalid block id")] + BlockId(#[from] TryFromBlockIdError), + #[error("invalid timestamp")] + Timestamp(#[from] TryFromTimestampError), + #[error("invalid validator address")] + ValidatorAddress(#[from] InvalidLength), + } -impl TryFrom for Vote { - type Error = TryFromVoteError; + impl TryFrom for Vote { + type Error = TryFromVoteError; - fn try_from(value: protos::tendermint::types::Vote) -> Result { - Ok(Self { - ty: value.r#type.try_into()?, - height: value.height.try_into()?, - round: value.round.try_into()?, - block_id: required!(value.block_id)?.try_into()?, - timestamp: required!(value.timestamp)?.try_into()?, - validator_address: value.validator_address.try_into()?, - validator_index: value.validator_index, - signature: value.signature, - extension: value.extension, - extension_signature: value.extension_signature, - }) + fn try_from(value: protos::tendermint::types::Vote) -> Result { + Ok(Self { + ty: value.r#type.try_into()?, + height: value.height.try_into()?, + round: value.round.try_into()?, + block_id: required!(value.block_id)?.try_into()?, + timestamp: required!(value.timestamp)?.try_into()?, + validator_address: value.validator_address.try_into()?, + validator_index: value.validator_index, + signature: value.signature, + extension: value.extension, + extension_signature: value.extension_signature, + }) + } } } diff --git a/lib/unionlabs/src/tendermint/version/consensus.rs b/lib/unionlabs/src/tendermint/version/consensus.rs index 09d29f0e8d..4a6849b402 100644 --- a/lib/unionlabs/src/tendermint/version/consensus.rs +++ b/lib/unionlabs/src/tendermint/version/consensus.rs @@ -3,47 +3,32 @@ use macros::model; #[derive(Default)] #[model(proto(raw(protos::tendermint::version::Consensus), into, from))] pub struct Consensus { - #[serde(with = "::serde_utils::string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string"))] pub block: u64, // REVIEW: Why default? - #[serde(with = "::serde_utils::string", default)] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::string", default))] pub app: u64, } -impl From for Consensus { - fn from(value: protos::tendermint::version::Consensus) -> Self { - Self { - block: value.block, - app: value.app, - } - } -} - -impl From for protos::tendermint::version::Consensus { - fn from(value: Consensus) -> Self { - Self { - block: value.block, - app: value.app, - } - } -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::tendermint::version::consensus::Consensus; -#[cfg(feature = "ethabi")] -impl From for Consensus { - fn from(value: contracts::glue::TendermintVersionConsensusData) -> Self { - Self { - block: value.block, - app: value.app, + impl From for Consensus { + fn from(value: protos::tendermint::version::Consensus) -> Self { + Self { + block: value.block, + app: value.app, + } } } -} -#[cfg(feature = "ethabi")] -impl From for contracts::glue::TendermintVersionConsensusData { - fn from(value: Consensus) -> Self { - Self { - block: value.block, - app: value.app, + impl From for protos::tendermint::version::Consensus { + fn from(value: Consensus) -> Self { + Self { + block: value.block, + app: value.app, + } } } } diff --git a/lib/unionlabs/src/traits.rs b/lib/unionlabs/src/traits.rs index 55d8029790..8b13789179 100644 --- a/lib/unionlabs/src/traits.rs +++ b/lib/unionlabs/src/traits.rs @@ -1,14 +1 @@ -use core::fmt::Debug; -use serde::{Deserialize, Serialize}; - -/// Trait alias for traits commonly used together throughout this crate. -pub trait Member = Debug - + Clone - + PartialEq - + Serialize - + for<'de> Deserialize<'de> - + Send - + Sync - + Unpin - + 'static; diff --git a/lib/unionlabs/src/uint.rs b/lib/unionlabs/src/uint.rs index b287bdb4c4..d06bd4595d 100644 --- a/lib/unionlabs/src/uint.rs +++ b/lib/unionlabs/src/uint.rs @@ -3,37 +3,20 @@ use core::{ fmt::{self, Display}, iter::Sum, - num::NonZeroUsize, ops::{Add, AddAssign, Div, Rem}, str::FromStr, }; -use serde::{Deserialize, Serialize}; use serde_utils::HEX_ENCODING_PREFIX; -use crate::{ - encoding::{Decode, Encode, Proto}, - errors::{ExpectedLength, InvalidLength}, - option_unwrap, -}; +use crate::errors::{ExpectedLength, InvalidLength}; /// [`primitive_types::U256`] can't roundtrip through string conversion since it parses from hex but displays as decimal. -#[derive( - ::macros::Debug, - Clone, - Copy, - Hash, - PartialEq, - Eq, - PartialOrd, - Ord, - Default, - Serialize, - Deserialize, -)] +#[derive(::macros::Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord, Default)] #[repr(transparent)] -#[debug("U256({})", self)] -pub struct U256(#[serde(with = "::serde_utils::u256_from_dec_str")] pub primitive_types::U256); +#[cfg_attr(feature = "serde", derive(::serde::Serialize, serde::Deserialize))] +#[debug("U256({:?})", self.0)] +pub struct U256(pub ruint::Uint<256, 4>); impl fmt::LowerHex for U256 { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -45,49 +28,21 @@ impl fmt::LowerHex for U256 { } } -#[cfg(feature = "ethabi")] -mod ethabi { - use ethers::core::abi::{ - AbiArrayType, AbiDecode, AbiEncode, AbiError, AbiType, InvalidOutputType, ParamType, Token, - Tokenizable, TokenizableItem, - }; - - use crate::uint::U256; - - impl AbiType for U256 { - fn param_type() -> ParamType { - ::param_type() - } - } - - impl AbiArrayType for U256 {} - impl Tokenizable for U256 { - fn from_token(token: Token) -> Result { - ::from_token(token).map(Self) - } - fn into_token(self) -> Token { - ::into_token(self.0) - } - } - - impl TokenizableItem for U256 {} - - impl AbiDecode for U256 { - fn decode(bytes: impl AsRef<[u8]>) -> Result { - ::decode(bytes).map(Self) - } - } - - impl AbiEncode for U256 { - fn encode(self) -> Vec { - ::encode(self.0) - } +impl From> for U256 { + fn from(value: ruint::Uint<256, 4>) -> Self { + Self(value) } } +// #[cfg(feature = "ethabi")] +// impl alloy_core::sol_types::SolValue for U256 { +// type SolType = as alloy_core::sol_types::SolValue>::SolType; +// } + impl U256 { pub const MAX: Self = Self::from_limbs([u64::MAX; 4]); pub const ZERO: Self = Self::from_limbs([0; 4]); + pub const ONE: Self = Self::from_limbs([1, 0, 0, 0]); // one day... // pub const fn from_const_str() -> Self {} @@ -95,52 +50,33 @@ impl U256 { impl From for U256 { fn from(value: u64) -> Self { - Self(primitive_types::U256::from(value)) + Self(ruint::Uint::from(value)) } } impl TryFrom for u64 { - type Error = (); + type Error = ruint::FromUintError; fn try_from(value: U256) -> Result { - if value > U256::from(u64::MAX) { - Err(()) - } else { - Ok(value.0.as_u64()) - } - } -} - -impl From for U256 { - fn from(value: primitive_types::U256) -> Self { - Self(value) - } -} - -impl From for primitive_types::U256 { - fn from(value: U256) -> Self { - value.0 + value.0.try_into() } } impl U256 { #[must_use] + #[allow(clippy::missing_panics_doc)] // max value is 255 pub fn leading_zeros(&self) -> u32 { - self.0.leading_zeros() + self.0.leading_zeros().try_into().unwrap() } #[must_use] pub fn to_le_bytes(&self) -> [u8; 32] { - let mut buf = [0; 32]; - self.0.to_little_endian(&mut buf); - buf + self.0.to_le_bytes() } #[must_use] pub fn to_be_bytes(&self) -> [u8; 32] { - let mut buf = [0; 32]; - self.0.to_big_endian(&mut buf); - buf + self.0.to_be_bytes() } #[must_use] @@ -150,11 +86,30 @@ impl U256 { buffer[leading_empty_bytes..].to_vec() } + #[allow(clippy::missing_panics_doc)] // precondition is checked pub fn try_from_be_bytes(bz: &[u8]) -> Result { let len = bz.len(); if (0..=32).contains(&len) { - Ok(Self(primitive_types::U256::from_big_endian(bz))) + Ok(Self( + ruint::Uint::try_from_be_slice(bz).expect("length is in range; qed;"), + )) + } else { + Err(InvalidLength { + expected: ExpectedLength::Between(0, 32), + found: len, + }) + } + } + + #[allow(clippy::missing_panics_doc)] // precondition is checked + pub fn try_from_le_bytes(bz: &[u8]) -> Result { + let len = bz.len(); + + if (0..=32).contains(&len) { + Ok(Self( + ruint::Uint::try_from_le_slice(bz).expect("length is in range; qed;"), + )) } else { Err(InvalidLength { expected: ExpectedLength::Between(0, 32), @@ -165,17 +120,22 @@ impl U256 { #[must_use] pub fn from_be_bytes(bz: [u8; 32]) -> Self { - Self(primitive_types::U256::from_big_endian(&bz)) + Self(ruint::Uint::from_be_bytes(bz)) + } + + #[must_use] + pub fn from_le_bytes(bz: [u8; 32]) -> Self { + Self(ruint::Uint::from_le_bytes(bz)) } #[must_use] pub const fn from_limbs(limbs: [u64; 4]) -> Self { - Self(primitive_types::U256(limbs)) + Self(ruint::Uint::from_limbs(limbs)) } #[must_use] pub const fn as_limbs(&self) -> [u64; 4] { - self.0 .0 + *self.0.as_limbs() } #[must_use] @@ -226,6 +186,7 @@ pub enum TryFromHexError { FromBytes(#[from] InvalidLength), } +#[cfg(feature = "serde")] pub mod u256_big_endian_hex { use serde::de::{self, Deserialize}; @@ -248,67 +209,24 @@ pub mod u256_big_endian_hex { } } -// impl TryFrom> for U256 { -// type Error = InvalidLength; - -// fn try_from(value: Vec) -> Result { -// if value.len() > 32 { -// Err(InvalidLength { -// expected: ExpectedLength::LessThan(32), -// found: value.len(), -// }) -// } else { -// // NOTE: This can panic if len > 32, hence the check above -// Ok(Self(primitive_types::U256::from_little_endian(&value))) -// } -// } -// } - -// // REVIEW: Should this trim leading zeros? -// impl From for Vec { -// fn from(value: U256) -> Self { -// let mut slice = [0_u8; 32]; -// value.0.to_little_endian(&mut slice); -// slice.into() -// } -// } - -impl Encode for U256 { - fn encode(self) -> Vec { - self.to_be_bytes().into() - } -} - -impl Decode for U256 { - type Error = InvalidLength; - - fn decode(bytes: &[u8]) -> Result { - Self::try_from_be_bytes(bytes) - } -} - +#[cfg(feature = "ssz")] impl ssz::Ssz for U256 { - const SSZ_FIXED_LEN: Option = Some(option_unwrap!(NonZeroUsize::new(32))); + const SSZ_FIXED_LEN: Option = + Some(crate::option_unwrap!(core::num::NonZeroUsize::new(32))); const TREE_HASH_TYPE: ssz::tree_hash::TreeHashType = ssz::tree_hash::TreeHashType::Basic { size: 32 }; fn tree_hash_root(&self) -> ssz::tree_hash::Hash256 { - let mut result = [0; 32]; - self.0.to_little_endian(&mut result[..]); - result + self.0.to_le_bytes() } - fn ssz_bytes_len(&self) -> NonZeroUsize { - option_unwrap!(NonZeroUsize::new(32)) + fn ssz_bytes_len(&self) -> core::num::NonZeroUsize { + crate::option_unwrap!(core::num::NonZeroUsize::new(32)) } fn ssz_append(&self, buf: &mut Vec) { - let n = 32; - let s = buf.len(); - - buf.resize(s + n, 0); - self.0.to_little_endian(&mut buf[s..]); + buf.extend_from_slice(&self.to_le_bytes()); } fn from_ssz_bytes(bytes: &[u8]) -> Result { @@ -316,7 +234,7 @@ impl ssz::Ssz for U256 { let expected = 32; if len == expected { - Ok(Self(primitive_types::U256::from_little_endian(bytes))) + Ok(Self::try_from_le_bytes(bytes).expect("bytes are in range; qed;")) } else { Err(ssz::decode::DecodeError::InvalidByteLength { found: len, @@ -326,29 +244,31 @@ impl ssz::Ssz for U256 { } } -impl FromStr for U256 { - type Err = uint::FromDecStrErr; - - fn from_str(s: &str) -> Result { - primitive_types::U256::from_dec_str(s).map(Self) +#[cfg(feature = "rlp")] +impl rlp::Encodable for U256 { + fn rlp_append(&self, s: &mut rlp::RlpStream) { + s.encoder().encode_value(&self.to_be_bytes_packed()); } } -impl Display for U256 { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - f.write_fmt(format_args!("{}", self.0)) +#[cfg(feature = "rlp")] +impl rlp::Decodable for U256 { + fn decode(rlp: &rlp::Rlp) -> Result { + as rlp::Decodable>::decode(rlp).map(Self) } } -impl rlp::Encodable for U256 { - fn rlp_append(&self, s: &mut rlp::RlpStream) { - s.encoder().encode_value(&self.to_be_bytes_packed()); +impl FromStr for U256 { + type Err = ruint::ParseError; + + fn from_str(s: &str) -> Result { + ruint::Uint::from_str_radix(s, 10).map(Self) } } -impl rlp::Decodable for U256 { - fn decode(rlp: &rlp::Rlp) -> Result { - ::decode(rlp).map(Self) +impl Display for U256 { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.write_fmt(format_args!("{}", self.0)) } } @@ -356,7 +276,7 @@ impl Rem for U256 { type Output = Self; fn rem(self, rhs: Self) -> Self::Output { - Self(self.0 % rhs.0) + Self(self.0.checked_rem(rhs.0).expect("attempted to mod zero")) } } @@ -364,7 +284,11 @@ impl Add for U256 { type Output = Self; fn add(self, rhs: Self) -> Self::Output { - Self(self.0 + rhs.0) + Self( + self.0 + .checked_add(rhs.0) + .expect("attempted to add with overflow"), + ) } } @@ -376,6 +300,7 @@ impl AddAssign for U256 { impl Sum for U256 { fn sum>(iter: I) -> Self { + // NOTE: NOT WRAPPING ADD! iter.fold(U256::default(), |a, b| a + b) } } @@ -384,7 +309,11 @@ impl Div for U256 { type Output = Self; fn div(self, rhs: Self) -> Self::Output { - Self(self.0 / rhs.0) + Self( + self.0 + .checked_div(rhs.0) + .expect("attempted to divide by zero"), + ) } } @@ -395,15 +324,14 @@ mod u256_tests { use serde::{Deserialize, Serialize}; use crate::{ - hash::H256, - test_utils::{assert_json_roundtrip, assert_proto_roundtrip, assert_string_roundtrip}, + test_utils::{assert_json_roundtrip, assert_string_roundtrip}, uint::U256, }; #[test] fn hex_string() { #[derive(Debug, Deserialize, Serialize)] - struct T { + struct Struct { #[serde(with = "super::u256_big_endian_hex")] u256: U256, } @@ -423,11 +351,11 @@ mod u256_tests { }; let string = format!(r#"{{"u256":"{hex}"}}"#); - let t = serde_json::from_str::(&string).unwrap(); + let t = serde_json::from_str::(&string).unwrap(); - dbg!(::new(t.u256.to_be_bytes())); + // dbg!(::new(t.u256.to_be_bytes())); - assert_eq!(t.u256.0.as_u64(), n); + assert_eq!(u64::try_from(t.u256.0).unwrap(), n); let roundtrip = serde_json::to_string(&t).unwrap(); @@ -450,7 +378,29 @@ mod u256_tests { #[test] fn roundtrip() { assert_json_roundtrip(&U256::from_str("123456").unwrap()); - assert_proto_roundtrip(&U256::from_str("123456").unwrap()); assert_string_roundtrip(&U256::from_str("123456").unwrap()); } + + #[test] + fn one() { + assert_eq!(U256::ONE, U256::from(1)); + assert_eq!( + U256::ONE, + U256::try_from_be_bytes(&1_u64.to_be_bytes()).unwrap() + ); + assert_eq!( + U256::ONE, + U256::try_from_le_bytes(&1_u64.to_le_bytes()).unwrap() + ); + assert_eq!(U256::ONE, U256::from_str("1").unwrap()); + assert_eq!(U256::ONE, U256::from_be_hex("0x1").unwrap()); + assert_eq!(U256::ONE, U256::from_be_hex("0x01").unwrap()); + assert_eq!(U256::ONE, U256::from_be_hex("0x001").unwrap()); + assert_eq!(U256::ONE, U256::from_be_hex("0x00000000001").unwrap()); + assert_eq!( + U256::ONE, + U256::from_be_hex("0x0000000000000000000000000000000000000000000000000000000000000001") + .unwrap() + ); + } } diff --git a/lib/unionlabs/src/union/galois/poll_request.rs b/lib/unionlabs/src/union/galois/poll_request.rs index f2c8157768..926eaa9150 100644 --- a/lib/unionlabs/src/union/galois/poll_request.rs +++ b/lib/unionlabs/src/union/galois/poll_request.rs @@ -7,6 +7,7 @@ pub struct PollRequest { pub request: ProveRequest, } +#[cfg(feature = "proto")] impl From for protos::union::galois::api::v3::PollRequest { fn from(value: PollRequest) -> Self { Self { diff --git a/lib/unionlabs/src/union/galois/poll_response.rs b/lib/unionlabs/src/union/galois/poll_response.rs index e568fced45..7d92b228bc 100644 --- a/lib/unionlabs/src/union/galois/poll_response.rs +++ b/lib/unionlabs/src/union/galois/poll_response.rs @@ -1,9 +1,6 @@ use macros::model; -use crate::{ - errors::{required, MissingField}, - union::galois::prove_response::{ProveResponse, TryFromProveResponseError}, -}; +use crate::union::galois::prove_response::ProveResponse; #[model(proto(raw(protos::union::galois::api::v3::PollResponse), into, from))] pub enum PollResponse { @@ -22,57 +19,72 @@ pub struct ProveRequestDone { pub response: ProveResponse, } -impl From for protos::union::galois::api::v3::PollResponse { - fn from(value: PollResponse) -> Self { - Self { - result: Some(match value { - PollResponse::Pending => { - protos::union::galois::api::v3::poll_response::Result::Pending( - protos::union::galois::api::v3::ProveRequestPending {}, - ) - } - PollResponse::Failed(failed) => { - protos::union::galois::api::v3::poll_response::Result::Failed( - protos::union::galois::api::v3::ProveRequestFailed { - message: failed.message, - }, - ) - } - PollResponse::Done(done) => { - protos::union::galois::api::v3::poll_response::Result::Done( - protos::union::galois::api::v3::ProveRequestDone { - response: Some(done.response.into()), - }, - ) - } - }), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, MissingField}, + union::galois::{ + poll_response::{PollResponse, ProveRequestDone, ProveRequestFailed}, + prove_response::proto::TryFromProveResponseError, + }, + }; + + impl From for protos::union::galois::api::v3::PollResponse { + fn from(value: PollResponse) -> Self { + Self { + result: Some(match value { + PollResponse::Pending => { + protos::union::galois::api::v3::poll_response::Result::Pending( + protos::union::galois::api::v3::ProveRequestPending {}, + ) + } + PollResponse::Failed(failed) => { + protos::union::galois::api::v3::poll_response::Result::Failed( + protos::union::galois::api::v3::ProveRequestFailed { + message: failed.message, + }, + ) + } + PollResponse::Done(done) => { + protos::union::galois::api::v3::poll_response::Result::Done( + protos::union::galois::api::v3::ProveRequestDone { + response: Some(done.response.into()), + }, + ) + } + }), + } } } -} -#[derive(Debug)] -pub enum TryFromPollResponseError { - MissingField(MissingField), - ProveResponse(TryFromProveResponseError), -} + #[derive(Debug)] + pub enum TryFromPollResponseError { + MissingField(MissingField), + ProveResponse(TryFromProveResponseError), + } -impl TryFrom for PollResponse { - type Error = TryFromPollResponseError; + impl TryFrom for PollResponse { + type Error = TryFromPollResponseError; - fn try_from(value: protos::union::galois::api::v3::PollResponse) -> Result { - match required!(value.result)? { - protos::union::galois::api::v3::poll_response::Result::Pending(_) => Ok(Self::Pending), - protos::union::galois::api::v3::poll_response::Result::Failed(failed) => { - Ok(Self::Failed(ProveRequestFailed { - message: failed.message, - })) - } - protos::union::galois::api::v3::poll_response::Result::Done(done) => { - Ok(Self::Done(ProveRequestDone { - response: required!(done.response)? - .try_into() - .map_err(TryFromPollResponseError::ProveResponse)?, - })) + fn try_from( + value: protos::union::galois::api::v3::PollResponse, + ) -> Result { + match required!(value.result)? { + protos::union::galois::api::v3::poll_response::Result::Pending(_) => { + Ok(Self::Pending) + } + protos::union::galois::api::v3::poll_response::Result::Failed(failed) => { + Ok(Self::Failed(ProveRequestFailed { + message: failed.message, + })) + } + protos::union::galois::api::v3::poll_response::Result::Done(done) => { + Ok(Self::Done(ProveRequestDone { + response: required!(done.response)? + .try_into() + .map_err(TryFromPollResponseError::ProveResponse)?, + })) + } } } } diff --git a/lib/unionlabs/src/union/galois/prove_request.rs b/lib/unionlabs/src/union/galois/prove_request.rs index c3ff8f3c0c..1527092fbb 100644 --- a/lib/unionlabs/src/union/galois/prove_request.rs +++ b/lib/unionlabs/src/union/galois/prove_request.rs @@ -13,6 +13,7 @@ pub struct ProveRequest { pub untrusted_commit: ValidatorSetCommit, } +#[cfg(feature = "proto")] impl From for protos::union::galois::api::v3::ProveRequest { fn from(value: ProveRequest) -> Self { Self { diff --git a/lib/unionlabs/src/union/galois/prove_response.rs b/lib/unionlabs/src/union/galois/prove_response.rs index 045ce525d2..ff8704a54c 100644 --- a/lib/unionlabs/src/union/galois/prove_response.rs +++ b/lib/unionlabs/src/union/galois/prove_response.rs @@ -1,10 +1,6 @@ use macros::model; -use crate::{ - errors::{required, InvalidLength, MissingField}, - hash::H256, - union::galois::zero_knowledge_proof::ZeroKnowledgeProof, -}; +use crate::{hash::H256, union::galois::zero_knowledge_proof::ZeroKnowledgeProof}; #[model(proto(raw(protos::union::galois::api::v3::ProveResponse), into, from))] pub struct ProveResponse { @@ -12,32 +8,42 @@ pub struct ProveResponse { pub trusted_validator_set_root: H256, } -impl From for protos::union::galois::api::v3::ProveResponse { - fn from(value: ProveResponse) -> Self { - Self { - proof: Some(value.proof.into()), - trusted_validator_set_root: value.trusted_validator_set_root.into(), +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{required, InvalidLength, MissingField}, + union::galois::prove_response::ProveResponse, + }; + + impl From for protos::union::galois::api::v3::ProveResponse { + fn from(value: ProveResponse) -> Self { + Self { + proof: Some(value.proof.into()), + trusted_validator_set_root: value.trusted_validator_set_root.into(), + } } } -} -#[derive(Debug)] -pub enum TryFromProveResponseError { - MissingField(MissingField), - TrustedValidatorSetRoot(InvalidLength), - UntrustedValidatorSetRoot(InvalidLength), -} + #[derive(Debug)] + pub enum TryFromProveResponseError { + MissingField(MissingField), + TrustedValidatorSetRoot(InvalidLength), + UntrustedValidatorSetRoot(InvalidLength), + } -impl TryFrom for ProveResponse { - type Error = TryFromProveResponseError; + impl TryFrom for ProveResponse { + type Error = TryFromProveResponseError; - fn try_from(value: protos::union::galois::api::v3::ProveResponse) -> Result { - Ok(Self { - proof: required!(value.proof)?.into(), - trusted_validator_set_root: value - .trusted_validator_set_root - .try_into() - .map_err(TryFromProveResponseError::TrustedValidatorSetRoot)?, - }) + fn try_from( + value: protos::union::galois::api::v3::ProveResponse, + ) -> Result { + Ok(Self { + proof: required!(value.proof)?.into(), + trusted_validator_set_root: value + .trusted_validator_set_root + .try_into() + .map_err(TryFromProveResponseError::TrustedValidatorSetRoot)?, + }) + } } } diff --git a/lib/unionlabs/src/union/galois/validator_set_commit.rs b/lib/unionlabs/src/union/galois/validator_set_commit.rs index 8f15ade473..49129f00e4 100644 --- a/lib/unionlabs/src/union/galois/validator_set_commit.rs +++ b/lib/unionlabs/src/union/galois/validator_set_commit.rs @@ -7,13 +7,14 @@ use crate::tendermint::types::simple_validator::SimpleValidator; pub struct ValidatorSetCommit { pub validators: Vec, // REVIEW: Is this arbitrary bytes or strongly typed? (i.e. H512) - #[serde(with = "::serde_utils::hex_string_list")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string_list"))] #[debug(wrap = ::serde_utils::fmt::DebugListAsHex)] pub signatures: Vec>, #[debug(wrap = ::serde_utils::fmt::DebugBits::<_, _, Msb0>::new)] pub bitmap: Vec, } +#[cfg(feature = "proto")] impl From for protos::union::galois::api::v3::ValidatorSetCommit { fn from(value: ValidatorSetCommit) -> Self { Self { diff --git a/lib/unionlabs/src/union/galois/zero_knowledge_proof.rs b/lib/unionlabs/src/union/galois/zero_knowledge_proof.rs index b2da801cb3..a389dca05f 100644 --- a/lib/unionlabs/src/union/galois/zero_knowledge_proof.rs +++ b/lib/unionlabs/src/union/galois/zero_knowledge_proof.rs @@ -3,38 +3,43 @@ use macros::model; // REVIEW: Are these fields fixed size? #[model(proto(raw(protos::union::galois::api::v3::ZeroKnowledgeProof), into, from))] pub struct ZeroKnowledgeProof { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub content: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub compressed_content: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub evm_proof: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub public_inputs: Vec, } -impl From for protos::union::galois::api::v3::ZeroKnowledgeProof { - fn from(value: ZeroKnowledgeProof) -> Self { - Self { - content: value.content, - compressed_content: value.compressed_content, - evm_proof: value.evm_proof, - public_inputs: value.public_inputs, +#[cfg(feature = "proto")] +pub mod proto { + use crate::union::galois::zero_knowledge_proof::ZeroKnowledgeProof; + + impl From for protos::union::galois::api::v3::ZeroKnowledgeProof { + fn from(value: ZeroKnowledgeProof) -> Self { + Self { + content: value.content, + compressed_content: value.compressed_content, + evm_proof: value.evm_proof, + public_inputs: value.public_inputs, + } } } -} -impl From for ZeroKnowledgeProof { - fn from(value: protos::union::galois::api::v3::ZeroKnowledgeProof) -> Self { - Self { - content: value.content, - compressed_content: value.compressed_content, - evm_proof: value.evm_proof, - public_inputs: value.public_inputs, + impl From for ZeroKnowledgeProof { + fn from(value: protos::union::galois::api::v3::ZeroKnowledgeProof) -> Self { + Self { + content: value.content, + compressed_content: value.compressed_content, + evm_proof: value.evm_proof, + public_inputs: value.public_inputs, + } } } } diff --git a/lib/unionlabs/src/union/ics23/existence_proof.rs b/lib/unionlabs/src/union/ics23/existence_proof.rs index 9b036319ba..4b146a4cd4 100644 --- a/lib/unionlabs/src/union/ics23/existence_proof.rs +++ b/lib/unionlabs/src/union/ics23/existence_proof.rs @@ -1,147 +1,140 @@ use macros::model; -use crate::{ - cosmos::ics23::{hash_op::HashOp, length_op::LengthOp}, - ensure, - union::ics23::inner_op::InnerOp, -}; +use crate::union::ics23::inner_op::InnerOp; #[model( proto(raw(protos::cosmos::ics23::v1::ExistenceProof), into, from), - ethabi(raw(ExistenceProofEthAbi), into, from) + ethabi(raw(ibc_solidity::ics23::ExistenceProof), into, from) )] pub struct ExistenceProof { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub key: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub value: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub leaf_prefix: Vec, pub path: Vec, } #[cfg(feature = "ethabi")] -#[doc(hidden)] -impl From for ExistenceProofEthAbi { +impl From for ibc_solidity::ics23::ExistenceProof { fn from(value: ExistenceProof) -> Self { - ExistenceProofEthAbi { + ibc_solidity::ics23::ExistenceProof { key: value.key.into(), value: value.value.into(), - leaf_prefix: value.leaf_prefix.into(), + leafPrefix: value.leaf_prefix.into(), path: value.path.into_iter().map(Into::into).collect(), } } } #[cfg(feature = "ethabi")] -#[doc(hidden)] -impl From for ExistenceProof { - fn from(value: ExistenceProofEthAbi) -> Self { +impl From for ExistenceProof { + fn from(value: ibc_solidity::ics23::ExistenceProof) -> Self { ExistenceProof { key: value.key.to_vec(), value: value.value.to_vec(), - leaf_prefix: value.leaf_prefix.to_vec(), + leaf_prefix: value.leafPrefix.to_vec(), path: value.path.into_iter().map(Into::into).collect(), } } } -#[cfg(feature = "ethabi")] -#[doc(hidden)] -#[derive(Debug, PartialEq, ::ethers::contract::EthAbiType, ::ethers::contract::EthAbiCodec)] -pub struct ExistenceProofEthAbi { - pub key: ethers::types::Bytes, - pub value: ethers::types::Bytes, - pub leaf_prefix: ethers::types::Bytes, - pub path: Vec, -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + cosmos::ics23::{hash_op::HashOp, length_op::LengthOp}, + ensure, + union::ics23::{existence_proof::ExistenceProof, inner_op::InnerOp}, + }; -const EXPECTED_PREHASH_KEY: HashOp = HashOp::NoHash; -const EXPECTED_PREHASH_VALUE: HashOp = HashOp::Sha256; -const EXPECTED_HASH: HashOp = HashOp::Sha256; -const EXPECTED_LENGTH: LengthOp = LengthOp::VarProto; + const EXPECTED_PREHASH_KEY: HashOp = HashOp::NoHash; + const EXPECTED_PREHASH_VALUE: HashOp = HashOp::Sha256; + const EXPECTED_HASH: HashOp = HashOp::Sha256; + const EXPECTED_LENGTH: LengthOp = LengthOp::VarProto; -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromExistenceProofError { - #[error("unable to decode cosmos::ics23::ExistenceProof")] - Cosmos(#[from] crate::cosmos::ics23::existence_proof::TryFromExistenceProofError), - #[error( - "invalid leaf.prehash_key, expected {} but found {0}", - EXPECTED_PREHASH_KEY - )] - InvalidPrehashKey(HashOp), - #[error( - "invalid leaf.prehash_value, expected {} but found {0}", - EXPECTED_PREHASH_VALUE - )] - InvalidPrehashValue(HashOp), - #[error("invalid leaf.hash, expected {} but found {0}", EXPECTED_HASH)] - InvalidHash(HashOp), - #[error("invalid leaf.length, expected {} but found {0}", EXPECTED_LENGTH)] - InvalidLength(LengthOp), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromExistenceProofError { + #[error("unable to decode cosmos::ics23::ExistenceProof")] + Cosmos(#[from] crate::cosmos::ics23::existence_proof::proto::TryFromExistenceProofError), + #[error( + "invalid leaf.prehash_key, expected {} but found {0}", + EXPECTED_PREHASH_KEY + )] + InvalidPrehashKey(HashOp), + #[error( + "invalid leaf.prehash_value, expected {} but found {0}", + EXPECTED_PREHASH_VALUE + )] + InvalidPrehashValue(HashOp), + #[error("invalid leaf.hash, expected {} but found {0}", EXPECTED_HASH)] + InvalidHash(HashOp), + #[error("invalid leaf.length, expected {} but found {0}", EXPECTED_LENGTH)] + InvalidLength(LengthOp), + } -impl TryFrom for ExistenceProof { - type Error = TryFromExistenceProofError; + impl TryFrom for ExistenceProof { + type Error = TryFromExistenceProofError; - fn try_from(value: protos::cosmos::ics23::v1::ExistenceProof) -> Result { - let value = crate::cosmos::ics23::existence_proof::ExistenceProof::try_from(value)?; + fn try_from(value: protos::cosmos::ics23::v1::ExistenceProof) -> Result { + let value = crate::cosmos::ics23::existence_proof::ExistenceProof::try_from(value)?; - ensure( - value.leaf.prehash_key == EXPECTED_PREHASH_KEY, - TryFromExistenceProofError::InvalidPrehashKey(value.leaf.prehash_key), - )?; + ensure( + value.leaf.prehash_key == EXPECTED_PREHASH_KEY, + TryFromExistenceProofError::InvalidPrehashKey(value.leaf.prehash_key), + )?; - ensure( - value.leaf.prehash_value == EXPECTED_PREHASH_VALUE, - TryFromExistenceProofError::InvalidPrehashValue(value.leaf.prehash_value), - )?; + ensure( + value.leaf.prehash_value == EXPECTED_PREHASH_VALUE, + TryFromExistenceProofError::InvalidPrehashValue(value.leaf.prehash_value), + )?; - ensure( - value.leaf.hash == EXPECTED_HASH, - TryFromExistenceProofError::InvalidHash(value.leaf.hash), - )?; + ensure( + value.leaf.hash == EXPECTED_HASH, + TryFromExistenceProofError::InvalidHash(value.leaf.hash), + )?; - ensure( - value.leaf.length == EXPECTED_LENGTH, - TryFromExistenceProofError::InvalidLength(value.leaf.length), - )?; + ensure( + value.leaf.length == EXPECTED_LENGTH, + TryFromExistenceProofError::InvalidLength(value.leaf.length), + )?; - Ok(Self { - key: value.key.to_vec(), - value: value.value.to_vec(), - leaf_prefix: value.leaf.prefix.to_vec(), - path: value - .path - .into_iter() - .map(|io| InnerOp { - prefix: io.prefix, - suffix: io.suffix, - }) - .collect(), - }) + Ok(Self { + key: value.key.to_vec(), + value: value.value.to_vec(), + leaf_prefix: value.leaf.prefix.to_vec(), + path: value + .path + .into_iter() + .map(|io| InnerOp { + prefix: io.prefix, + suffix: io.suffix, + }) + .collect(), + }) + } } -} -impl From for protos::cosmos::ics23::v1::ExistenceProof { - fn from(value: ExistenceProof) -> Self { - Self { - key: value.key.clone(), - value: value.value.clone(), - leaf: Some( - crate::cosmos::ics23::leaf_op::LeafOp { - hash: EXPECTED_HASH, - prehash_key: EXPECTED_PREHASH_KEY, - prehash_value: EXPECTED_PREHASH_VALUE, - length: EXPECTED_LENGTH, - prefix: value.leaf_prefix.into(), - } - .into(), - ), - path: value.path.into_iter().map(Into::into).collect::>(), + impl From for protos::cosmos::ics23::v1::ExistenceProof { + fn from(value: ExistenceProof) -> Self { + Self { + key: value.key.clone(), + value: value.value.clone(), + leaf: Some( + crate::cosmos::ics23::leaf_op::LeafOp { + hash: EXPECTED_HASH, + prehash_key: EXPECTED_PREHASH_KEY, + prehash_value: EXPECTED_PREHASH_VALUE, + length: EXPECTED_LENGTH, + prefix: value.leaf_prefix.into(), + } + .into(), + ), + path: value.path.into_iter().map(Into::into).collect::>(), + } } } } diff --git a/lib/unionlabs/src/union/ics23/inner_op.rs b/lib/unionlabs/src/union/ics23/inner_op.rs index 5ba4c95da7..8144335388 100644 --- a/lib/unionlabs/src/union/ics23/inner_op.rs +++ b/lib/unionlabs/src/union/ics23/inner_op.rs @@ -1,70 +1,67 @@ use macros::model; -use crate::{cosmos::ics23::hash_op::HashOp, ensure}; - #[model( proto(raw(protos::cosmos::ics23::v1::InnerOp), into, from), - ethabi(raw(InnerOpEthAbi), into, from) + ethabi(raw(ibc_solidity::ics23::InnerOp), into, from) )] pub struct InnerOp { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub prefix: Vec, - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub suffix: Vec, } -#[cfg(feature = "ethabi")] -#[doc(hidden)] -#[derive(Debug, PartialEq, ::ethers::contract::EthAbiType, ::ethers::contract::EthAbiCodec)] -pub struct InnerOpEthAbi { - pub prefix: ethers::types::Bytes, - pub suffix: ethers::types::Bytes, -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{cosmos::ics23::hash_op::HashOp, ensure, union::ics23::inner_op::InnerOp}; -const EXPECTED_HASH_OP: HashOp = HashOp::Sha256; + const EXPECTED_HASH_OP: HashOp = HashOp::Sha256; -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromInnerOpError { - #[error("unable to decode cosmos::ics23::InnerOp")] - Cosmos(#[from] crate::cosmos::ics23::inner_op::TryFromInnerOpError), - #[error("hash must be {}, found {0}", EXPECTED_HASH_OP)] - InvalidHash(HashOp), -} + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromInnerOpError { + #[error("unable to decode cosmos::ics23::InnerOp")] + Cosmos(#[from] crate::cosmos::ics23::inner_op::proto::TryFromInnerOpError), + #[error("hash must be {}, found {0}", EXPECTED_HASH_OP)] + InvalidHash(HashOp), + } -impl TryFrom for InnerOp { - type Error = TryFromInnerOpError; + impl TryFrom for InnerOp { + type Error = TryFromInnerOpError; - fn try_from(value: protos::cosmos::ics23::v1::InnerOp) -> Result { - let value = crate::cosmos::ics23::inner_op::InnerOp::try_from(value)?; + fn try_from( + value: protos::cosmos::ics23::v1::InnerOp, + ) -> Result { + let value = crate::cosmos::ics23::inner_op::InnerOp::try_from(value)?; - ensure( - value.hash == EXPECTED_HASH_OP, - TryFromInnerOpError::InvalidHash(value.hash), - )?; + ensure( + value.hash == EXPECTED_HASH_OP, + TryFromInnerOpError::InvalidHash(value.hash), + )?; - Ok(Self { - prefix: value.prefix, - suffix: value.suffix, - }) + Ok(Self { + prefix: value.prefix, + suffix: value.suffix, + }) + } } -} -impl From for protos::cosmos::ics23::v1::InnerOp { - fn from(value: InnerOp) -> Self { - crate::cosmos::ics23::inner_op::InnerOp { - hash: EXPECTED_HASH_OP, - prefix: value.prefix, - suffix: value.suffix, + impl From for protos::cosmos::ics23::v1::InnerOp { + fn from(value: InnerOp) -> Self { + crate::cosmos::ics23::inner_op::InnerOp { + hash: EXPECTED_HASH_OP, + prefix: value.prefix, + suffix: value.suffix, + } + .into() } - .into() } } #[cfg(feature = "ethabi")] -impl From for InnerOp { - fn from(value: InnerOpEthAbi) -> Self { +impl From for InnerOp { + fn from(value: ibc_solidity::ics23::InnerOp) -> Self { Self { prefix: value.prefix.to_vec(), suffix: value.suffix.to_vec(), @@ -73,7 +70,7 @@ impl From for InnerOp { } #[cfg(feature = "ethabi")] -impl From for InnerOpEthAbi { +impl From for ibc_solidity::ics23::InnerOp { fn from(value: InnerOp) -> Self { Self { prefix: value.prefix.into(), diff --git a/lib/unionlabs/src/union/ics23/merkle_proof.rs b/lib/unionlabs/src/union/ics23/merkle_proof.rs index 239a012d35..123cd0a455 100644 --- a/lib/unionlabs/src/union/ics23/merkle_proof.rs +++ b/lib/unionlabs/src/union/ics23/merkle_proof.rs @@ -1,8 +1,7 @@ use macros::model; -use crate::{ - errors::{ExpectedLength, InvalidLength, MissingField}, - union::ics23::{existence_proof::ExistenceProof, non_existence_proof::NonExistenceProof}, +use crate::union::ics23::{ + existence_proof::ExistenceProof, non_existence_proof::NonExistenceProof, }; #[model(proto(raw(protos::ibc::core::commitment::v1::MerkleProof), into, from))] @@ -12,83 +11,93 @@ pub enum MerkleProof { NonMembership(NonExistenceProof, ExistenceProof), } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromMerkleProofError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("unable to decode existence proof")] - Existence(#[from] crate::union::ics23::existence_proof::TryFromExistenceProofError), - #[error("unable to decode non existence proof")] - NonExistence(#[from] crate::union::ics23::non_existence_proof::TryFromNonExistenceProofError), - #[error("invalid commitment proof type")] - InvalidCommitmentProofType, - #[error("invalid proofs length")] - InvalidProofsLength(#[from] InvalidLength), -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::{ExpectedLength, InvalidLength, MissingField}, + union::ics23::merkle_proof::MerkleProof, + }; + + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromMerkleProofError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("unable to decode existence proof")] + Existence(#[from] crate::union::ics23::existence_proof::proto::TryFromExistenceProofError), + #[error("unable to decode non existence proof")] + NonExistence( + #[from] crate::union::ics23::non_existence_proof::proto::TryFromNonExistenceProofError, + ), + #[error("invalid commitment proof type")] + InvalidCommitmentProofType, + #[error("invalid proofs length")] + InvalidProofsLength(#[from] InvalidLength), + } -impl TryFrom for MerkleProof { - type Error = TryFromMerkleProofError; - - fn try_from( - value: protos::ibc::core::commitment::v1::MerkleProof, - ) -> Result { - use protos::cosmos::ics23::v1::{ - commitment_proof::Proof as RawProof, CommitmentProof as RawCommitmentProof, - }; - - let proofs: [_; 2] = value.proofs.try_into().map_err(|invalid: Vec<_>| { - TryFromMerkleProofError::InvalidProofsLength(InvalidLength { - expected: ExpectedLength::Exact(2), - found: invalid.len(), - }) - })?; - - match proofs { - [RawCommitmentProof { - proof: Some(RawProof::Exist(exist_1)), - }, RawCommitmentProof { - proof: Some(RawProof::Exist(exist_2)), - }] => Ok(Self::Membership(exist_1.try_into()?, exist_2.try_into()?)), - [RawCommitmentProof { - proof: Some(RawProof::Nonexist(non_exist)), - }, RawCommitmentProof { - proof: Some(RawProof::Exist(exist)), - }] => Ok(Self::NonMembership( - non_exist.try_into()?, - exist.try_into()?, - )), - [_, _] => Err(TryFromMerkleProofError::InvalidCommitmentProofType), + impl TryFrom for MerkleProof { + type Error = TryFromMerkleProofError; + + fn try_from( + value: protos::ibc::core::commitment::v1::MerkleProof, + ) -> Result { + use protos::cosmos::ics23::v1::{ + commitment_proof::Proof as RawProof, CommitmentProof as RawCommitmentProof, + }; + + let proofs: [_; 2] = value.proofs.try_into().map_err(|invalid: Vec<_>| { + TryFromMerkleProofError::InvalidProofsLength(InvalidLength { + expected: ExpectedLength::Exact(2), + found: invalid.len(), + }) + })?; + + match proofs { + [RawCommitmentProof { + proof: Some(RawProof::Exist(exist_1)), + }, RawCommitmentProof { + proof: Some(RawProof::Exist(exist_2)), + }] => Ok(Self::Membership(exist_1.try_into()?, exist_2.try_into()?)), + [RawCommitmentProof { + proof: Some(RawProof::Nonexist(non_exist)), + }, RawCommitmentProof { + proof: Some(RawProof::Exist(exist)), + }] => Ok(Self::NonMembership( + non_exist.try_into()?, + exist.try_into()?, + )), + [_, _] => Err(TryFromMerkleProofError::InvalidCommitmentProofType), + } } } -} -impl From for protos::ibc::core::commitment::v1::MerkleProof { - fn from(value: MerkleProof) -> Self { - use protos::cosmos::ics23::v1::{ - commitment_proof::Proof as RawProof, CommitmentProof as RawCommitmentProof, - }; - - match value { - MerkleProof::Membership(a, b) => Self { - proofs: vec![ - RawCommitmentProof { - proof: Some(RawProof::Exist(a.into())), - }, - RawCommitmentProof { - proof: Some(RawProof::Exist(b.into())), - }, - ], - }, - MerkleProof::NonMembership(a, b) => Self { - proofs: vec![ - RawCommitmentProof { - proof: Some(RawProof::Nonexist(a.into())), - }, - RawCommitmentProof { - proof: Some(RawProof::Exist(b.into())), - }, - ], - }, + impl From for protos::ibc::core::commitment::v1::MerkleProof { + fn from(value: MerkleProof) -> Self { + use protos::cosmos::ics23::v1::{ + commitment_proof::Proof as RawProof, CommitmentProof as RawCommitmentProof, + }; + + match value { + MerkleProof::Membership(a, b) => Self { + proofs: vec![ + RawCommitmentProof { + proof: Some(RawProof::Exist(a.into())), + }, + RawCommitmentProof { + proof: Some(RawProof::Exist(b.into())), + }, + ], + }, + MerkleProof::NonMembership(a, b) => Self { + proofs: vec![ + RawCommitmentProof { + proof: Some(RawProof::Nonexist(a.into())), + }, + RawCommitmentProof { + proof: Some(RawProof::Exist(b.into())), + }, + ], + }, + } } } } @@ -96,91 +105,85 @@ impl From for protos::ibc::core::commitment::v1::MerkleProof { #[cfg(feature = "ethabi")] impl crate::encoding::Encode for MerkleProof { fn encode(self) -> Vec { - use ethers::abi::Tokenizable; - - use crate::union::ics23::{ - existence_proof::ExistenceProofEthAbi, non_existence_proof::NonExistenceProofEthAbi, - }; + use alloy_core::sol_types::SolValue; match self { - MerkleProof::Membership(a, b) => ethers::abi::ethabi::encode(&[ - ExistenceProofEthAbi::from(a).into_token(), - ExistenceProofEthAbi::from(b).into_token(), - ]), - MerkleProof::NonMembership(a, b) => ethers::abi::ethabi::encode(&[ - NonExistenceProofEthAbi::from(a).into_token(), - ExistenceProofEthAbi::from(b).into_token(), - ]), + MerkleProof::Membership(a, b) => ( + ibc_solidity::ics23::ExistenceProof::from(a), + ibc_solidity::ics23::ExistenceProof::from(b), + ) + .abi_encode_packed(), + MerkleProof::NonMembership(a, b) => ( + ibc_solidity::ics23::NonExistenceProof::from(a), + ibc_solidity::ics23::ExistenceProof::from(b), + ) + .abi_encode_packed(), } } } -#[cfg(test)] -mod tests { - use ethers::abi::{ethabi, AbiType, Token, Tokenizable}; - - use super::*; - use crate::{ - encoding::{DecodeAs, EncodeAs, EthAbi, Proto}, - union::ics23::{ - existence_proof::ExistenceProofEthAbi, non_existence_proof::NonExistenceProofEthAbi, - }, - }; - - #[test] - fn ethabi() { - proto_eth_roundtrip(&hex::decode("0a96061293060a15014152090b0c95c948edc407995560feed4a9df88812fa020a15014152090b0c95c948edc407995560feed4a9df81e129e010a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74127a0a2c756e696f6e31673966716a7a63766a687935336d77797137763432633837613439666d37713772646568386312460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103820c4b94dccd7d74706216c426fe884d9a4404410df69d6421899595c5a9c122180420031a0b0801180120012a0300027822290801122502047820170c890f01b9fa9ab803511bbc7be7c25359309f04d021a72e0a9b93b8ff72c020222c0801120504089601201a21205f282a80f1d186fa1f7b237f81e8bc9a4bb40d5a03cbbdffdd421b1ad4cb16f4222c0801120506109601201a2120e9c65294b7106c7323dcabe4532232c319afc78cd373e338f12df43f8ecfa909222c080112050a309601201a2120a95af7890dba33514ea28a3db7b409f4887b058d6d1e43960c4cd45bb1d9bef81afc020a150143e46d91544517a037a8029b6c7f86f62bab389b129e010a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74127a0a2c756e696f6e3167306a786d79323567357436716461677132646b636c7578376334366b77796d38646563667712460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034611ea6606f6241fdeb0db1854a785eaa2fef5770694237daaf46057cadb3903180320031a0c0801180120012a0400029601222c0801120502049601201a2120532543090d1564b206e953fd6f97000d9b78bd5a8a424f551d483a58b3f54c57222a0801122604089601207e55a1ee8006e9c29c895a8de8ea8cdc6aaddc10e05ea3d3ee8fac786a73c02d20222c0801120506109601201a2120e9c65294b7106c7323dcabe4532232c319afc78cd373e338f12df43f8ecfa909222c080112050a309601201a2120a95af7890dba33514ea28a3db7b409f4887b058d6d1e43960c4cd45bb1d9bef80a80020afd010a0361636312205281c416bf4f80b9d99428a09f91ff311968a3b2adb199342d63c9db20a417e91a090801180120012a010022250801122101ba30cf8122e71a87fea08d0da9499e0373495a64e1648de8f08ca1a73e1fc1a8222708011201011a203489cd05a389a1d165f19003cea0994df9e55a5cb53b3d659417040be528b86d222708011201011a20e5c60ddccacb1c6b0be7957e8d7a86dc0f8bcec91c91d666d39eb1ebedd1bdf1222708011201011a2047a4c9a64496594e8b255443aa979293b2c7120150cf31e0eeeb8a2a987fd7e8222708011201011a2053bca15bed4becbdfd1b4cd0e63bd3845646022a99a2289a6678d8608f092207").unwrap()); - proto_eth_roundtrip(&hex::decode("0ab0030aad030a1d636c69656e74732f30382d7761736d2d312f636c69656e74537461746512c7010a252f6962632e6c69676874636c69656e74732e7761736d2e76312e436c69656e745374617465129d010a720a20d8ea171f3c94aea21ebc42a1ed61052acf3f9209c00e4efbaaddac09ed9b807818e0fac1950622310a04900000691a060a049000007022060a04900000712a060a049000007232110a040400000010ffffffffffffffffff01280c30203880024204080110034880c2d72f50a0f4a4011220e8dcc770de5a013041588233812f73ac797ec6078b0011cbcbfe49d474f4c1191a051081f2e7011a0c0801180120012a040002ae06222c080112050204b006201a2120980ab410769397da376376a2756754b225f34cc0eea404b068924f64180abcc4222c080112050408b006201a21209d79cf7fc2f248ea0a56cff266ac54cfbc06687e25ffee99aec2884856d0104f222a080112260610b006203e808c2bc895d44d05d7af6d8b0424fabb1d9ab6f53b10cdb084b2996f75bfa620222c08011205081eb006201a212095bb7de983d8ea1282a2d60e2f6c675bec25f82be86aa874ff0f15827c1ab3ed0afc010af9010a036962631220859b7ac80b1c0ca82504e0d8e9de460d42ca66a03e708cbd09869e5216c73a591a090801180120012a01002225080112210106b99c0d8119ff1edbcbe165d0f19337dbbc080e677c88e57aa2ae767ebf0f0f222708011201011a20aa650406ea0d76e39dd43d2ea6a91e3fdaa1c908fc21a7ca68e5e62cc8115639222508011221016ac3182364d7cdaa1f52a77b6081e070aa29b2d253f3642169693cde336e2bdc22250801122101c9d0a585c82dc572f3fcedc70302d4c3fbbc9e84f0618c6b446a70efa312e8dc222708011201011a20952029410a533cf530124179204303bea59a86f5b4993291c5b8ca406412c5f7").unwrap()); - proto_eth_roundtrip(&hex::decode("0abc020ab9020a18636f6e6e656374696f6e732f636f6e6e656374696f6e2d31125b0a0930382d7761736d2d3112230a0131120d4f524445525f4f524445524544120f4f524445525f554e4f524445524544180222250a0e636f6d6574626c732d6e65772d30120c636f6e6e656374696f6e2d301a050a0369626328061a0c0801180120012a040002f006222c080112050204f006201a212075c4910f51207d3c65960120fe931f138e2624668d75869f51b8442593dd5eab222a080112260408de0a2002b6fcf07091245d162f1196b003c555c564980e02c4d4a9fa0a249798f4b25e20222c08011205060ede0a201a2120ff6b0a04e076eecbabfee4e751c0523cbedba898211b5847404e2d954a2203e3222a08011226081ede0a20635053419cfb6a81c839860d99f3ed002840124a790ddd9f066d8bce63f9df54200afc010af9010a03696263122024b15e198bcf648dee62c7ca1fd8c3950c85c3d898833180c3e3c412ccbc559d1a090801180120012a01002225080112210106b99c0d8119ff1edbcbe165d0f19337dbbc080e677c88e57aa2ae767ebf0f0f222708011201011a20aa650406ea0d76e39dd43d2ea6a91e3fdaa1c908fc21a7ca68e5e62cc8115639222508011221016ac3182364d7cdaa1f52a77b6081e070aa29b2d253f3642169693cde336e2bdc222508011221016376cbd7b917c7105ddac35bdeddd79e6c9cbbc66dd227941599de2b9bc8b3de222708011201011a200d68ac7c3e8daf94c65ccdfe5b7397f50e80325240ef9b2a0ec483afaea30544").unwrap()); - proto_eth_roundtrip(&hex::decode("0afa020af7020a15014152090b0c95c948edc407995560feed4a9df81e129e010a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74127a0a2c756e696f6e31673966716a7a63766a687935336d77797137763432633837613439666d37713772646568386312460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103820c4b94dccd7d74706216c426fe884d9a4404410df69d6421899595c5a9c122180120011a0b0801180120012a0300020222290801122502040220170c890f01b9fa9ab803511bbc7be7c25359309f04d021a72e0a9b93b8ff72c020222b08011204040802201a2120a89a7b1aedf861a8c6316009af3d19448bfe8834dfb5546c7e1af7f95c3000b4222b08011204061002201a212029347d33c119e85fc1335f43ad17c4a1986ad44c71837158ceffd36e2f38f986222b080112040a3002201a2120e284b7ed0385d018b1ffcd6f33bf6ac575fb7731704d0ae71be278bd8bf5e0b50a80020afd010a03616363122082d7d632a58654a81bb6764379eff4b6e641e96620a12dac0e250e6caf94f7761a090801180120012a010022250801122101ba30cf8122e71a87fea08d0da9499e0373495a64e1648de8f08ca1a73e1fc1a8222708011201011a208a19e0585632ebada293099d24f28707d453266ae7ded6e854dfd8a025c7ce71222708011201011a204a22410f42f7706402b38c460e74d712c95cea8e6e370c691f43c0abf3f4e104222708011201011a20b999d9a62cbd36a843f207580c4802d194e6441f7f3715ddce55d5194d46e57a222708011201011a2022ecbf124eff995ecf01998dd8346b71810af164e192feeb4d4287085128b9df").unwrap()); - } - - fn proto_eth_roundtrip(bz: &[u8]) { - let proof = MerkleProof::decode_as::(bz).unwrap(); - let ethabi_bz = proof.clone().encode_as::(); - - match proof { - MerkleProof::Membership(exist_1, exist_2) => { - println!("{}", hex::encode(ðabi_bz)); - - let [exist_1_tokens, exist_2_tokens]: [Token; 2] = ethabi::decode( - &[ - ExistenceProofEthAbi::param_type(), - ExistenceProofEthAbi::param_type(), - ], - ðabi_bz, - ) - .unwrap() - .try_into() - .unwrap(); - - let exist_1_ethabi = ExistenceProofEthAbi::from_token(exist_1_tokens).unwrap(); - let exist_2_ethabi = ExistenceProofEthAbi::from_token(exist_2_tokens).unwrap(); - - assert_eq!(exist_1, exist_1_ethabi.into()); - assert_eq!(exist_2, exist_2_ethabi.into()); - } - MerkleProof::NonMembership(non_exist, exist) => { - println!("{}", hex::encode(ðabi_bz)); - - let [non_exist_tokens, exist_tokens] = ethabi::decode( - &[ - NonExistenceProofEthAbi::param_type(), - ExistenceProofEthAbi::param_type(), - ], - ðabi_bz, - ) - .unwrap() - .try_into() - .unwrap(); - - let non_exist_ethabi = - NonExistenceProofEthAbi::from_token(non_exist_tokens).unwrap(); - let exist_ethabi = ExistenceProofEthAbi::from_token(exist_tokens).unwrap(); - - assert_eq!(non_exist, non_exist_ethabi.into()); - assert_eq!(exist, exist_ethabi.into()); - } - } - } -} +// #[cfg(test)] +// mod tests { +// use super::*; +// use crate::{ +// encoding::{DecodeAs, EncodeAs, EthAbi, Proto}, +// union::ics23::{existence_proof::ExistenceProof, non_existence_proof::NonExistenceProof}, +// }; + +// #[test] +// fn ethabi() { +// proto_eth_roundtrip(&hex::decode("0a96061293060a15014152090b0c95c948edc407995560feed4a9df88812fa020a15014152090b0c95c948edc407995560feed4a9df81e129e010a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74127a0a2c756e696f6e31673966716a7a63766a687935336d77797137763432633837613439666d37713772646568386312460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103820c4b94dccd7d74706216c426fe884d9a4404410df69d6421899595c5a9c122180420031a0b0801180120012a0300027822290801122502047820170c890f01b9fa9ab803511bbc7be7c25359309f04d021a72e0a9b93b8ff72c020222c0801120504089601201a21205f282a80f1d186fa1f7b237f81e8bc9a4bb40d5a03cbbdffdd421b1ad4cb16f4222c0801120506109601201a2120e9c65294b7106c7323dcabe4532232c319afc78cd373e338f12df43f8ecfa909222c080112050a309601201a2120a95af7890dba33514ea28a3db7b409f4887b058d6d1e43960c4cd45bb1d9bef81afc020a150143e46d91544517a037a8029b6c7f86f62bab389b129e010a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74127a0a2c756e696f6e3167306a786d79323567357436716461677132646b636c7578376334366b77796d38646563667712460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034611ea6606f6241fdeb0db1854a785eaa2fef5770694237daaf46057cadb3903180320031a0c0801180120012a0400029601222c0801120502049601201a2120532543090d1564b206e953fd6f97000d9b78bd5a8a424f551d483a58b3f54c57222a0801122604089601207e55a1ee8006e9c29c895a8de8ea8cdc6aaddc10e05ea3d3ee8fac786a73c02d20222c0801120506109601201a2120e9c65294b7106c7323dcabe4532232c319afc78cd373e338f12df43f8ecfa909222c080112050a309601201a2120a95af7890dba33514ea28a3db7b409f4887b058d6d1e43960c4cd45bb1d9bef80a80020afd010a0361636312205281c416bf4f80b9d99428a09f91ff311968a3b2adb199342d63c9db20a417e91a090801180120012a010022250801122101ba30cf8122e71a87fea08d0da9499e0373495a64e1648de8f08ca1a73e1fc1a8222708011201011a203489cd05a389a1d165f19003cea0994df9e55a5cb53b3d659417040be528b86d222708011201011a20e5c60ddccacb1c6b0be7957e8d7a86dc0f8bcec91c91d666d39eb1ebedd1bdf1222708011201011a2047a4c9a64496594e8b255443aa979293b2c7120150cf31e0eeeb8a2a987fd7e8222708011201011a2053bca15bed4becbdfd1b4cd0e63bd3845646022a99a2289a6678d8608f092207").unwrap()); +// proto_eth_roundtrip(&hex::decode("0ab0030aad030a1d636c69656e74732f30382d7761736d2d312f636c69656e74537461746512c7010a252f6962632e6c69676874636c69656e74732e7761736d2e76312e436c69656e745374617465129d010a720a20d8ea171f3c94aea21ebc42a1ed61052acf3f9209c00e4efbaaddac09ed9b807818e0fac1950622310a04900000691a060a049000007022060a04900000712a060a049000007232110a040400000010ffffffffffffffffff01280c30203880024204080110034880c2d72f50a0f4a4011220e8dcc770de5a013041588233812f73ac797ec6078b0011cbcbfe49d474f4c1191a051081f2e7011a0c0801180120012a040002ae06222c080112050204b006201a2120980ab410769397da376376a2756754b225f34cc0eea404b068924f64180abcc4222c080112050408b006201a21209d79cf7fc2f248ea0a56cff266ac54cfbc06687e25ffee99aec2884856d0104f222a080112260610b006203e808c2bc895d44d05d7af6d8b0424fabb1d9ab6f53b10cdb084b2996f75bfa620222c08011205081eb006201a212095bb7de983d8ea1282a2d60e2f6c675bec25f82be86aa874ff0f15827c1ab3ed0afc010af9010a036962631220859b7ac80b1c0ca82504e0d8e9de460d42ca66a03e708cbd09869e5216c73a591a090801180120012a01002225080112210106b99c0d8119ff1edbcbe165d0f19337dbbc080e677c88e57aa2ae767ebf0f0f222708011201011a20aa650406ea0d76e39dd43d2ea6a91e3fdaa1c908fc21a7ca68e5e62cc8115639222508011221016ac3182364d7cdaa1f52a77b6081e070aa29b2d253f3642169693cde336e2bdc22250801122101c9d0a585c82dc572f3fcedc70302d4c3fbbc9e84f0618c6b446a70efa312e8dc222708011201011a20952029410a533cf530124179204303bea59a86f5b4993291c5b8ca406412c5f7").unwrap()); +// proto_eth_roundtrip(&hex::decode("0abc020ab9020a18636f6e6e656374696f6e732f636f6e6e656374696f6e2d31125b0a0930382d7761736d2d3112230a0131120d4f524445525f4f524445524544120f4f524445525f554e4f524445524544180222250a0e636f6d6574626c732d6e65772d30120c636f6e6e656374696f6e2d301a050a0369626328061a0c0801180120012a040002f006222c080112050204f006201a212075c4910f51207d3c65960120fe931f138e2624668d75869f51b8442593dd5eab222a080112260408de0a2002b6fcf07091245d162f1196b003c555c564980e02c4d4a9fa0a249798f4b25e20222c08011205060ede0a201a2120ff6b0a04e076eecbabfee4e751c0523cbedba898211b5847404e2d954a2203e3222a08011226081ede0a20635053419cfb6a81c839860d99f3ed002840124a790ddd9f066d8bce63f9df54200afc010af9010a03696263122024b15e198bcf648dee62c7ca1fd8c3950c85c3d898833180c3e3c412ccbc559d1a090801180120012a01002225080112210106b99c0d8119ff1edbcbe165d0f19337dbbc080e677c88e57aa2ae767ebf0f0f222708011201011a20aa650406ea0d76e39dd43d2ea6a91e3fdaa1c908fc21a7ca68e5e62cc8115639222508011221016ac3182364d7cdaa1f52a77b6081e070aa29b2d253f3642169693cde336e2bdc222508011221016376cbd7b917c7105ddac35bdeddd79e6c9cbbc66dd227941599de2b9bc8b3de222708011201011a200d68ac7c3e8daf94c65ccdfe5b7397f50e80325240ef9b2a0ec483afaea30544").unwrap()); +// proto_eth_roundtrip(&hex::decode("0afa020af7020a15014152090b0c95c948edc407995560feed4a9df81e129e010a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74127a0a2c756e696f6e31673966716a7a63766a687935336d77797137763432633837613439666d37713772646568386312460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103820c4b94dccd7d74706216c426fe884d9a4404410df69d6421899595c5a9c122180120011a0b0801180120012a0300020222290801122502040220170c890f01b9fa9ab803511bbc7be7c25359309f04d021a72e0a9b93b8ff72c020222b08011204040802201a2120a89a7b1aedf861a8c6316009af3d19448bfe8834dfb5546c7e1af7f95c3000b4222b08011204061002201a212029347d33c119e85fc1335f43ad17c4a1986ad44c71837158ceffd36e2f38f986222b080112040a3002201a2120e284b7ed0385d018b1ffcd6f33bf6ac575fb7731704d0ae71be278bd8bf5e0b50a80020afd010a03616363122082d7d632a58654a81bb6764379eff4b6e641e96620a12dac0e250e6caf94f7761a090801180120012a010022250801122101ba30cf8122e71a87fea08d0da9499e0373495a64e1648de8f08ca1a73e1fc1a8222708011201011a208a19e0585632ebada293099d24f28707d453266ae7ded6e854dfd8a025c7ce71222708011201011a204a22410f42f7706402b38c460e74d712c95cea8e6e370c691f43c0abf3f4e104222708011201011a20b999d9a62cbd36a843f207580c4802d194e6441f7f3715ddce55d5194d46e57a222708011201011a2022ecbf124eff995ecf01998dd8346b71810af164e192feeb4d4287085128b9df").unwrap()); +// } + +// fn proto_eth_roundtrip(bz: &[u8]) { +// let proof = MerkleProof::decode_as::(bz).unwrap(); +// let ethabi_bz = proof.clone().encode_as::(); + +// match proof { +// MerkleProof::Membership(exist_1, exist_2) => { +// println!("{}", hex::encode(ðabi_bz)); + +// let [exist_1_tokens, exist_2_tokens]: [Token; 2] = ethabi::decode( +// &[ +// ExistenceProofEthAbi::param_type(), +// ExistenceProofEthAbi::param_type(), +// ], +// ðabi_bz, +// ) +// .unwrap() +// .try_into() +// .unwrap(); + +// let exist_1_ethabi = ExistenceProofEthAbi::from_token(exist_1_tokens).unwrap(); +// let exist_2_ethabi = ExistenceProofEthAbi::from_token(exist_2_tokens).unwrap(); + +// assert_eq!(exist_1, exist_1_ethabi.into()); +// assert_eq!(exist_2, exist_2_ethabi.into()); +// } +// MerkleProof::NonMembership(non_exist, exist) => { +// println!("{}", hex::encode(ðabi_bz)); + +// let [non_exist_tokens, exist_tokens] = ethabi::decode( +// &[ +// NonExistenceProofEthAbi::param_type(), +// ExistenceProofEthAbi::param_type(), +// ], +// ðabi_bz, +// ) +// .unwrap() +// .try_into() +// .unwrap(); + +// let non_exist_ethabi = +// NonExistenceProofEthAbi::from_token(non_exist_tokens).unwrap(); +// let exist_ethabi = ExistenceProofEthAbi::from_token(exist_tokens).unwrap(); + +// assert_eq!(non_exist, non_exist_ethabi.into()); +// assert_eq!(exist, exist_ethabi.into()); +// } +// } +// } +// } diff --git a/lib/unionlabs/src/union/ics23/non_existence_proof.rs b/lib/unionlabs/src/union/ics23/non_existence_proof.rs index afbf21c9e9..0de4facaaf 100644 --- a/lib/unionlabs/src/union/ics23/non_existence_proof.rs +++ b/lib/unionlabs/src/union/ics23/non_existence_proof.rs @@ -1,13 +1,13 @@ use macros::model; -use crate::{ - errors::MissingField, - union::ics23::existence_proof::{ExistenceProof, TryFromExistenceProofError}, -}; +use crate::union::ics23::existence_proof::ExistenceProof; -#[model(proto(raw(protos::cosmos::ics23::v1::NonExistenceProof), into, from))] +#[model( + proto(raw(protos::cosmos::ics23::v1::NonExistenceProof), into, from), + ethabi(raw(ibc_solidity::ics23::NonExistenceProof), into, from) +)] pub struct NonExistenceProof { - #[serde(with = "::serde_utils::hex_string")] + #[cfg_attr(feature = "serde", serde(with = "::serde_utils::hex_string"))] #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] // TODO: Remove this, as it appears to be unused and the cosmos protos have a comment mentioning the same pub key: Vec, @@ -15,94 +15,96 @@ pub struct NonExistenceProof { pub right: Option, } -#[derive(Debug, Clone, PartialEq, thiserror::Error)] -pub enum TryFromNonExistenceProofError { - #[error(transparent)] - MissingField(#[from] MissingField), - #[error("unable to decode left existence proof")] - Left(TryFromExistenceProofError), - #[error("unable to decode right existence proof")] - Right(TryFromExistenceProofError), -} - #[cfg(feature = "ethabi")] -#[doc(hidden)] -#[derive(Debug, ::ethers::contract::EthAbiType, ::ethers::contract::EthAbiCodec)] -pub struct NonExistenceProofEthAbi { - pub key: ethers::types::Bytes, - pub left: crate::union::ics23::existence_proof::ExistenceProofEthAbi, - pub right: crate::union::ics23::existence_proof::ExistenceProofEthAbi, -} +pub mod ethabi { + use crate::union::ics23::{ + existence_proof::ExistenceProof, non_existence_proof::NonExistenceProof, + }; -#[cfg(feature = "ethabi")] -impl From for NonExistenceProofEthAbi { - fn from(value: NonExistenceProof) -> Self { - let exist_default = || ExistenceProof { - key: vec![], - value: vec![], - leaf_prefix: vec![], - path: vec![], - }; + impl From for ibc_solidity::ics23::NonExistenceProof { + fn from(value: NonExistenceProof) -> Self { + let exist_default = || ExistenceProof { + key: vec![], + value: vec![], + leaf_prefix: vec![], + path: vec![], + }; - NonExistenceProofEthAbi { - key: value.key.into(), - left: value.left.unwrap_or_else(exist_default).into(), - right: value.right.unwrap_or_else(exist_default).into(), + ibc_solidity::ics23::NonExistenceProof { + key: value.key.into(), + left: value.left.unwrap_or_else(exist_default).into(), + right: value.right.unwrap_or_else(exist_default).into(), + } } } -} -#[cfg(feature = "ethabi")] -impl From for NonExistenceProof { - fn from(value: NonExistenceProofEthAbi) -> Self { - let exist_default = super::existence_proof::ExistenceProofEthAbi { - key: vec![].into(), - value: vec![].into(), - leaf_prefix: vec![].into(), - path: vec![], - }; + impl From for NonExistenceProof { + fn from(value: ibc_solidity::ics23::NonExistenceProof) -> Self { + let is_default = |e: &ibc_solidity::ics23::ExistenceProof| { + e.key.is_empty() + && e.value.is_empty() + && e.leafPrefix.is_empty() + && e.path.is_empty() + }; - NonExistenceProof { - key: value.key.to_vec(), - left: (value.left != exist_default).then_some(value.left.into()), - right: (value.right != exist_default).then_some(value.right.into()), + NonExistenceProof { + key: value.key.to_vec(), + left: (is_default(&value.left)).then_some(value.left.into()), + right: (is_default(&value.right)).then_some(value.right.into()), + } } } } -#[cfg(feature = "ethabi")] -impl crate::encoding::Encode for NonExistenceProof { - fn encode(self) -> Vec { - ethers::abi::AbiEncode::encode(NonExistenceProofEthAbi::from(self)) - } -} +#[cfg(feature = "proto")] +pub mod proto { + use crate::{ + errors::MissingField, + union::ics23::{ + existence_proof::proto::TryFromExistenceProofError, + non_existence_proof::NonExistenceProof, + }, + }; -impl TryFrom for NonExistenceProof { - type Error = TryFromNonExistenceProofError; + impl TryFrom for NonExistenceProof { + type Error = TryFromNonExistenceProofError; - fn try_from(value: protos::cosmos::ics23::v1::NonExistenceProof) -> Result { - Ok(Self { - key: value.key, - left: value - .left - .map(TryInto::try_into) - .transpose() - .map_err(TryFromNonExistenceProofError::Left)?, - right: value - .right - .map(TryInto::try_into) - .transpose() - .map_err(TryFromNonExistenceProofError::Right)?, - }) + fn try_from( + value: protos::cosmos::ics23::v1::NonExistenceProof, + ) -> Result { + Ok(Self { + key: value.key, + left: value + .left + .map(TryInto::try_into) + .transpose() + .map_err(TryFromNonExistenceProofError::Left)?, + right: value + .right + .map(TryInto::try_into) + .transpose() + .map_err(TryFromNonExistenceProofError::Right)?, + }) + } } -} -impl From for protos::cosmos::ics23::v1::NonExistenceProof { - fn from(value: NonExistenceProof) -> Self { - Self { - key: value.key, - left: value.left.map(Into::into), - right: value.right.map(Into::into), + impl From for protos::cosmos::ics23::v1::NonExistenceProof { + fn from(value: NonExistenceProof) -> Self { + Self { + key: value.key, + left: value.left.map(Into::into), + right: value.right.map(Into::into), + } } } + + #[derive(Debug, Clone, PartialEq, thiserror::Error)] + pub enum TryFromNonExistenceProofError { + #[error(transparent)] + MissingField(#[from] MissingField), + #[error("unable to decode left existence proof")] + Left(TryFromExistenceProofError), + #[error("unable to decode right existence proof")] + Right(TryFromExistenceProofError), + } } diff --git a/lib/unionlabs/src/validated.rs b/lib/unionlabs/src/validated.rs index 95f99d8f68..8b13789179 100644 --- a/lib/unionlabs/src/validated.rs +++ b/lib/unionlabs/src/validated.rs @@ -1,251 +1 @@ -use core::{ - cmp::Ordering, - fmt::Display, - hash::{Hash, Hasher}, - marker::PhantomData, - ops::Deref, - str::FromStr, -}; -use either::Either; -use serde::{Deserialize, Serialize}; - -#[derive(::macros::Debug, Serialize, Deserialize)] -#[serde( - bound(serialize = "T: Serialize", deserialize = "T: for<'d> Deserialize<'d>"), - transparent -)] -pub struct Validated>( - T, - #[serde(skip)] - #[debug(skip)] - PhantomData V>, -); - -impl> Hash for Validated { - fn hash(&self, state: &mut H) { - self.0.hash(state); - } -} - -impl> PartialOrd for Validated { - fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) - } -} - -impl> Ord for Validated { - fn cmp(&self, other: &Self) -> Ordering { - self.0.cmp(&other.0) - } -} - -impl> Eq for Validated {} - -#[cfg(feature = "schemars")] -impl> schemars::JsonSchema for Validated { - fn schema_name() -> String { - T::schema_name() - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - T::json_schema(gen) - } -} - -pub trait ValidateT: Sized { - fn validate>(self) -> Result, V::Error> { - Validated::new(self) - } -} - -impl ValidateT for T {} - -impl> Display for Validated { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(f, "{}", self.0) - } -} - -impl> FromStr for Validated { - type Err = Either; - - fn from_str(s: &str) -> Result { - Validated::new(s.parse().map_err(Either::Left)?).map_err(Either::Right) - } -} - -impl> Clone for Validated { - fn clone(&self) -> Self { - Self(self.0.clone(), PhantomData) - } -} - -impl> PartialEq for Validated { - #[allow(clippy::unconditional_recursion)] // false positive - fn eq(&self, other: &Self) -> bool { - self.0.eq(&other.0) - } -} - -impl> Deref for Validated { - type Target = T::Target; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -// impl, U, V: Validate + Validate> AsRef> for Validated { -// fn as_ref(&self) -> &Validated { -// Validated(self.0.as_ref(), PhantomData) -// } -// } - -impl> Validated { - pub fn new(t: T) -> Result { - V::validate(t).map(|ok| Validated(ok, PhantomData)) - } - - pub fn value(self) -> T { - self.0 - } - - pub fn mutate( - self, - f: impl FnOnce(T) -> U, - ) -> Result, >::Error> - where - V: Validate, - { - Validated::new(f(self.0)) - } -} - -pub trait Validate: Sized { - type Error; - - // TODO: This should take by ref and return result<(), err> - fn validate(t: T) -> Result; -} - -impl, V2: Validate> Validate for (V1, V2) { - type Error = Either; - - fn validate(t: T) -> Result { - match V1::validate(t).map(|t| V2::validate(t)) { - Ok(Ok(t)) => Ok(t), - Ok(Err(e)) => Err(Either::Right(e)), - Err(e) => Err(Either::Left(e)), - } - } -} - -impl Validate for () { - type Error = (); - - fn validate(t: T) -> Result { - Ok(t) - } -} - -#[cfg(test)] -mod tests { - use core::marker::PhantomData; - - use either::Either; - - use crate::validated::{Validate, Validated}; - - #[derive(Debug, PartialEq)] - struct NonZero; - #[derive(Debug, PartialEq)] - struct NonMax; - #[derive(Debug, PartialEq)] - struct NotEight; - - impl Validate for NonZero { - type Error = Self; - - fn validate(t: u8) -> Result { - if t == 0 { - Err(NonZero) - } else { - Ok(t) - } - } - } - - impl Validate for NonMax { - type Error = Self; - - fn validate(t: u8) -> Result { - if t == u8::MAX { - Err(NonMax) - } else { - Ok(t) - } - } - } - - impl Validate for NotEight { - type Error = Self; - - fn validate(t: u8) -> Result { - if t == 8 { - Err(NotEight) - } else { - Ok(t) - } - } - } - - #[test] - fn validate() { - assert_eq!(Validated::<_, NonZero>::new(0), Err(NonZero)); - - assert_eq!( - Validated::<_, (NonZero, ())>::new(0), - Err(Either::Left(NonZero)) - ); - - assert_eq!( - Validated::<_, (NonZero, NonMax)>::new(0), - Err(Either::Left(NonZero)) - ); - - assert_eq!( - Validated::<_, (NonZero, NonMax)>::new(u8::MAX), - Err(Either::Right(NonMax)) - ); - - assert_eq!( - Validated::<_, (NonZero, NonMax)>::new(8), - Ok(Validated(8, PhantomData)) - ); - - assert_eq!( - Validated::<_, (NonZero, (NonMax, NotEight))>::new(8), - Err(Either::Right(Either::Right(NotEight))) - ); - - assert_eq!( - Validated::<_, (NotEight, (NonMax, NonZero))>::new(8), - Err(Either::Left(NotEight)) - ); - - assert_eq!( - Validated::<_, (NotEight, (NonMax, NonZero))>::new(7) - .unwrap() - .mutate(|t| t + 1), - Err(Either::Left(NotEight)) - ); - - assert_eq!( - Validated::<_, (NotEight, (NonMax, NonZero))>::new(7) - .unwrap() - .mutate(|t| t + 2), - Ok(Validated(9, PhantomData)) - ); - } -} diff --git a/lib/voyager-core/Cargo.toml b/lib/voyager-core/Cargo.toml index f3eaf3941d..9f5a64f730 100644 --- a/lib/voyager-core/Cargo.toml +++ b/lib/voyager-core/Cargo.toml @@ -10,15 +10,16 @@ version = "0.1.0" workspace = true [dependencies] -enumorph = { workspace = true } -hex = { workspace = true } -macros = { workspace = true } -schemars.workspace = true -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -thiserror = { workspace = true } -tracing = { workspace = true } -unionlabs = { workspace = true } +enumorph = { workspace = true } +hex = { workspace = true } +macros = { workspace = true } +schemars = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } +unionlabs = { workspace = true, features = ["serde", "valuable", "schemars"] } +valuable = { workspace = true, features = ["derive"] } [dev-dependencies] hex-literal = { workspace = true } diff --git a/lib/voyager-core/src/lib.rs b/lib/voyager-core/src/lib.rs index ce0ab63657..675347bc3c 100644 --- a/lib/voyager-core/src/lib.rs +++ b/lib/voyager-core/src/lib.rs @@ -1,8 +1,11 @@ #![warn(clippy::pedantic)] -use macros::{apply, model}; +use macros::apply; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; use serde_json::Value; use unionlabs::{hash::H256, ibc::core::client::height::Height}; +use valuable::Valuable; /// Represents the IBC interface of a chain. /// @@ -45,6 +48,23 @@ impl IbcInterface<'static> { // lots more to come - near, fuel - stay tuned } +/// The format used for IBC store commitments. An IBC interface can support potentially many IBC store formats, but a client is expected to verify proofs against only one. +#[apply(str_newtype)] +pub struct IbcStoreFormat; + +/// Well-known IBC stores, defined as constants for reusability and to allow +/// for pattern matching. +impl IbcStoreFormat<'static> { + /// Standard [ICS-24 path space]. This is the store format used by IBC-go. + /// + /// [ICS-24 path space]: https://github.com/cosmos/ibc/tree/main/spec/core/ics-024-host-requirements#path-space + pub const ICS24: &'static str = "ics24"; + + /// The store format used by the union IBC specification. This is the format used by `ibc-solidity`, and is also provided by cosmos chains running the union IBC-go double commit module. + // TODO: Link both of those once they're done, and rename this if we get a better name + pub const ETHABI: &'static str = "ethabi"; +} + /// Newtype for client types. Clients of the same type have the same client /// state, consensus state, and header (client update) types. #[apply(str_newtype)] @@ -184,9 +204,10 @@ pub struct ChainId; /// - 08-wasm client on babylon, tracking union: `(ibc-go-v8/08-wasm, cometbls, /// {"checksum": "0x..."}))` /// - cometbls client on scroll, tracking union: `(ibc-solidity, cometbls)` -#[model] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Valuable, JsonSchema)] pub struct ClientInfo { pub client_type: ClientType<'static>, + /// The IBC interface this client is on. pub ibc_interface: IbcInterface<'static>, /// Additional metadata about this client. /// @@ -194,10 +215,12 @@ pub struct ClientInfo { /// 08-wasm clients, and can likely be removed when support for that IBC /// interface is dropped. #[serde(default)] + #[valuable(skip)] + // TODO: Figure out a good way to emit this in the Valuable implementation pub metadata: Value, } -#[model] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Valuable, JsonSchema)] pub struct ClientStateMeta { /// The counterparty height this client has been updated to. A consensus /// state will exist at this height. @@ -207,14 +230,14 @@ pub struct ClientStateMeta { pub chain_id: ChainId<'static>, } -#[model] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Valuable, JsonSchema)] pub struct ConsensusStateMeta { /// The timestamp of the counterparty at the height represented by this /// consensus state. pub timestamp_nanos: u64, } -#[model] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Valuable, JsonSchema)] pub struct IbcGo08WasmClientMetadata { pub checksum: H256, } @@ -231,10 +254,12 @@ macro_rules! str_newtype { Clone, PartialEq, Eq, + PartialOrd, + Ord, Hash, ::serde::Serialize, ::serde::Deserialize, - ::schemars::JsonSchema + ::schemars::JsonSchema, )] // I tested this and apparently it's not required (newtype is automatically transparent?) but // keeping it here for clarity @@ -248,6 +273,16 @@ macro_rules! str_newtype { } } + impl<'a> ::valuable::Valuable for $Struct<'a> { + fn as_value(&self) -> ::valuable::Value<'_> { + ::valuable::Value::String(&self.0) + } + + fn visit(&self, visit: &mut dyn ::valuable::Visit) { + visit.visit_value(self.as_value()); + } + } + #[allow(unused)] impl<'a> $Struct<'a> { /// Construct a new [` diff --git a/lib/voyager-macros/Cargo.toml b/lib/voyager-macros/Cargo.toml new file mode 100644 index 0000000000..230b59d23d --- /dev/null +++ b/lib/voyager-macros/Cargo.toml @@ -0,0 +1,17 @@ +[package] +edition.workspace = true +license-file.workspace = true +name = "voyager-macros" +repository.workspace = true +version = "0.1.0" + +[lints] +workspace = true + +[lib] +proc-macro = true + +[dependencies] +proc-macro2 = "1.0.78" +quote = "1.0.35" +syn = { version = "2.0.52", default-features = false, features = ["clone-impls", "parsing", "printing", "proc-macro", "derive", "fold"] } diff --git a/lib/voyager-macros/src/lib.rs b/lib/voyager-macros/src/lib.rs new file mode 100644 index 0000000000..56ae7d5801 --- /dev/null +++ b/lib/voyager-macros/src/lib.rs @@ -0,0 +1,72 @@ +use proc_macro2::TokenStream; +use quote::quote; +use syn::{spanned::Spanned, Item, ItemEnum, ItemStruct}; + +#[proc_macro_attribute] +pub fn model( + meta: proc_macro::TokenStream, + ts: proc_macro::TokenStream, +) -> proc_macro::TokenStream { + let input = proc_macro2::TokenStream::from(ts.clone()); + + let item = syn::parse_macro_input!(ts as Item); + + if !meta.is_empty() { + return syn::Error::new( + TokenStream::from(meta).span(), + "#[model] takes no arguments", + ) + .into_compile_error() + .into(); + } + + let attributes = match item { + Item::Enum(ItemEnum { .. }) => { + let serde = quote! { + #[derive(::serde::Serialize, ::serde::Deserialize)] + #[serde( + deny_unknown_fields, + tag = "@type", + content = "@value", + rename_all = "snake_case" + )] + }; + + quote! { + #[derive( + ::core::fmt::Debug, + ::core::clone::Clone, + ::core::cmp::PartialEq, + ::core::cmp::Eq, + )] + #serde + } + } + Item::Struct(ItemStruct { .. }) => { + let serde = quote! { + #[derive(::serde::Serialize, ::serde::Deserialize)] + #[serde( + deny_unknown_fields, + rename_all = "snake_case" + )] + }; + + quote! { + #[derive( + ::core::fmt::Debug, + ::core::clone::Clone, + ::core::cmp::PartialEq, + ::core::cmp::Eq, + )] + #serde + } + } + _ => panic!(), + }; + + quote! { + #attributes + #input + } + .into() +} diff --git a/lib/voyager-message/Cargo.toml b/lib/voyager-message/Cargo.toml index 7dbc454ce8..bddcb4fc24 100644 --- a/lib/voyager-message/Cargo.toml +++ b/lib/voyager-message/Cargo.toml @@ -10,14 +10,10 @@ version = "0.1.0" workspace = true [dependencies] -beacon-api = { workspace = true } -chain-utils = { workspace = true } -clap = { workspace = true, features = ["derive"] } -contracts = { workspace = true, features = ["providers"] } +alloy = { workspace = true } +clap = { workspace = true, features = ["default", "derive", "env", "error-context"] } dashmap = { workspace = true } enumorph = { workspace = true } -ethers = { workspace = true, features = ["rustls", "ws"] } -frame-support-procedural = { workspace = true } futures = { workspace = true } hex = { workspace = true } itertools = "0.13.0" @@ -26,31 +22,26 @@ jaq-interpret = "1.5.0" jaq-std = "1.6.0" jaq-syn = "1.6.0" jsonrpsee = { workspace = true, features = ["server", "client", "async-client", "macros", "tracing"] } -macros = { workspace = true } moka = { version = "0.12.8", features = ["future", "sync"] } -num-bigint = { workspace = true } prost = { workspace = true } protos = { workspace = true, features = ["proto_full", "client"] } reconnecting-jsonrpc-ws-client = { workspace = true } reth-ipc = { git = "https://github.com/paradigmxyz/reth" } -schemars.workspace = true +schemars = { workspace = true } serde = { workspace = true, features = ["derive"] } serde-utils = { workspace = true } serde_json = { workspace = true } -soketto = "0.8.0" subset-of = { workspace = true } -tendermint = { workspace = true } -tendermint-proto = { workspace = true } -tendermint-rpc = { workspace = true, features = ["http-client", "websocket-client"] } thiserror = { workspace = true } tokio = { workspace = true, features = ["time", "process", "fs"] } tokio-util = "0.7.11" -tonic = { workspace = true, features = ["transport", "tls", "tls-roots", "tls-webpki-roots"] } -tracing = { workspace = true } +tracing = { workspace = true, features = ["valuable"] } tracing-subscriber = { workspace = true, features = ["json"] } -typenum = { workspace = true } -unionlabs = { workspace = true, features = ["ethabi"] } +unionlabs = { workspace = true, features = ["std", "serde", "valuable"] } +unionlabs-tracing = { workspace = true } +valuable = { workspace = true, features = ["derive"] } voyager-core = { workspace = true } +voyager-macros = { workspace = true } voyager-vm = { workspace = true } [dev-dependencies] diff --git a/lib/voyager-message/src/call.rs b/lib/voyager-message/src/call.rs index f0291a4cdd..00d4806caf 100644 --- a/lib/voyager-message/src/call.rs +++ b/lib/voyager-message/src/call.rs @@ -1,6 +1,5 @@ use enumorph::Enumorph; use jsonrpsee::{core::RpcResult, types::ErrorObject}; -use macros::model; use serde::de::DeserializeOwned; use serde_json::Value; use serde_utils::Hex; @@ -23,13 +22,14 @@ use unionlabs::{ }, ics24::{ AcknowledgementPath, ChannelEndPath, ClientConsensusStatePath, ClientStatePath, - CommitmentPath, ConnectionPath, ReceiptPath, + CommitmentPath, ConnectionPath, }, id::{ClientId, ConnectionId}, - traits::Member, QueryHeight, DELAY_PERIOD, }; +use valuable::Valuable; use voyager_core::ClientType; +use voyager_macros::model; use voyager_vm::{call, data, defer, noop, now, seq, CallT, Op, QueueError}; #[cfg(doc)] @@ -39,7 +39,7 @@ use crate::{ data::{IbcMessage, MsgCreateClientData, WithChainId}, error_object_to_queue_error, json_rpc_error_to_queue_error, module::{ChainModuleClient, ClientModuleClient, ConsensusModuleClient, PluginClient}, - rpc::json_rpc_error_to_error_object, + rpc::{json_rpc_error_to_error_object, VoyagerRpcServer}, Context, PluginMessage, VoyagerMessage, FATAL_JSONRPC_ERROR_CODE, }; @@ -399,6 +399,12 @@ impl CallT for Call { .await .map_err(error_object_to_queue_error)?; + let ibc_store_format = ctx + .rpc_server + .client_type_ibc_store_format(target_client_info.client_type.clone()) + .await + .map_err(error_object_to_queue_error)?; + // proof of connection_state, encoded for the client on the target chain // this is encoded via the client module for the client on the origin chain // (the chain the event was emitted on) @@ -409,12 +415,13 @@ impl CallT for Call { &target_client_info.ibc_interface, ctx.rpc_server .query_ibc_proof( - &origin_chain_id, - origin_chain_proof_height, + origin_chain_id, + origin_chain_proof_height.into(), ConnectionPath { connection_id: connection_open_ack_event.connection_id.clone(), } .into(), + ibc_store_format, ) .await .map_err(error_object_to_queue_error)? @@ -438,34 +445,39 @@ impl CallT for Call { target_chain_id, channel_open_init_event: event, }) => { - let origin_channel_path = ChannelEndPath { - port_id: event.port_id.clone(), - channel_id: event.channel_id.clone(), - }; - let origin_channel = ctx .rpc_server - .query_ibc_state_typed( - &origin_chain_id, - origin_chain_proof_height, - origin_channel_path.clone(), + .query_channel( + origin_chain_id.clone(), + origin_chain_proof_height.into(), + event.channel_id.clone(), ) .await - .map_err(json_rpc_error_to_queue_error)?; + .map_err(error_object_to_queue_error)?; - let proof_init = ctx + let client_info = ctx .rpc_server - .query_ibc_proof( - &origin_chain_id, - origin_chain_proof_height, - origin_channel_path.into(), - ) + .client_info(&target_chain_id, event.connection.counterparty.client_id) .await .map_err(error_object_to_queue_error)?; - let client_info = ctx + let ibc_store_format = ctx .rpc_server - .client_info(&target_chain_id, event.connection.counterparty.client_id) + .client_type_ibc_store_format(client_info.client_type.clone()) + .await + .map_err(error_object_to_queue_error)?; + + let proof_init = ctx + .rpc_server + .query_ibc_proof( + origin_chain_id, + origin_chain_proof_height.into(), + (ChannelEndPath { + channel_id: event.channel_id.clone(), + }) + .into(), + ibc_store_format, + ) .await .map_err(error_object_to_queue_error)?; @@ -489,7 +501,7 @@ impl CallT for Call { .ordering, counterparty: channel::counterparty::Counterparty { port_id: event.port_id, - channel_id: event.channel_id.to_string(), + channel_id: Some(event.channel_id), }, connection_hops: vec![event.connection.counterparty.connection_id.unwrap()], version: event.version.clone(), @@ -506,26 +518,31 @@ impl CallT for Call { target_chain_id, channel_open_try_event, }) => { - let origin_channel_path = ChannelEndPath { - port_id: channel_open_try_event.port_id.clone(), - channel_id: channel_open_try_event.channel_id.clone(), - }; - - let proof_try = ctx + let client_info = ctx .rpc_server - .query_ibc_proof( - &origin_chain_id, - origin_chain_proof_height, - origin_channel_path.into(), + .client_info( + &target_chain_id, + channel_open_try_event.connection.counterparty.client_id, ) .await .map_err(error_object_to_queue_error)?; - let client_info = ctx + let ibc_store_format = ctx .rpc_server - .client_info( - &target_chain_id, - channel_open_try_event.connection.counterparty.client_id, + .client_type_ibc_store_format(client_info.client_type.clone()) + .await + .map_err(error_object_to_queue_error)?; + + let proof_try = ctx + .rpc_server + .query_ibc_proof( + origin_chain_id, + origin_chain_proof_height.into(), + ChannelEndPath { + channel_id: channel_open_try_event.channel_id.clone(), + } + .into(), + ibc_store_format, ) .await .map_err(error_object_to_queue_error)?; @@ -556,26 +573,31 @@ impl CallT for Call { target_chain_id, channel_open_ack_event, }) => { - let origin_channel_path = ChannelEndPath { - port_id: channel_open_ack_event.port_id.clone(), - channel_id: channel_open_ack_event.channel_id.clone(), - }; - - let proof_ack = ctx + let client_info = ctx .rpc_server - .query_ibc_proof( - &origin_chain_id, - origin_chain_proof_height, - origin_channel_path.into(), + .client_info( + &target_chain_id, + channel_open_ack_event.connection.counterparty.client_id, ) .await .map_err(error_object_to_queue_error)?; - let client_info = ctx + let ibc_store_format = ctx .rpc_server - .client_info( - &target_chain_id, - channel_open_ack_event.connection.counterparty.client_id, + .client_type_ibc_store_format(client_info.client_type.clone()) + .await + .map_err(error_object_to_queue_error)?; + + let proof_ack = ctx + .rpc_server + .query_ibc_proof( + origin_chain_id, + origin_chain_proof_height.into(), + ChannelEndPath { + channel_id: channel_open_ack_event.channel_id.clone(), + } + .into(), + ibc_store_format, ) .await .map_err(error_object_to_queue_error)?; @@ -647,7 +669,8 @@ impl CallT for Call { .await .map_err(error_object_to_queue_error)?; - if chain_height.revision_number != height.revision_number { + // REVIEW: We may need to remove this + if chain_height.revision() != height.revision() { return Err(QueueError::Fatal( format!( "revision number mismatch, \ @@ -659,7 +682,7 @@ impl CallT for Call { debug!("latest height is {chain_height}, waiting for {height}"); - if chain_height.revision_height >= height.revision_height { + if chain_height.height() >= height.height() { Ok(noop()) } else { Ok(seq([ @@ -678,10 +701,10 @@ impl CallT for Call { Ok(call(WaitForHeight { chain_id, - height: Height { - revision_number: chain_height.revision_number, - revision_height: chain_height.revision_height + height, - }, + height: Height::new_with_revision( + chain_height.revision(), + chain_height.height() + height, + ), })) } @@ -736,7 +759,7 @@ impl CallT for Call { .await .map_err(error_object_to_queue_error)?; - if trusted_client_state_meta.height.revision_height >= height.revision_height { + if trusted_client_state_meta.height.height() >= height.height() { debug!( "client height reached ({} >= {})", trusted_client_state_meta.height, height @@ -771,14 +794,7 @@ impl CallT for Call { %origin_chain_id, %origin_chain_proof_height, %target_chain_id, - %send_packet_event.packet.sequence, - %send_packet_event.packet.source_channel.port_id, - %send_packet_event.packet.source_channel.channel_id, - %send_packet_event.packet.destination_channel.port_id, - %send_packet_event.packet.destination_channel.channel_id, - %send_packet_event.packet.channel_ordering, - %send_packet_event.packet.timeout_height, - %send_packet_event.packet.timeout_timestamp, + send_packet_event.packet = send_packet_event.packet.as_value(), ) )] async fn make_msg_recv_packet( @@ -798,21 +814,18 @@ async fn make_msg_recv_packet( let commitment = ctx .rpc_server - .query_ibc_state_typed( - &target_chain_id, - target_chain_latest_height, - ReceiptPath { - port_id: send_packet_event.packet.destination_channel.port_id.clone(), - channel_id: send_packet_event - .packet - .destination_channel - .channel_id - .clone(), - sequence: send_packet_event.packet.sequence, - }, + .query_receipt( + target_chain_id.clone(), + target_chain_latest_height.into(), + send_packet_event + .packet + .destination_channel + .channel_id + .clone(), + send_packet_event.packet.sequence, ) .await - .map_err(json_rpc_error_to_queue_error)? + .map_err(error_object_to_queue_error)? .state; if commitment { @@ -820,22 +833,6 @@ async fn make_msg_recv_packet( return Ok(noop()); } - let proof_commitment = ctx - .rpc_server - .query_ibc_proof( - &origin_chain_id, - origin_chain_proof_height, - CommitmentPath { - port_id: send_packet_event.packet.source_channel.port_id.clone(), - channel_id: send_packet_event.packet.source_channel.channel_id.clone(), - sequence: send_packet_event.packet.sequence, - } - .into(), - ) - .await - .map_err(error_object_to_queue_error)? - .proof; - let client_info = ctx .rpc_server .client_info( @@ -849,6 +846,28 @@ async fn make_msg_recv_packet( .await .map_err(error_object_to_queue_error)?; + let ibc_store_format = ctx + .rpc_server + .client_type_ibc_store_format(client_info.client_type.clone()) + .await + .map_err(error_object_to_queue_error)?; + + let proof_commitment = ctx + .rpc_server + .query_ibc_proof( + origin_chain_id, + origin_chain_proof_height.into(), + CommitmentPath { + channel_id: send_packet_event.packet.source_channel.channel_id.clone(), + sequence: send_packet_event.packet.sequence, + } + .into(), + ibc_store_format, + ) + .await + .map_err(error_object_to_queue_error)? + .proof; + let encoded_proof_commitment = ctx .rpc_server .encode_proof( @@ -881,14 +900,7 @@ async fn make_msg_recv_packet( %origin_chain_id, %origin_chain_proof_height, %target_chain_id, - %write_acknowledgement_event.packet.sequence, - %write_acknowledgement_event.packet.source_channel.port_id, - %write_acknowledgement_event.packet.source_channel.channel_id, - %write_acknowledgement_event.packet.destination_channel.port_id, - %write_acknowledgement_event.packet.destination_channel.channel_id, - %write_acknowledgement_event.packet.channel_ordering, - %write_acknowledgement_event.packet.timeout_height, - %write_acknowledgement_event.packet.timeout_timestamp, + write_acknowledgement_event.packet = write_acknowledgement_event.packet.as_value(), ) )] async fn make_msg_acknowledgement( @@ -908,25 +920,18 @@ async fn make_msg_acknowledgement( let commitment = ctx .rpc_server - .query_ibc_state_typed( - &target_chain_id, - target_chain_latest_height, - CommitmentPath { - port_id: write_acknowledgement_event - .packet - .source_channel - .port_id - .clone(), - channel_id: write_acknowledgement_event - .packet - .source_channel - .channel_id - .clone(), - sequence: write_acknowledgement_event.packet.sequence, - }, + .query_commitment( + target_chain_id.clone(), + target_chain_latest_height.into(), + write_acknowledgement_event + .packet + .source_channel + .channel_id + .clone(), + write_acknowledgement_event.packet.sequence, ) .await - .map_err(json_rpc_error_to_queue_error)? + .map_err(error_object_to_queue_error)? .state; if commitment.is_none() { @@ -934,17 +939,31 @@ async fn make_msg_acknowledgement( return Ok(noop()); } + let client_info = ctx + .rpc_server + .client_info( + &target_chain_id, + write_acknowledgement_event + .packet + .source_channel + .connection + .client_id, + ) + .await + .map_err(error_object_to_queue_error)?; + + let ibc_store_format = ctx + .rpc_server + .client_type_ibc_store_format(client_info.client_type.clone()) + .await + .map_err(error_object_to_queue_error)?; + let proof_acked = ctx .rpc_server .query_ibc_proof( - &origin_chain_id, - origin_chain_proof_height, + origin_chain_id, + origin_chain_proof_height.into(), AcknowledgementPath { - port_id: write_acknowledgement_event - .packet - .destination_channel - .port_id - .clone(), channel_id: write_acknowledgement_event .packet .destination_channel @@ -953,24 +972,12 @@ async fn make_msg_acknowledgement( sequence: write_acknowledgement_event.packet.sequence, } .into(), + ibc_store_format, ) .await .map_err(error_object_to_queue_error)? .proof; - let client_info = ctx - .rpc_server - .client_info( - &target_chain_id, - write_acknowledgement_event - .packet - .source_channel - .connection - .client_id, - ) - .await - .map_err(error_object_to_queue_error)?; - let encoded_proof_acked = ctx .rpc_server .encode_proof( @@ -1105,9 +1112,9 @@ async fn make_msg_create_client( fields( %origin_chain_id, %target_chain_id, - %client_id, - %counterparty_client_id, - %connection_id, + client_id = client_id.as_value(), + counterparty_client_id = counterparty_client_id.as_value(), + connection_id = connection_id.as_value(), %origin_chain_proof_height, ) )] @@ -1129,10 +1136,8 @@ async fn mk_connection_handshake_state_and_proofs( .await?; debug!( - %counterparty_client_id, - %target_client_info.client_type, - %target_client_info.ibc_interface, - %target_client_info.metadata, + counterparty_client_id = counterparty_client_id.as_value(), + target_client_info = target_client_info.as_value() ); // info of the client on the origin chain, this is used to decode the stored @@ -1144,25 +1149,24 @@ async fn mk_connection_handshake_state_and_proofs( .await?; debug!( - %client_id, - %origin_client_info.client_type, - %origin_client_info.ibc_interface, - %origin_client_info.metadata, + client_id = client_id.as_value(), + origin_client_info = origin_client_info.as_value() ); + let ibc_store_format = ctx + .rpc_server + .client_type_ibc_store_format(target_client_info.client_type.clone()) + .await?; + // client state of the destination on the source - let client_state_path = ClientStatePath { - client_id: client_id.clone(), - }; let client_state = ctx .rpc_server - .query_ibc_state_typed( - &origin_chain_id, - origin_chain_proof_height, - client_state_path, + .query_client_state( + origin_chain_id.clone(), + origin_chain_proof_height.into(), + client_id.clone(), ) - .await - .map_err(json_rpc_error_to_error_object)? + .await? .state; debug!(%client_state); @@ -1179,10 +1183,7 @@ async fn mk_connection_handshake_state_and_proofs( ) .await?; - debug!( - %client_meta.height, - %client_meta.chain_id, - ); + debug!(client_meta = client_meta.as_value()); let reencoded_client_state = ctx .rpc_server @@ -1200,35 +1201,31 @@ async fn mk_connection_handshake_state_and_proofs( // the connection end as stored by the origin chain after open_init/try let connection_state = ctx .rpc_server - .query_ibc_state_typed( - &origin_chain_id, - origin_chain_proof_height, - ConnectionPath { - connection_id: connection_id.clone(), - }, + .query_connection( + origin_chain_id.clone(), + origin_chain_proof_height.into(), + connection_id.clone(), ) - .await - .map_err(json_rpc_error_to_error_object)? + .await? .state .ok_or(ErrorObject::owned( FATAL_JSONRPC_ERROR_CODE, "connection must exist", None::<()>, ))?; - debug!( - connection_state = %serde_json::to_string(&connection_state).unwrap(), - ); + debug!(connection_state = connection_state.as_value()); // proof of connection_state, encoded for the client on the target chain let connection_proof = ctx .rpc_server .query_ibc_proof( - &origin_chain_id, - origin_chain_proof_height, + origin_chain_id.clone(), + origin_chain_proof_height.into(), ConnectionPath { connection_id: connection_id.clone(), } .into(), + ibc_store_format.clone(), ) .await? .proof; @@ -1247,12 +1244,13 @@ async fn mk_connection_handshake_state_and_proofs( let client_state_proof = ctx .rpc_server .query_ibc_proof( - &origin_chain_id, - origin_chain_proof_height, + origin_chain_id.clone(), + origin_chain_proof_height.into(), ClientStatePath { client_id: client_id.clone(), } .into(), + ibc_store_format.clone(), ) .await? .proof; @@ -1271,13 +1269,14 @@ async fn mk_connection_handshake_state_and_proofs( let consensus_state_proof = ctx .rpc_server .query_ibc_proof( - &origin_chain_id, - origin_chain_proof_height, + origin_chain_id.clone(), + origin_chain_proof_height.into(), ClientConsensusStatePath { client_id: client_id.clone(), height: client_meta.height, } .into(), + ibc_store_format, ) .await? .proof; diff --git a/lib/voyager-message/src/callback.rs b/lib/voyager-message/src/callback.rs index 6449a55b6c..00924fe818 100644 --- a/lib/voyager-message/src/callback.rs +++ b/lib/voyager-message/src/callback.rs @@ -3,24 +3,26 @@ use std::collections::VecDeque; use enumorph::Enumorph; use futures::{stream, StreamExt, TryFutureExt, TryStreamExt}; use itertools::Itertools; -use macros::model; -use serde::de::DeserializeOwned; -use unionlabs::{ - ibc::core::client::msg_update_client::MsgUpdateClient, id::ClientId, traits::Member, -}; -use voyager_core::ClientInfo; +use serde::{de::DeserializeOwned, Deserialize, Serialize}; +use unionlabs::{ibc::core::client::msg_update_client::MsgUpdateClient, id::ClientId}; use voyager_vm::{CallbackT, Op, QueueError}; use crate::{ - core::ChainId, + core::{ChainId, ClientInfo}, data::{Data, OrderedHeaders, OrderedMsgUpdateClients}, error_object_to_queue_error, json_rpc_error_to_queue_error, + macros::model, module::{ClientModuleClient, PluginClient}, Context, PluginMessage, VoyagerMessage, }; -#[model] -#[derive(Enumorph)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Enumorph)] +#[serde( + deny_unknown_fields, + tag = "@type", + content = "@value", + rename_all = "snake_case" +)] pub enum Callback { AggregateMsgUpdateClientsFromOrderedHeaders(AggregateMsgUpdateClientsFromOrderedHeaders), diff --git a/lib/voyager-message/src/context.rs b/lib/voyager-message/src/context.rs index 1b72bbd405..d4944c8e3d 100644 --- a/lib/voyager-message/src/context.rs +++ b/lib/voyager-message/src/context.rs @@ -1,5 +1,6 @@ use std::{ collections::HashMap, + fmt::Debug, path::{Path, PathBuf}, process::Stdio, sync::Arc, @@ -12,19 +13,19 @@ use futures::{ Future, StreamExt, TryStreamExt, }; use jsonrpsee::types::{ErrorObject, ErrorObjectOwned}; -use macros::model; use schemars::JsonSchema; use serde::Serialize; use serde_json::{Map, Value}; use tokio::time::sleep; use tokio_util::sync::CancellationToken; use tracing::{debug, debug_span, error, info, instrument, trace, warn, Instrument}; -use unionlabs::{ethereum::keccak256, hash::hash_v2::HexUnprefixed, traits::Member, ErrorReporter}; -use voyager_core::ConsensusType; +use unionlabs::{ethereum::keccak256, hash::hash_v2::HexUnprefixed, ErrorReporter}; +use voyager_core::{ConsensusType, IbcStoreFormat}; use voyager_vm::{BoxDynError, QueueError}; use crate::{ core::{ChainId, ClientType, IbcInterface}, + macros::model, module::{ ChainModuleClient, ChainModuleInfo, ClientModuleClient, ClientModuleInfo, ConsensusModuleClient, ConsensusModuleInfo, PluginClient, PluginInfo, @@ -62,18 +63,27 @@ pub struct Modules { chain_consensus_types: HashMap, ConsensusType<'static>>, client_consensus_types: HashMap, ConsensusType<'static>>, + + client_ibc_store_formats: HashMap, IbcStoreFormat<'static>>, } impl voyager_vm::Context for Context {} -#[derive(macros::Debug, Clone)] +#[derive(Clone)] pub struct ModuleRpcClient { - #[debug(skip)] client: reconnecting_jsonrpc_ws_client::Client, #[allow(dead_code)] name: String, } +impl Debug for ModuleRpcClient { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ModuleRpcClient") + .field("name", &self.name) + .finish_non_exhaustive() + } +} + impl ModuleRpcClient { fn new(name: &str) -> Self { let socket = Self::make_socket_path(name); @@ -185,6 +195,7 @@ impl Context { consensus_modules: Default::default(), chain_consensus_types: Default::default(), client_consensus_types: Default::default(), + client_ibc_store_formats: Default::default(), }; let mut plugins = HashMap::default(); @@ -326,6 +337,7 @@ impl Context { client_type, consensus_type, ibc_interface, + ibc_store_format, }, rpc_client| { let prev = modules @@ -358,6 +370,21 @@ impl Context { } } + if let Some(previous_ibc_store_format) = modules + .client_ibc_store_formats + .insert(client_type.clone(), ibc_store_format.clone()) + { + if &previous_ibc_store_format != ibc_store_format { + return Err(format!( + "inconsistency in client IBC store formats: \ + client type `{client_type}` is registered \ + as verifying against both `{previous_ibc_store_format}` \ + and `{ibc_store_format}`" + ) + .into()); + } + } + Ok(()) }, ) @@ -499,6 +526,7 @@ impl Modules { consensus_type: self.client_consensus_types[client_type].clone(), client_type: client_type.clone(), ibc_interface, + ibc_store_format: self.client_ibc_store_formats[client_type].clone(), }) }) .collect(); @@ -530,6 +558,17 @@ impl Modules { }) } + pub fn client_ibc_store_format<'a, 'b, 'c: 'a>( + &'a self, + client_type: &'b ClientType<'c>, + ) -> Result<&'a IbcStoreFormat<'static>, ClientModuleNotFound> { + self.client_ibc_store_formats + .get(client_type) + .ok_or_else(|| ClientModuleNotFound::ClientTypeNotFound { + client_type: client_type.clone().into_owned(), + }) + } + pub fn chain_module<'a, 'b, 'c: 'a>( &'a self, chain_id: &'b ChainId<'c>, diff --git a/lib/voyager-message/src/data.rs b/lib/voyager-message/src/data.rs index f96ab47c4f..9ec2bd327b 100644 --- a/lib/voyager-message/src/data.rs +++ b/lib/voyager-message/src/data.rs @@ -1,8 +1,7 @@ use std::num::NonZeroU64; use enumorph::Enumorph; -use macros::model; -use serde::de::DeserializeOwned; +use serde::{de::DeserializeOwned, Deserialize, Serialize}; use serde_json::Value; use subset_of::SubsetOf; use tracing::info; @@ -27,18 +26,24 @@ use unionlabs::{ msg_connection_open_try::MsgConnectionOpenTry, }, }, - ics24::{ClientConsensusStatePath, ClientStatePath, IbcPath, Path}, + ics24::{ClientConsensusStatePath, ClientStatePath, Path}, id::{ChannelId, ClientId, ConnectionId, PortId}, - traits::Member, }; +use valuable::Valuable; use crate::{ core::{ChainId, ClientInfo, ClientStateMeta, ClientType, ConsensusStateMeta}, + macros::model, PluginMessage, }; -#[model] -#[derive(Enumorph, SubsetOf)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Enumorph, SubsetOf)] +#[serde( + deny_unknown_fields, + tag = "@type", + content = "@value", + rename_all = "snake_case" +)] #[allow(clippy::large_enum_variant)] pub enum Data { IbcEvent(ChainEvent), @@ -154,7 +159,7 @@ impl ChainEvent { } #[model] -#[derive(Enumorph)] +#[derive(Enumorph, Valuable)] pub enum IbcMessage { CreateClient(MsgCreateClientData), UpdateClient(MsgUpdateClient), @@ -295,11 +300,11 @@ pub struct ChannelOpenConfirm { #[model] pub struct WriteAcknowledgement { #[serde(with = "::serde_utils::hex_string")] - #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] + // #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub packet_data: Vec, #[serde(with = "::serde_utils::hex_string")] - #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] + // #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub packet_ack: Vec, pub packet: PacketMetadata, @@ -308,7 +313,7 @@ pub struct WriteAcknowledgement { #[model] pub struct RecvPacket { #[serde(with = "::serde_utils::hex_string")] - #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] + // #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub packet_data: Vec, pub packet: PacketMetadata, @@ -317,7 +322,7 @@ pub struct RecvPacket { #[model] pub struct SendPacket { #[serde(with = "::serde_utils::hex_string")] - #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] + // #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub packet_data: Vec, pub packet: PacketMetadata, @@ -334,6 +339,7 @@ pub struct TimeoutPacket { } #[model] +#[derive(Valuable)] pub struct PacketMetadata { pub sequence: NonZeroU64, @@ -347,6 +353,7 @@ pub struct PacketMetadata { } #[model] +#[derive(Valuable)] pub struct ChannelMetadata { pub port_id: PortId, pub channel_id: ChannelId, @@ -356,6 +363,7 @@ pub struct ChannelMetadata { } #[model] +#[derive(Valuable)] pub struct ConnectionMetadata { pub client_id: ClientId, // this is really `Either` @@ -396,22 +404,11 @@ pub struct UnfinalizedTrustedClientState { } #[model] -#[serde(bound(serialize = "", deserialize = ""))] -pub struct IbcState { - pub chain_id: ChainId<'static>, - pub path: P, - /// The height that the state was read at. - pub height: Height, - pub state: P::Value, -} - -#[model] -#[serde(bound(serialize = "", deserialize = ""))] -pub struct IbcProof { - pub path: P, +pub struct IbcProof { + pub path: Path, pub height: Height, #[serde(with = "::serde_utils::hex_string")] - #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] + // #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub proof: Vec, } @@ -458,21 +455,21 @@ pub struct OrderedMsgUpdateClients { #[model] pub struct EncodedClientState { #[serde(with = "::serde_utils::hex_string")] - #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] + // #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub encoded_client_state: Vec, } #[model] pub struct EncodedConsensusState { #[serde(with = "::serde_utils::hex_string")] - #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] + // #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub encoded_consensus_state: Vec, } #[model] pub struct EncodedHeader { #[serde(with = "::serde_utils::hex_string")] - #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] + // #[debug(wrap = ::serde_utils::fmt::DebugAsHex)] pub encoded_header: Vec, } @@ -483,189 +480,8 @@ pub struct WithChainId { } #[model] +#[derive(Valuable)] pub struct MsgCreateClientData { pub msg: MsgCreateClient, pub client_type: ClientType<'static>, } - -pub fn log_msg(chain_id: &str, effect: &IbcMessage) { - match effect.clone() { - IbcMessage::ConnectionOpenInit(message) => { - info!( - %chain_id, - %message.client_id, - %message.counterparty.client_id, - message.counterparty.connection_id = %message.counterparty.connection_id.as_deref().unwrap_or_default(), - message.counterparty.prefix.key_prefix = %::serde_utils::to_hex(message.counterparty.prefix.key_prefix), - %message.version.identifier, - message.version.features = %message - .version - .features - .into_iter() - .map(|x| x.to_string()) - .collect::>() - .join(","), - %message.delay_period, - ) - } - IbcMessage::ConnectionOpenTry(message) => { - info!( - %chain_id, - %message.client_id, - %message.counterparty.client_id, - message.counterparty.connection_id = %message.counterparty.connection_id.as_deref().unwrap_or_default(), - message.counterparty.prefix.key_prefix = %::serde_utils::to_hex(message.counterparty.prefix.key_prefix), - %message.delay_period, - // TODO: This needs `valuable` - // message.counterparty_versions = %message - // .counterparty_versions - // .into_iter() - // .map(Into::into) - // .collect(), - %message.proof_height, - %message.consensus_height, - ) - } - IbcMessage::ConnectionOpenAck(message) => { - info!( - %chain_id, - // client_state.height = message.%data.message.client_state.height(), - %message.proof_height, - %message.consensus_height, - %message.connection_id, - %message.counterparty_connection_id, - %message.version.identifier, - message.version.features = %message - .version - .features - .into_iter() - .map(|x| x.to_string()) - .collect::>() - .join(","), - ) - } - IbcMessage::ConnectionOpenConfirm(message) => { - info!( - %chain_id, - %message.connection_id, - %message.proof_height, - ) - } - IbcMessage::ChannelOpenInit(message) => { - info!( - %chain_id, - %message.port_id, - %message.channel.state, - %message.channel.ordering, - %message.channel.counterparty.port_id, - %message.channel.counterparty.channel_id, - message.channel.connection_hops = %message - .channel - .connection_hops - .into_iter() - .map(|x| x.to_string()) - .collect::>() - .join(","), - %message.channel.version, - ) - } - IbcMessage::ChannelOpenTry(message) => { - info!( - %chain_id, - - %message.port_id, - %message.channel.state, - %message.channel.ordering, - %message.channel.counterparty.port_id, - %message.channel.counterparty.channel_id, - message.channel.connection_hops = %message - .channel - .connection_hops - .into_iter() - .map(|x| x.to_string()) - .collect::>() - .join(","), - %message.channel.version, - %message.counterparty_version, - %message.proof_height, - ) - } - IbcMessage::ChannelOpenAck(message) => { - info!( - %chain_id, - %message.port_id, - %message.channel_id, - %message.counterparty_version, - %message.counterparty_channel_id, - %message.proof_height, - ) - } - IbcMessage::ChannelOpenConfirm(message) => { - info!( - %chain_id, - %message.port_id, - %message.channel_id, - %message.proof_height, - ) - } - IbcMessage::RecvPacket(message) => { - info!( - %chain_id, - %message.packet.sequence, - %message.packet.source_port, - %message.packet.source_channel, - %message.packet.destination_port, - %message.packet.destination_channel, - message.data = %::serde_utils::to_hex(message.packet.data), - %message.packet.timeout_height, - %message.packet.timeout_timestamp, - - %message.proof_height, - ) - } - IbcMessage::AcknowledgePacket(message) => { - info!( - %chain_id, - %message.packet.sequence, - %message.packet.source_port, - %message.packet.source_channel, - %message.packet.destination_port, - %message.packet.destination_channel, - message.data = %::serde_utils::to_hex(message.packet.data), - %message.packet.timeout_height, - %message.packet.timeout_timestamp, - - message.data = %::serde_utils::to_hex(message.acknowledgement), - %message.proof_height, - ) - } - IbcMessage::TimeoutPacket(message) => { - info!( - %chain_id, - %message.packet.sequence, - %message.packet.source_port, - %message.packet.source_channel, - %message.packet.destination_port, - %message.packet.destination_channel, - message.data = %::serde_utils::to_hex(message.packet.data), - %message.packet.timeout_height, - %message.packet.timeout_timestamp, - - %message.proof_height, - %message.next_sequence_recv, - ) - } - IbcMessage::CreateClient(message) => { - info!( - %chain_id, - %message.client_type, - ) - } - IbcMessage::UpdateClient(message) => { - info!( - %chain_id, - %message.client_id, - ) - } - } -} diff --git a/lib/voyager-message/src/lib.rs b/lib/voyager-message/src/lib.rs index e104ee5520..5716e84589 100644 --- a/lib/voyager-message/src/lib.rs +++ b/lib/voyager-message/src/lib.rs @@ -2,9 +2,11 @@ use std::{env::VarError, fmt::Debug, future::Future, time::Duration}; -use chain_utils::BoxDynError; use jsonrpsee::{ - core::{client::BatchResponse, params::BatchRequestBuilder, traits::ToRpcParams, RpcResult}, + core::{ + async_trait, client::BatchResponse, params::BatchRequestBuilder, traits::ToRpcParams, + RpcResult, + }, server::middleware::rpc::RpcServiceT, types::{ error::{INVALID_PARAMS_CODE, METHOD_NOT_FOUND_CODE}, @@ -12,14 +14,12 @@ use jsonrpsee::{ }, Extensions, RpcModule, }; -use macros::model; use reth_ipc::{client::IpcClientBuilder, server::RpcServiceBuilder}; use serde::{de::DeserializeOwned, Serialize}; use serde_json::Value; -use tonic::async_trait; use tracing::{debug, debug_span, error, info, trace, Instrument}; -use unionlabs::{traits::Member, ErrorReporter}; -use voyager_vm::{QueueError, QueueMessage}; +use unionlabs::ErrorReporter; +use voyager_vm::{BoxDynError, QueueError, QueueMessage}; use crate::{ call::Call, @@ -27,6 +27,7 @@ use crate::{ context::{Context, INVALID_CONFIG_EXIT_CODE, STARTUP_ERROR_EXIT_CODE}, data::Data, filter::JaqInterestFilter, + macros::model, module::{ ChainModuleInfo, ChainModuleServer, ClientModuleInfo, ClientModuleServer, ConsensusModuleInfo, ConsensusModuleServer, PluginInfo, PluginServer, @@ -48,7 +49,9 @@ pub mod rpc; pub use reconnecting_jsonrpc_ws_client; pub use reth_ipc; +pub use valuable; pub use voyager_core as core; +pub use voyager_macros as macros; pub enum VoyagerMessage {} @@ -548,3 +551,7 @@ pub fn into_value(t: T) -> Value { } } } + +/// Trait alias for traits commonly used together throughout this crate. +pub trait Member = + Debug + Clone + PartialEq + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static; diff --git a/lib/voyager-message/src/module.rs b/lib/voyager-message/src/module.rs index 7a57d14253..0e60e22f36 100644 --- a/lib/voyager-message/src/module.rs +++ b/lib/voyager-message/src/module.rs @@ -1,19 +1,17 @@ -use std::{borrow::Cow, collections::VecDeque}; +use std::{borrow::Cow, collections::VecDeque, num::NonZeroU64}; -use jsonrpsee::{core::RpcResult, proc_macros::rpc, types::ErrorObject}; -use macros::model; +use ::serde::{Deserialize, Serialize}; +use jsonrpsee::{core::RpcResult, proc_macros::rpc}; use schemars::JsonSchema; -use serde_json::{json, Value}; +use serde_json::Value; use serde_utils::Hex; -use tracing::debug; use unionlabs::{ + hash::H256, ibc::core::client::height::Height, - ics24::{IbcPath, Path}, - id::ClientId, - traits::Member, - ErrorReporter, + ics24::Path, + id::{ChannelId, ClientId, ConnectionId}, }; -use voyager_core::ConsensusType; +use voyager_core::IbcStoreFormat; use voyager_vm::{pass::PassResult, BoxDynError, Op}; #[cfg(doc)] use { @@ -22,13 +20,17 @@ use { }; use crate::{ - core::{ChainId, ClientInfo, ClientStateMeta, ClientType, ConsensusStateMeta, IbcInterface}, + core::{ + ChainId, ClientInfo, ClientStateMeta, ClientType, ConsensusStateMeta, ConsensusType, + IbcInterface, + }, data::Data, - VoyagerMessage, FATAL_JSONRPC_ERROR_CODE, + macros::model, + rpc::{ChannelInfo, ConnectionInfo}, + Member, VoyagerMessage, }; -#[model] -#[derive(clap::Args, JsonSchema)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, clap::Args, JsonSchema)] pub struct ChainModuleInfo { #[arg(value_parser(|s: &str| ok(ChainId::new(s.to_owned()))))] pub chain_id: ChainId<'static>, @@ -55,8 +57,7 @@ fn ok(t: T) -> Result { Ok(t) } -#[model] -#[derive(clap::Args, JsonSchema)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, clap::Args, JsonSchema)] pub struct ConsensusModuleInfo { #[arg(value_parser(|s: &str| ok(ChainId::new(s.to_owned()))))] pub chain_id: ChainId<'static>, @@ -127,8 +128,7 @@ pub struct UnexpectedIbcInterfaceError { pub found: String, } -#[model] -#[derive(clap::Args, JsonSchema)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, clap::Args, JsonSchema)] pub struct ClientModuleInfo { /// The client type that this client module provides functionality for. #[arg(value_parser(|s: &str| ok(ClientType::new(s.to_owned()))))] @@ -141,6 +141,10 @@ pub struct ClientModuleInfo { /// The IBC interface that this client module provides functionality for. #[arg(value_parser(|s: &str| ok(IbcInterface::new(s.to_owned()))))] pub ibc_interface: IbcInterface<'static>, + + #[arg(value_parser(|s: &str| ok(IbcStoreFormat::new(s.to_owned()))))] + /// The IBC store format that this client type verifies against. + pub ibc_store_format: IbcStoreFormat<'static>, } impl ClientModuleInfo { @@ -194,8 +198,7 @@ impl ClientModuleInfo { } } -#[model] -#[derive(clap::Args, JsonSchema)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, clap::Args, JsonSchema)] pub struct PluginInfo { /// The name of this plugin. Any plugin messages with this name will be /// routed to this plugin. @@ -254,15 +257,95 @@ pub trait ChainModule { #[method(name = "clientInfo", with_extensions)] async fn client_info(&self, client_id: ClientId) -> RpcResult; - /// Query IBC state on this chain, at the specified [`Height`], returning - /// the value as a JSON [`Value`]. - #[method(name = "queryIbcState", with_extensions)] - async fn query_ibc_state(&self, at: Height, path: Path) -> RpcResult; + #[method(name = "queryClientState", with_extensions)] + async fn query_client_state( + &self, + height: Height, + client_id: ClientId, + ) -> RpcResult>>; + + #[method(name = "queryClientConsensusState", with_extensions)] + async fn query_client_consensus_state( + &self, + height: Height, + client_id: ClientId, + trusted_height: Height, + ) -> RpcResult>>; + + #[method(name = "queryConnection", with_extensions)] + async fn query_connection( + &self, + height: Height, + connection_id: ConnectionId, + ) -> RpcResult>; + + #[method(name = "queryChannelEnd", with_extensions)] + async fn query_channel( + &self, + height: Height, + channel_id: ChannelId, + ) -> RpcResult>; + + #[method(name = "queryCommitment", with_extensions)] + async fn query_commitment( + &self, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult>; + + #[method(name = "queryAcknowledgement", with_extensions)] + async fn query_acknowledgement( + &self, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult>; + + #[method(name = "queryReceipt", with_extensions)] + async fn query_receipt( + &self, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult; + + #[method(name = "queryNextSequenceSend", with_extensions)] + async fn query_next_sequence_send( + &self, + height: Height, + channel_id: ChannelId, + ) -> RpcResult; + + #[method(name = "queryNextSequenceRecv", with_extensions)] + async fn query_next_sequence_recv( + &self, + height: Height, + channel_id: ChannelId, + ) -> RpcResult; + + #[method(name = "queryNextSequenceAck", with_extensions)] + async fn query_next_sequence_ack( + &self, + height: Height, + channel_id: ChannelId, + ) -> RpcResult; + + #[method(name = "queryNextConnectionSequence", with_extensions)] + async fn query_next_connection_sequence(&self, height: Height) -> RpcResult; + + #[method(name = "queryNextClientSequence", with_extensions)] + async fn query_next_client_sequence(&self, height: Height) -> RpcResult; /// Query a proof of IBC state on this chain, at the specified [`Height`], /// returning the proof as a JSON [`Value`]. #[method(name = "queryIbcProof", with_extensions)] - async fn query_ibc_proof(&self, at: Height, path: Path) -> RpcResult; + async fn query_ibc_proof( + &self, + at: Height, + path: Path, + ibc_store_format: IbcStoreFormat<'static>, + ) -> RpcResult; } /// Raw, un-decoded client state, as queried directly from the client store. @@ -273,36 +356,6 @@ pub struct RawClientState<'a> { pub bytes: Cow<'a, [u8]>, } -pub trait ChainModuleClientExt: ChainModuleClient + Send + Sync { - // TODO: Maybe rename? Cor likes "_checked" - // TODO: Maybe take by ref here? - #[allow(async_fn_in_trait)] - async fn query_ibc_state_typed( - &self, - at: Height, - path: P, - ) -> Result { - debug!(%path, %at, "querying ibc state"); - - let state = self.query_ibc_state(at, path.clone().into()).await?; - - Ok( - serde_json::from_value::(state.clone()).map_err(|e| { - ErrorObject::owned( - FATAL_JSONRPC_ERROR_CODE, - format!("unable to deserialize state: {}", ErrorReporter(e)), - Some(json!({ - "path": path, - "state": state - })), - ) - })?, - ) - } -} - -impl ChainModuleClientExt for T where T: ChainModuleClient + Send + Sync {} - /// Client modules provide functionality to interact with a single light client /// type, on a single IBC interface. This can also be thought of as a "client /// codec", as all of the endpoints it exposes are related to encoding and diff --git a/lib/voyager-message/src/rpc.rs b/lib/voyager-message/src/rpc.rs index e11cd2cb15..9d89f74d7e 100644 --- a/lib/voyager-message/src/rpc.rs +++ b/lib/voyager-message/src/rpc.rs @@ -1,23 +1,31 @@ +use std::num::NonZeroU64; + use jsonrpsee::{ self, core::RpcResult, proc_macros::rpc, types::{ErrorObject, ErrorObjectOwned}, }; -use macros::model; -use serde_json::{json, Value}; +use serde_json::Value; use serde_utils::Hex; -use tracing::debug; use unionlabs::{ - ibc::core::client::height::Height, - ics24::{IbcPath, Path}, - id::ClientId, + hash::H256, + ibc::core::{ + channel::{order::Order, state::State}, + client::height::Height, + connection::connection_end::ConnectionEnd, + }, + ics24::Path, + id::{ChannelId, ClientId, ConnectionId, PortId}, ErrorReporter, QueryHeight, }; +use valuable::Valuable; +use voyager_core::IbcStoreFormat; use crate::{ context::LoadedModulesInfo, core::{ChainId, ClientInfo, ClientStateMeta, ClientType, IbcInterface}, + macros::model, FATAL_JSONRPC_ERROR_CODE, }; @@ -48,6 +56,12 @@ pub trait VoyagerRpc { client_id: ClientId, ) -> RpcResult; + #[method(name = "clientTypeIbcStoreFormat")] + async fn client_type_ibc_store_format( + &self, + client_id: ClientType<'static>, + ) -> RpcResult>; + #[method(name = "clientMeta")] async fn client_meta( &self, @@ -56,13 +70,103 @@ pub trait VoyagerRpc { client_id: ClientId, ) -> RpcResult; - #[method(name = "queryIbcState")] - async fn query_ibc_state( + #[method(name = "queryClientState")] + async fn query_client_state( &self, chain_id: ChainId<'static>, height: QueryHeight, - path: Path, - ) -> RpcResult; + client_id: ClientId, + ) -> RpcResult>>>; + + #[method(name = "queryClientConsensusState")] + async fn query_client_consensus_state( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + client_id: ClientId, + trusted_height: Height, + ) -> RpcResult>>>; + + #[method(name = "queryConnection")] + async fn query_connection( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + connection_id: ConnectionId, + ) -> RpcResult>>; + + #[method(name = "queryChannelEnd")] + async fn query_channel( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + ) -> RpcResult>>; + + #[method(name = "queryCommitment")] + async fn query_commitment( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult>>; + + #[method(name = "queryAcknowledgement")] + async fn query_acknowledgement( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult>>; + + #[method(name = "queryReceipt")] + async fn query_receipt( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult>; + + #[method(name = "queryNextSequenceSend")] + async fn query_next_sequence_send( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + ) -> RpcResult>; + + #[method(name = "queryNextSequenceRecv")] + async fn query_next_sequence_recv( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + ) -> RpcResult>; + + #[method(name = "queryNextSequenceAck")] + async fn query_next_sequence_ack( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + ) -> RpcResult>; + + #[method(name = "queryNextConnectionSequence")] + async fn query_next_connection_sequence( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + ) -> RpcResult>; + + #[method(name = "queryNextClientSequence")] + async fn query_next_client_sequence( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + ) -> RpcResult>; #[method(name = "queryIbcProof")] async fn query_ibc_proof( @@ -70,6 +174,7 @@ pub trait VoyagerRpc { chain_id: ChainId<'static>, height: QueryHeight, path: Path, + ibc_store_format: IbcStoreFormat<'static>, ) -> RpcResult; #[method(name = "selfClientState")] @@ -121,9 +226,8 @@ pub trait VoyagerRpc { #[model] // TODO: Flip these parameters -pub struct IbcState { +pub struct IbcState { pub chain_id: ChainId<'static>, - pub path: P, /// The height that the state was read at. pub height: Height, pub state: State, @@ -149,45 +253,45 @@ pub struct SelfConsensusState { pub state: Value, } -/// Serves the same purpose as `ChainModuleClientExt`. -pub trait VoyagerRpcClientExt: VoyagerRpcClient { - // TODO: Maybe rename? Cor likes "_checked" - // TODO: Maybe take by ref here? - #[allow(async_fn_in_trait)] - async fn query_ibc_state_typed( - &self, - chain_id: ChainId<'static>, - at: QueryHeight, - path: P, - ) -> Result, jsonrpsee::core::client::Error> { - debug!(%path, %at, "querying ibc state"); - - let ibc_state = self - .query_ibc_state(chain_id.clone(), at, path.clone().into()) - .await?; - - Ok(serde_json::from_value::(ibc_state.state.clone()) - .map(|value| IbcState { - chain_id: ibc_state.chain_id, - path: path.clone(), - height: ibc_state.height, - state: value, - }) - .map_err(|e| { - ErrorObject::owned( - FATAL_JSONRPC_ERROR_CODE, - format!("unable to deserialize state: {}", ErrorReporter(e)), - Some(json!({ - "chain_id": chain_id, - "path": path, - "state": ibc_state.state - })), - ) - })?) - } -} +// /// Serves the same purpose as `ChainModuleClientExt`. +// pub trait VoyagerRpcClientExt: VoyagerRpcClient { +// // TODO: Maybe rename? Cor likes "_checked" +// // TODO: Maybe take by ref here? +// #[allow(async_fn_in_trait)] +// async fn query_ibc_state_typed + Serialize + Valuable>( +// &self, +// chain_id: ChainId<'static>, +// at: QueryHeight, +// path: P, +// ) -> Result, jsonrpsee::core::client::Error> { +// debug!(path = path.as_value(), %at, "querying ibc state"); -impl VoyagerRpcClientExt for T where T: VoyagerRpcClient {} +// let ibc_state = self +// .query_ibc_state(chain_id.clone(), at, path.clone().into()) +// .await?; + +// Ok(serde_json::from_value::(ibc_state.state.clone()) +// .map(|value| IbcState { +// chain_id: ibc_state.chain_id, +// path: path.clone(), +// height: ibc_state.height, +// state: value, +// }) +// .map_err(|e| { +// ErrorObject::owned( +// FATAL_JSONRPC_ERROR_CODE, +// format!("unable to deserialize state: {}", ErrorReporter(e)), +// Some(json!({ +// "chain_id": chain_id, +// "path": path, +// "state": ibc_state.state +// })), +// ) +// })?) +// } +// } + +// impl VoyagerRpcClientExt for T where T: VoyagerRpcClient {} pub fn json_rpc_error_to_error_object(value: jsonrpsee::core::client::Error) -> ErrorObjectOwned { match value { @@ -204,3 +308,16 @@ pub fn missing_state( ) -> impl FnOnce() -> ErrorObjectOwned { move || ErrorObject::owned(FATAL_JSONRPC_ERROR_CODE, message, data) } + +pub type ConnectionInfo = ConnectionEnd; + +#[model] +#[derive(Valuable)] +pub struct ChannelInfo { + pub port_id: PortId, + pub state: State, + pub ordering: Order, + pub counterparty_channel_id: Option, + pub connection_hops: Vec, + pub version: String, +} diff --git a/lib/voyager-message/src/rpc/server.rs b/lib/voyager-message/src/rpc/server.rs index 5220de9972..fe51efa544 100644 --- a/lib/voyager-message/src/rpc/server.rs +++ b/lib/voyager-message/src/rpc/server.rs @@ -1,27 +1,33 @@ -use std::sync::{Arc, OnceLock}; +use std::{ + fmt::Debug, + num::NonZeroU64, + sync::{Arc, OnceLock}, +}; use jsonrpsee::{ - core::RpcResult, + core::{async_trait, RpcResult}, types::{ErrorObject, ErrorObjectOwned}, }; -use serde_json::{json, Value}; +use serde_json::Value; use serde_utils::Hex; -use tonic::async_trait; -use tracing::{debug, error, info_span, instrument, Instrument}; +use tracing::{debug, instrument}; use unionlabs::{ + hash::H256, ibc::core::client::height::Height, - ics24::{ClientStatePath, IbcPath, Path}, - id::ClientId, + ics24::Path, + id::{ChannelId, ClientId, ConnectionId}, ErrorReporter, QueryHeight, }; +use valuable::Valuable; +use voyager_core::IbcStoreFormat; use crate::{ context::{LoadedModulesInfo, Modules}, core::{ChainId, ClientInfo, ClientStateMeta, ClientType, IbcInterface}, - module::{ChainModuleClient, ChainModuleClientExt, ClientModuleClient, ConsensusModuleClient}, + module::{ChainModuleClient, ClientModuleClient, ConsensusModuleClient}, rpc::{ - json_rpc_error_to_error_object, IbcProof, IbcState, SelfClientState, SelfConsensusState, - VoyagerRpcServer, + json_rpc_error_to_error_object, ChannelInfo, ConnectionInfo, IbcProof, IbcState, + SelfClientState, SelfConsensusState, VoyagerRpcServer, }, FATAL_JSONRPC_ERROR_CODE, }; @@ -31,69 +37,36 @@ pub struct Server { inner: Arc, } -#[derive(macros::Debug, Clone)] +#[derive(Debug, Clone)] pub struct ServerInner { modules: OnceLock>, - #[debug("Cache({:?}, {})", self.ibc_state_cache.name(), self.ibc_state_cache.entry_count())] - ibc_state_cache: moka::future::Cache<(ChainId<'static>, Path, Height), Value>, + // ibc_state_cache: Cache, } -// #[derive(Debug, Clone, Hash, PartialEq, Eq)] -// pub struct IbcStateCacheKey<'a> { -// chain_id: ChainId<'a>, -// path: Cow<'a, Path>, -// // height is copy so don't bother wrapping it -// height: Height, -// } - -// impl<'a> IbcStateCacheKey<'a> { -// pub fn new(chain_id: ChainId<'a>, path: &'a Path, height: Height) -> Self -// { Self { -// chain_id, -// path: Cow::Borrowed(path), -// height, -// } -// } -// } +// #[derive(Clone)] +// struct Cache(moka::future::Cache); -// impl IbcStateCacheKey<'static> { -// pub fn new_owned(chain_id: ChainId<'static>, path: Path, height: Height) -// -> Self { Self { -// chain_id, -// path: Cow::Owned(path), -// height, -// } +// impl Debug for Cache { +// fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +// write!(f, "Cache({:?}, {})", self.0.name(), self.0.entry_count()) // } // } -// enum CacheKey { -// IbcState { -// chain_id: ChainId<'static>, -// path: Path, -// height: Height, -// }, -// ClientMeta { -// chain_id: ChainId<'static>, -// height: Height, -// }, -// ClientInfo { -// chain_id: ChainId<'static>, -// }, -// } - impl Server { #[allow(clippy::new_without_default)] pub fn new() -> Self { Server { inner: Arc::new(ServerInner { modules: OnceLock::new(), - ibc_state_cache: moka::future::Cache::builder() - .eviction_listener(|k, v, why| { - error!(?k, ?v, ?why, "value evicted from the cache") - }) - .max_capacity(10_000) - .name("ibc_state_cache") - .build(), + // ibc_state_cache: Cache( + // moka::future::Cache::builder() + // .eviction_listener(|k, v, why| { + // error!(?k, ?v, ?why, "value evicted from the cache") + // }) + // .max_capacity(10_000) + // .name("ibc_state_cache") + // .build(), + // ), }), } } @@ -143,69 +116,107 @@ impl ServerInner { .ok_or_else(|| ErrorObject::owned(-2, "server has not started", None::<()>)) } - async fn query_ibc_state_cached<'a>( - &self, - chain_id: &ChainId<'a>, - at: Height, - path: Path, - ) -> Result { - let key = (chain_id.clone().into_owned(), path.clone(), at); - - let state = self - .ibc_state_cache - .entry_by_ref(&key) - .or_try_insert_with( - async { - debug!(%chain_id, %path, %at, "querying ibc state (not yet cached)"); - - let state = self - .modules()? - .chain_module(chain_id) - .map_err(fatal_error)? - .query_ibc_state(at, path) - .await - .map_err(json_rpc_error_to_error_object)?; - - RpcResult::Ok(state) - } - .instrument(info_span!("ibc state cache fetcher")), - ) - .await - .map_err(Arc::unwrap_or_clone)?; - - let (chain_id, path, height) = key; - - if !state.is_fresh() { - debug!( - cache = %self.ibc_state_cache.name().unwrap_or_default(), - key.chain_id = %chain_id, - key.path = %path, - key.height = %height, - raw_key = %format_args!("chain_id:{chain_id};path:{path};height:{height}"), - "cache hit" - ); - } - - Ok(IbcState { - chain_id, - path, - height, - state: state.into_value(), - }) - - // Ok( - // serde_json::from_value::(state.clone()).map_err(|e| { - // ErrorObject::owned( - // FATAL_JSONRPC_ERROR_CODE, - // format!("unable to deserialize state: {}", - // ErrorReporter(e)), Some(json!({ - // "path": path, - // "state": state - // })), - // ) - // })?, - // ) - } + // async fn query_state_cached<'a, T: DeserializeOwned>( + // &self, + // chain_id: &ChainId<'a>, + // at: Height, + // query: StateQuery, + // ) -> Result, jsonrpsee::core::client::Error> { + // let fut = async { + // debug!(%chain_id, path = query.as_value(), %at, "querying ibc state (not yet cached)"); + + // let chain_module = self + // .modules()? + // .chain_module(chain_id) + // .map_err(fatal_error)?; + + // match query.kind { + // StateQueryKind::ClientState { client_id } => todo!(), + // StateQueryKind::ClientConsensusState { + // client_id, + // trusted_height, + // } => todo!(), + // StateQueryKind::Connection { connection_id } => todo!(), + // StateQueryKind::ChannelEnd { channel_id } => todo!(), + // StateQueryKind::Commitment { + // channel_id, + // sequence, + // } => todo!(), + // StateQueryKind::Acknowledgement { + // channel_id, + // sequence, + // } => todo!(), + // StateQueryKind::Receipt { + // channel_id, + // sequence, + // } => todo!(), + // StateQueryKind::NextSequenceSend { + // channel_id, + // sequence, + // } => todo!(), + // StateQueryKind::NextSequenceRecv { + // channel_id, + // sequence, + // } => todo!(), + // StateQueryKind::NextSequenceAck { + // channel_id, + // sequence, + // } => todo!(), + // StateQueryKind::NextConnectionSequence { + // channel_id, + // sequence, + // } => todo!(), + // StateQueryKind::NextClientSequence { + // channel_id, + // sequence, + // } => todo!(), + // } + + // RpcResult::Ok(state) + // } + // .instrument(info_span!("ibc state cache fetcher")); + + // let state = self + // .ibc_state_cache + // .0 + // .entry_by_ref(&query) + // .or_try_insert_with(fut) + // .await + // .map_err(Arc::unwrap_or_clone)?; + + // let (chain_id, path, height) = key; + + // if !state.is_fresh() { + // debug!( + // cache = %self.ibc_state_cache.0.name().unwrap_or_default(), + // key.chain_id = %chain_id, + // key.path = path.as_value(), + // key.height = %height, + // // raw_key = %format_args!("chain_id:{chain_id};path:{path};height:{height}"), + // "cache hit" + // ); + // } + + // Ok(IbcState { + // chain_id, + // path, + // height, + // state: state.into_value(), + // }) + + // // Ok( + // // serde_json::from_value::(state.clone()).map_err(|e| { + // // ErrorObject::owned( + // // FATAL_JSONRPC_ERROR_CODE, + // // format!("unable to deserialize state: {}", + // // ErrorReporter(e)), Some(json!({ + // // "path": path, + // // "state": state + // // })), + // // ) + // // })?, + // // ) + // } } impl Server { @@ -222,7 +233,10 @@ impl Server { .await .map_err(json_rpc_error_to_error_object)?; - debug!(%latest_height, "queried latest height"); + debug!( + latest_height = latest_height.as_value(), + "queried latest height" + ); Ok(latest_height) } @@ -240,12 +254,12 @@ impl Server { .await .map_err(json_rpc_error_to_error_object)?; - debug!(%latest_timestamp, "queried latest timestamp"); + debug!(latest_timestamp, "queried latest timestamp"); Ok(latest_timestamp) } - #[instrument(skip_all, fields(%chain_id, %client_id))] + #[instrument(skip_all, fields(chain_id, client_id))] pub async fn client_info( &self, chain_id: &ChainId<'static>, @@ -262,16 +276,12 @@ impl Server { .await .map_err(json_rpc_error_to_error_object)?; - debug!( - %client_info.ibc_interface, - %client_info.client_type, - "fetched client info" - ); + debug!(client_info = client_info.as_value(), "fetched client info"); Ok(client_info) } - #[instrument(skip_all, fields(%chain_id, height = %at, %client_id))] + #[instrument(skip_all, fields(%chain_id, height = %at, client_id = client_id.as_value()))] pub async fn client_meta( &self, chain_id: ChainId<'static>, @@ -296,7 +306,7 @@ impl Server { .modules()? .chain_module(&chain_id) .map_err(fatal_error)? - .query_ibc_state_typed(height, ClientStatePath { client_id }) + .query_client_state(height, client_id) .await .map_err(json_rpc_error_to_error_object)?; @@ -310,45 +320,21 @@ impl Server { .map_err(json_rpc_error_to_error_object)?; debug!( - client_state_meta.height = %meta.height, - client_state_meta.chain_id = %meta.chain_id, - %client_info.ibc_interface, - %client_info.client_type, + client_state_meta = meta.as_value(), + client_info = client_info.as_value(), "fetched client meta" ); Ok(meta) } - #[instrument(skip_all, fields(%chain_id, %path, %height))] - pub async fn query_ibc_state( - &self, - chain_id: &ChainId<'_>, - height: Height, - path: Path, - ) -> RpcResult { - debug!("fetching ibc state"); - - // let height = self.inner.query_height(&chain_id, height).await?; - - let state = self - .inner - .query_ibc_state_cached(chain_id, height, path.clone()) - .await - .map_err(json_rpc_error_to_error_object)?; - - // TODO: Use valuable here - debug!(state = %state.state, "fetched ibc state"); - - Ok(state) - } - - #[instrument(skip_all, fields(%chain_id, %path, %height))] - pub async fn query_ibc_proof( + #[instrument(skip_all, fields(%chain_id, path = path.as_value(), %height))] + async fn query_ibc_proof( &self, chain_id: &ChainId<'_>, height: Height, path: Path, + ibc_store_format: IbcStoreFormat<'static>, ) -> RpcResult { debug!("fetching ibc state"); @@ -361,7 +347,7 @@ impl Server { // let height = self.inner.query_height(&chain_id, height).await?; let proof = chain_module - .query_ibc_proof(height, path.clone()) + .query_ibc_proof(height, path.clone(), ibc_store_format) .await .map_err(json_rpc_error_to_error_object)?; @@ -515,37 +501,37 @@ impl Server { .map_err(json_rpc_error_to_error_object) } - pub async fn query_ibc_state_typed( - &self, - chain_id: &ChainId<'_>, - at: Height, - path: P, - ) -> Result, jsonrpsee::core::client::Error> { - debug!(%chain_id, %path, %at, "querying ibc state"); - - let ibc_state = self - .query_ibc_state(chain_id, at, path.clone().into()) - .await?; - - Ok(serde_json::from_value::(ibc_state.state.clone()) - .map(|value| IbcState { - chain_id: ibc_state.chain_id, - path: path.clone(), - height: ibc_state.height, - state: value, - }) - .map_err(|e| { - ErrorObject::owned( - FATAL_JSONRPC_ERROR_CODE, - format!("unable to deserialize state: {}", ErrorReporter(e)), - Some(json!({ - "chain_id": chain_id, - "path": path, - "state": ibc_state.state - })), - ) - })?) - } + // pub async fn query_ibc_state_typed< + // P: IbcPath + Serialize + Valuable, + // >( + // &self, + // chain_id: &ChainId<'_>, + // at: Height, + // path: P, + // ) -> Result, jsonrpsee::core::client::Error> { + // debug!(%chain_id, path = path.as_value(), %at, "querying ibc state"); + + // let ibc_state = self.query_state(chain_id, at, path.clone().into()).await?; + + // Ok(serde_json::from_value::(ibc_state.state.clone()) + // .map(|value| IbcState { + // chain_id: ibc_state.chain_id, + // path: path.clone(), + // height: ibc_state.height, + // state: value, + // }) + // .map_err(|e| { + // ErrorObject::owned( + // FATAL_JSONRPC_ERROR_CODE, + // format!("unable to deserialize state: {}", ErrorReporter(e)), + // Some(json!({ + // "chain_id": chain_id, + // "path": path, + // "state": ibc_state.state + // })), + // ) + // })?) + // } } /// rpc impl @@ -571,6 +557,17 @@ impl VoyagerRpcServer for Server { self.client_info(&chain_id, client_id).await } + #[instrument(skip_all, fields(client_id))] + async fn client_type_ibc_store_format( + &self, + client_type: ClientType<'static>, + ) -> RpcResult> { + Ok(self + .modules()? + .client_ibc_store_format(&client_type)? + .clone()) + } + async fn client_meta( &self, chain_id: ChainId<'static>, @@ -580,15 +577,246 @@ impl VoyagerRpcServer for Server { self.client_meta(chain_id, at, client_id).await } - async fn query_ibc_state( + async fn query_client_state( &self, chain_id: ChainId<'static>, height: QueryHeight, - path: Path, - ) -> RpcResult { + client_id: ClientId, + ) -> RpcResult>>> { let height = self.query_height(&chain_id, height).await?; - self.query_ibc_state(&chain_id, height, path).await + self.modules()? + .chain_module(&chain_id)? + .query_client_state(height, client_id) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_client_consensus_state( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + client_id: ClientId, + trusted_height: Height, + ) -> RpcResult>>> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_client_consensus_state(height, client_id, trusted_height) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_connection( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + connection_id: ConnectionId, + ) -> RpcResult>> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_connection(height, connection_id) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_channel( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + ) -> RpcResult>> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_channel(height, channel_id) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_commitment( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult>> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_commitment(height, channel_id, sequence) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_acknowledgement( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult>> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_acknowledgement(height, channel_id, sequence) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_receipt( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_receipt(height, channel_id, sequence) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_next_sequence_send( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + ) -> RpcResult> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_next_sequence_send(height, channel_id) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_next_sequence_recv( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + ) -> RpcResult> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_next_sequence_recv(height, channel_id) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_next_sequence_ack( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + channel_id: ChannelId, + ) -> RpcResult> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_next_sequence_ack(height, channel_id) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_next_connection_sequence( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + ) -> RpcResult> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_next_connection_sequence(height) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) + } + + async fn query_next_client_sequence( + &self, + chain_id: ChainId<'static>, + height: QueryHeight, + ) -> RpcResult> { + let height = self.query_height(&chain_id, height).await?; + + self.modules()? + .chain_module(&chain_id)? + .query_next_client_sequence(height) + .await + .map(|state| IbcState { + chain_id, + height, + state, + }) + .map_err(json_rpc_error_to_error_object) } async fn query_ibc_proof( @@ -596,10 +824,12 @@ impl VoyagerRpcServer for Server { chain_id: ChainId<'static>, height: QueryHeight, path: Path, + ibc_store_format: IbcStoreFormat<'static>, ) -> RpcResult { let height = self.query_height(&chain_id, height).await?; - self.query_ibc_proof(&chain_id, height, path).await + self.query_ibc_proof(&chain_id, height, path, ibc_store_format) + .await } async fn self_client_state( @@ -671,3 +901,70 @@ pub(crate) fn fatal_error(t: impl core::error::Error) -> ErrorObjectOwned { None::<()>, ) } + +// #[derive(Debug, Clone, PartialEq, Eq, Hash)] +// struct StateQuery { +// chain_id: ChainId<'static>, +// height: Height, +// kind: StateQueryKind, +// } + +// #[derive(Debug, Clone, PartialEq, Eq, Hash)] +// enum StateQueryKind { +// ClientState { +// client_id: ClientId, +// }, + +// ClientConsensusState { +// client_id: ClientId, +// trusted_height: Height, +// }, + +// Connection { +// connection_id: ConnectionId, +// }, + +// ChannelEnd { +// channel_id: ChannelId, +// }, + +// Commitment { +// channel_id: ChannelId, +// sequence: NonZeroU64, +// }, + +// Acknowledgement { +// channel_id: ChannelId, +// sequence: NonZeroU64, +// }, + +// Receipt { +// channel_id: ChannelId, +// sequence: NonZeroU64, +// }, + +// NextSequenceSend { +// channel_id: ChannelId, +// sequence: NonZeroU64, +// }, + +// NextSequenceRecv { +// channel_id: ChannelId, +// sequence: NonZeroU64, +// }, + +// NextSequenceAck { +// channel_id: ChannelId, +// sequence: NonZeroU64, +// }, + +// NextConnectionSequence { +// channel_id: ChannelId, +// sequence: NonZeroU64, +// }, + +// NextClientSequence { +// channel_id: ChannelId, +// sequence: NonZeroU64, +// }, +// } diff --git a/lib/voyager-vm/Cargo.toml b/lib/voyager-vm/Cargo.toml index a2b6d7f98a..24b18953d0 100644 --- a/lib/voyager-vm/Cargo.toml +++ b/lib/voyager-vm/Cargo.toml @@ -8,11 +8,10 @@ edition = { workspace = true } workspace = true [dependencies] +derive-where = "1.2.7" either = { workspace = true } -frame-support-procedural = { workspace = true } futures = { workspace = true, features = ["alloc", "std"] } itertools = { version = "0.12.1", default-features = false } -macros = { workspace = true } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } static_assertions = { workspace = true } @@ -22,6 +21,7 @@ thiserror.workspace = true tokio = { workspace = true, features = ["time", "rt"] } tracing = { workspace = true } unionlabs = { workspace = true } +voyager-macros = { workspace = true } [dev-dependencies] criterion = { version = "0.5.1", features = ["html_reports"] } diff --git a/lib/voyager-vm/benches/normalize.rs b/lib/voyager-vm/benches/normalize.rs index 5ff49578c9..f95363d47c 100644 --- a/lib/voyager-vm/benches/normalize.rs +++ b/lib/voyager-vm/benches/normalize.rs @@ -1,5 +1,5 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use unionlabs::ibc::core::client::height::Height; +use unionlabs::{ibc::core::client::height::Height, id::ClientId}; use voyager_message::{ call::FetchBlocks, callback::AggregateMsgUpdateClientsFromOrderedHeaders, core::ChainId, PluginMessage, VoyagerMessage, @@ -22,47 +22,35 @@ fn mk_msg() -> Op { data(PluginMessage::new("", "")), call(FetchBlocks { chain_id: ChainId::new("chain"), - start_height: Height { - revision_number: 1, - revision_height: 1, - }, + start_height: Height::new(1), }), conc([ noop(), data(PluginMessage::new("", "")), call(FetchBlocks { chain_id: ChainId::new("chain"), - start_height: Height { - revision_number: 1, - revision_height: 1, - }, + start_height: Height::new(1), }), ]), ], [], AggregateMsgUpdateClientsFromOrderedHeaders { chain_id: ChainId::new("chain"), - counterparty_client_id: "counterparty_chain".parse().unwrap(), + counterparty_client_id: ClientId::new(0), }, ), seq([ data(PluginMessage::new("", "")), call(FetchBlocks { chain_id: ChainId::new("chain"), - start_height: Height { - revision_number: 1, - revision_height: 1, - }, + start_height: Height::new(1), }), conc([ noop(), data(PluginMessage::new("", "")), call(FetchBlocks { chain_id: ChainId::new("chain"), - start_height: Height { - revision_number: 1, - revision_height: 1, - }, + start_height: Height::new(1), }), ]), ]), diff --git a/lib/voyager-vm/src/in_memory.rs b/lib/voyager-vm/src/in_memory.rs index 12e7752f72..979af23820 100644 --- a/lib/voyager-vm/src/in_memory.rs +++ b/lib/voyager-vm/src/in_memory.rs @@ -7,8 +7,8 @@ use std::{ }, }; +use derive_where::derive_where; use either::Either; -use frame_support_procedural::{CloneNoBound, DebugNoBound}; use tracing::{debug, info_span, warn, Instrument}; use crate::{ @@ -17,7 +17,7 @@ use crate::{ Captures, Op, Queue, QueueMessage, }; -#[derive(DebugNoBound, CloneNoBound)] +#[derive_where(Debug, Clone)] pub struct InMemoryQueue { idx: Arc, ready: Arc>>>, @@ -26,7 +26,7 @@ pub struct InMemoryQueue { optimizer_queue: Arc>>>>, } -#[derive(DebugNoBound, CloneNoBound)] +#[derive_where(Debug, PartialEq, Clone)] pub(crate) struct Item { #[allow(dead_code)] // used in debug parents: Vec, diff --git a/lib/voyager-vm/src/lib.rs b/lib/voyager-vm/src/lib.rs index 5ec9193fef..a40bd75bf0 100644 --- a/lib/voyager-vm/src/lib.rs +++ b/lib/voyager-vm/src/lib.rs @@ -13,6 +13,7 @@ use std::{ time::{Duration, SystemTime, UNIX_EPOCH}, }; +use derive_where::derive_where; use either::Either::{self, Left, Right}; use itertools::Itertools; use serde::{de::DeserializeOwned, Deserialize, Serialize}; @@ -68,13 +69,8 @@ pub trait Queue: Debug + Clone + Send + Sync + Sized + 'static ) -> impl Future>> + Send + 'a; } -#[derive( - ::macros::Debug, - ::frame_support_procedural::CloneNoBound, - ::frame_support_procedural::PartialEqNoBound, - ::serde::Serialize, - ::serde::Deserialize, -)] +#[derive_where(Debug, PartialEq, Clone)] +#[derive(Serialize, Deserialize)] #[serde( tag = "@type", content = "@value", @@ -82,7 +78,6 @@ pub trait Queue: Debug + Clone + Send + Sync + Sized + 'static bound(serialize = "", deserialize = ""), deny_unknown_fields )] -#[debug(bound())] pub enum Op { /// Inert data that will either be used in an [`Op::Promise`] or bubbled up to the top and sent as /// an output. @@ -120,15 +115,13 @@ pub enum Op { Noop, } -#[derive( - ::macros::Debug, - ::frame_support_procedural::CloneNoBound, - ::frame_support_procedural::PartialEqNoBound, - ::serde::Serialize, - ::serde::Deserialize, +#[derive_where(Debug, PartialEq, Clone)] +#[derive(Serialize, Deserialize)] +#[serde( + rename_all = "snake_case", + bound(serialize = "", deserialize = ""), + deny_unknown_fields )] -#[serde(bound(serialize = "", deserialize = ""), deny_unknown_fields)] -#[debug(bound())] pub struct Promise { /// Messages that are expected to resolve to [`Op::Data`]. pub queue: VecDeque>, diff --git a/lib/voyager-vm/src/pass.rs b/lib/voyager-vm/src/pass.rs index b53d072432..3865e0f8d2 100644 --- a/lib/voyager-vm/src/pass.rs +++ b/lib/voyager-vm/src/pass.rs @@ -1,6 +1,6 @@ use std::error::Error; -use frame_support_procedural::{CloneNoBound, DebugNoBound, DefaultNoBound}; +use derive_where::derive_where; use futures::Future; use serde::{Deserialize, Serialize}; @@ -19,8 +19,13 @@ pub trait Pass: Send + Sync + Sized { /// The result of running an optimization pass. Both `optimize_further` and `ready` are lists of /// `(parents, op)`, allowing for correlating new messages with multiple parents (i.e. combining /// messages). -#[derive(DebugNoBound, CloneNoBound, DefaultNoBound, Serialize, Deserialize)] -#[serde(bound(serialize = "", deserialize = ""))] +#[derive_where(Debug, PartialEq, Clone)] +#[derive(Serialize, Deserialize)] +#[serde( + rename_all = "snake_case", + bound(serialize = "", deserialize = ""), + deny_unknown_fields +)] pub struct PassResult { /// [`Op`]s that are considered incomplete by this optimization pass and are to be optimized /// further. diff --git a/lib/voyager-vm/src/tests.rs b/lib/voyager-vm/src/tests.rs index 90b71b2588..f1c6c8c8a1 100644 --- a/lib/voyager-vm/src/tests.rs +++ b/lib/voyager-vm/src/tests.rs @@ -1,4 +1,4 @@ -use macros::model; +use voyager_macros::model; use crate::{ call, conc, data, defer, noop, now, promise, seq, diff --git a/lib/voyager-vm/src/tests/utils.rs b/lib/voyager-vm/src/tests/utils.rs index 4c72d2f6f7..5b6bf68029 100644 --- a/lib/voyager-vm/src/tests/utils.rs +++ b/lib/voyager-vm/src/tests/utils.rs @@ -1,8 +1,8 @@ use std::collections::VecDeque; use enumorph::Enumorph; -use macros::model; use subset_of::SubsetOf; +use voyager_macros::model; use crate::{call, data, noop, CallT, CallbackT, Op, QueueError, QueueMessage}; diff --git a/light-clients/arbitrum-light-client/Cargo.toml b/light-clients/arbitrum-light-client/Cargo.toml index df36b3f00f..c42d967ede 100644 --- a/light-clients/arbitrum-light-client/Cargo.toml +++ b/light-clients/arbitrum-light-client/Cargo.toml @@ -13,11 +13,11 @@ workspace = true crate-type = ["cdylib", "rlib"] [dependencies] +alloy-core = { workspace = true } arbitrum-verifier = { workspace = true } cosmwasm-std = { workspace = true, features = ["abort"] } ethereum-light-client = { workspace = true, features = ["mainnet", "library"] } ethereum-verifier = { workspace = true } -ethers-core = { workspace = true } hex = { workspace = true } ics008-wasm-client = { workspace = true } protos = { workspace = true } diff --git a/light-clients/arbitrum-light-client/src/client.rs b/light-clients/arbitrum-light-client/src/client.rs index bbf9e489c9..71fb4e02e6 100644 --- a/light-clients/arbitrum-light-client/src/client.rs +++ b/light-clients/arbitrum-light-client/src/client.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{Deps, DepsMut, Env}; -use ethereum_light_client::client::{canonicalize_stored_value, check_commitment_key}; +use ethereum_light_client::client::check_commitment_key; use ics008_wasm_client::{ storage_utils::{ read_client_state, read_consensus_state, read_subject_client_state, @@ -133,18 +133,14 @@ impl IbcClient for ArbitrumLightClient { ) -> Result, IbcClientError> { let mut client_state: WasmClientState = read_client_state(deps.as_ref())?; - let updated_height = Height { - revision_number: client_state.latest_height.revision_number, - revision_height: header.l1_height.revision_height, - }; + let updated_height = Height::new_with_revision( + client_state.latest_height.revision(), + header.l1_height.height(), + ); if client_state.latest_height < header.l1_height { - client_state.data.l1_latest_slot = updated_height.revision_height; - update_client_state::( - deps.branch(), - client_state, - updated_height.revision_height, - ); + client_state.data.l1_latest_slot = updated_height.height(); + update_client_state::(deps.branch(), client_state, updated_height.height()); } let consensus_state = WasmConsensusState { @@ -164,10 +160,8 @@ impl IbcClient for ArbitrumLightClient { _client_message: Vec, ) -> Result<(), IbcClientError> { let mut client_state: WasmClientState = read_client_state(deps.as_ref())?; - client_state.data.frozen_height = Height { - revision_number: client_state.latest_height.revision_number, - revision_height: env.block.height, - }; + client_state.data.frozen_height = + Height::new_with_revision(client_state.latest_height.revision(), env.block.height); save_client_state::(deps, client_state); Ok(()) } @@ -282,7 +276,7 @@ fn do_verify_membership( check_commitment_key(&path, ibc_commitment_slot, storage_proof.key)?; // we store the hash of the data, not the data itself to the commitments map - let expected_value_hash = keccak256(canonicalize_stored_value(path, raw_value)?); + let expected_value_hash = keccak256(raw_value); let proof_value = H256::from(storage_proof.value.to_be_bytes()); @@ -368,15 +362,9 @@ mod test { }; use crate::errors::Error; - const INITIAL_CONSENSUS_STATE_HEIGHT: Height = Height { - revision_number: 0, - revision_height: 950, - }; + const INITIAL_CONSENSUS_STATE_HEIGHT: Height = Height::new(950); - const INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT: Height = Height { - revision_number: 0, - revision_height: 970, - }; + const INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT: Height = Height::new(970); #[allow(clippy::type_complexity)] fn mock_dependencies( @@ -461,14 +449,14 @@ mod test { let subject_client_state = create_client_state( "l1_client_1".to_string(), U256::from(1), - INITIAL_CONSENSUS_STATE_HEIGHT.revision_height, + INITIAL_CONSENSUS_STATE_HEIGHT.height(), INITIAL_CONSENSUS_STATE_HEIGHT, Height::default(), ); let substitute_client_state = create_client_state( "l1_client_1".to_string(), U256::from(1), - INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT.revision_height, + INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT.height(), INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT, Height::default(), ); @@ -505,10 +493,7 @@ mod test { substitute_consensus_state, ) = prepare_migrate_tests(); - subject_client_state.data.frozen_height = Height { - revision_number: 0, - revision_height: 1000, - }; + subject_client_state.data.frozen_height = Height::new_with_revision(0, 1000); substitute_client_state.data.frozen_height = Height::default(); @@ -525,10 +510,7 @@ mod test { assert_eq!( original_subject_client_state.data.frozen_height, - Height { - revision_number: 0, - revision_height: 1000, - } + Height::new_with_revision(0, 1000) ); // Perform migration @@ -563,10 +545,7 @@ mod test { ) = prepare_migrate_tests(); // Make the substitute client frozen - substitute_client_state.data.frozen_height = Height { - revision_number: 0, - revision_height: 100, - }; + substitute_client_state.data.frozen_height = Height::new_with_revision(0, 100); save_states_to_migrate_store( deps.as_mut(), @@ -622,10 +601,7 @@ mod test { ) = prepare_migrate_tests(); // Modify the latest height to a height where the consensus state is not found - substitute_client_state.latest_height = Height { - revision_number: 0, - revision_height: 15, - }; + substitute_client_state.latest_height = Height::new_with_revision(0, 15); save_states_to_migrate_store( deps.as_mut(), diff --git a/light-clients/arbitrum-light-client/src/contract.rs b/light-clients/arbitrum-light-client/src/contract.rs index 9b11bda85e..038166c650 100644 --- a/light-clients/arbitrum-light-client/src/contract.rs +++ b/light-clients/arbitrum-light-client/src/contract.rs @@ -29,23 +29,14 @@ pub fn instantiate( ProtoConsensusState { data: msg.consensus_state.into(), }, - &Height { - revision_number: 0, - revision_height: client_state.l1_latest_slot, - }, + &Height::new(client_state.l1_latest_slot), ); save_proto_client_state::( deps, ProtoClientState { data: msg.client_state.into(), checksum: msg.checksum.into(), - latest_height: Some( - Height { - revision_number: 0, - revision_height: client_state.l1_latest_slot, - } - .into(), - ), + latest_height: Some(Height::new(client_state.l1_latest_slot).into()), }, ); Ok(Response::default()) diff --git a/light-clients/arbitrum-light-client/src/errors.rs b/light-clients/arbitrum-light-client/src/errors.rs index 918f9ba1df..e67bc67b96 100644 --- a/light-clients/arbitrum-light-client/src/errors.rs +++ b/light-clients/arbitrum-light-client/src/errors.rs @@ -5,7 +5,6 @@ use unionlabs::{ google::protobuf::any::Any, hash::H256, ibc::{core::client::height::Height, lightclients::wasm}, - ics24::PathParseError, }; use crate::client::ArbitrumLightClient; @@ -70,9 +69,6 @@ pub enum Error { #[error("expected value ({expected}) and stored value ({stored}) don't match")] StoredValueMismatch { expected: H256, stored: H256 }, - #[error("unable to parse ics24 path")] - PathParse(#[from] PathParseError), - #[error("failed to verify arbitrum header: {0}")] HeaderVerify(#[from] arbitrum_verifier::Error), diff --git a/light-clients/berachain-light-client/src/client.rs b/light-clients/berachain-light-client/src/client.rs index 5864929761..90e3794502 100644 --- a/light-clients/berachain-light-client/src/client.rs +++ b/light-clients/berachain-light-client/src/client.rs @@ -131,10 +131,10 @@ impl IbcClient for BerachainLightClient { header.cometbft_header.signed_header.header.chain_id.clone(), )))?; - if revision_number != header.cometbft_header.trusted_height.revision_number { + if revision_number != header.cometbft_header.trusted_height.revision() { return Err(Error::from(RevisionNumberMismatch { trusted_revision_number: revision_number, - header_revision_number: header.cometbft_header.trusted_height.revision_number, + header_revision_number: header.cometbft_header.trusted_height.revision(), }) .into()); } @@ -148,10 +148,10 @@ impl IbcClient for BerachainLightClient { .try_into() .expect("value is bounded >= 0; qed;"); - if signed_height <= header.cometbft_header.trusted_height.revision_height { + if signed_height <= header.cometbft_header.trusted_height.height() { return Err(InvalidHeaderError::SignedHeaderHeightMustBeMoreRecent { signed_height, - trusted_height: header.cometbft_header.trusted_height.revision_height, + trusted_height: header.cometbft_header.trusted_height.height(), } .into()); } @@ -183,10 +183,10 @@ impl IbcClient for BerachainLightClient { tendermint_verifier::verify::verify( &construct_partial_header( client_state.data.consensus_chain_id, - i64::try_from(header.cometbft_header.trusted_height.revision_height) + i64::try_from(header.cometbft_header.trusted_height.height()) .map_err(|_| { Error::from(IbcHeightTooLargeForTendermintHeight( - header.cometbft_header.trusted_height.revision_height, + header.cometbft_header.trusted_height.height(), )) })? .try_into() @@ -506,10 +506,7 @@ mod tests { ics008_wasm_client::storage_utils::save_consensus_state::( deps.as_mut(), consensus_state, - &Height { - revision_number: 2061, - revision_height: 91, - }, + &Height::new_with_revision(2061, 91), ); let mut env = mock_env(); diff --git a/light-clients/cometbls-light-client/src/client.rs b/light-clients/cometbls-light-client/src/client.rs index 6db9058c0b..990f268eff 100644 --- a/light-clients/cometbls-light-client/src/client.rs +++ b/light-clients/cometbls-light-client/src/client.rs @@ -111,7 +111,7 @@ impl IbcClient for CometblsLightClient { // SAFETY: height is bound to be 0..i64::MAX which makes it within the bounds of u64 let untrusted_height_number = header.signed_header.height.inner() as u64; - let trusted_height_number = header.trusted_height.revision_height; + let trusted_height_number = header.trusted_height.height(); if untrusted_height_number <= trusted_height_number { return Err(InvalidHeaderError::SignedHeaderHeightMustBeMoreRecent { @@ -169,7 +169,7 @@ impl IbcClient for CometblsLightClient { } T::verify_zkp( - &client_state.data.chain_id, + client_state.data.chain_id.as_str(), trusted_validators_hash, &header.signed_header, &header.zero_knowledge_proof, @@ -216,10 +216,10 @@ impl IbcClient for CometblsLightClient { read_consensus_state(deps.as_ref(), &header.trusted_height)? .ok_or(Error::ConsensusStateNotFound(header.trusted_height))?; - let untrusted_height = Height { - revision_number: header.trusted_height.revision_number, - revision_height: header.signed_header.height.inner() as u64, - }; + let untrusted_height = Height::new_with_revision( + header.trusted_height.revision(), + header.signed_header.height.inner() as u64, + ); if untrusted_height > client_state.latest_height { client_state.latest_height = untrusted_height; @@ -433,8 +433,7 @@ fn migrate_check_allowed_fields( subject_client_state: &ClientState, substitute_client_state: &ClientState, ) -> bool { - subject_client_state.unbonding_period == substitute_client_state.unbonding_period - && subject_client_state.max_clock_drift == substitute_client_state.max_clock_drift + subject_client_state.max_clock_drift == substitute_client_state.max_clock_drift } fn is_client_expired( @@ -455,11 +454,11 @@ fn is_client_expired( /// revision height. This function is a utility to generate a `Height` type out /// of the update data. fn height_from_header(header: &Header) -> Height { - Height { - revision_number: header.trusted_height.revision_number, + Height::new_with_revision( + header.trusted_height.revision(), // SAFETY: height's bounds are [0..i64::MAX] - revision_height: header.signed_header.height.inner() as u64, - } + header.signed_header.height.inner() as u64, + ) } #[cfg(test)] @@ -481,15 +480,9 @@ mod tests { use super::*; - const INITIAL_CONSENSUS_STATE_HEIGHT: Height = Height { - revision_number: 1, - revision_height: 1124, - }; + const INITIAL_CONSENSUS_STATE_HEIGHT: Height = Height::new_with_revision(1, 1124); - const INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT: Height = Height { - revision_number: 1, - revision_height: 1200, - }; + const INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT: Height = Height::new_with_revision(1, 1200); fn save_states_to_migrate_store( deps: DepsMut, @@ -616,7 +609,6 @@ mod tests { } let modifications = modify_fns! { s, - s.unbonding_period ^= u64::MAX, s.max_clock_drift ^= u64::MAX, }; diff --git a/light-clients/cometbls-light-client/src/contract.rs b/light-clients/cometbls-light-client/src/contract.rs index aecf871d75..cc30cfa936 100644 --- a/light-clients/cometbls-light-client/src/contract.rs +++ b/light-clients/cometbls-light-client/src/contract.rs @@ -27,10 +27,6 @@ pub fn instantiate( let client_state = ClientState::decode_as::(&msg.client_state).map_err(Error::ClientStateDecode)?; - if client_state.chain_id.len() > 31 { - return Err(Error::InvalidChainId); - } - save_proto_consensus_state::( deps.branch(), ProtoConsensusState { diff --git a/light-clients/cometbls-light-client/src/errors.rs b/light-clients/cometbls-light-client/src/errors.rs index 0f1796aa61..ca7f22e500 100644 --- a/light-clients/cometbls-light-client/src/errors.rs +++ b/light-clients/cometbls-light-client/src/errors.rs @@ -68,9 +68,6 @@ pub enum Error { #[error("forbidden fields have been changed during state migration")] MigrateFieldsChanged, - #[error("the chain id cannot be more than 31 bytes long to fit in the bn254 scalar field")] - InvalidChainId, - #[error("header_b.height should be greater than or equal to header_a.height")] InvalidMisbehaviourHeaderSequence, diff --git a/light-clients/cometbls-light-client/src/storage.rs b/light-clients/cometbls-light-client/src/storage.rs index f49a22f3a0..7cbd74d7dc 100644 --- a/light-clients/cometbls-light-client/src/storage.rs +++ b/light-clients/cometbls-light-client/src/storage.rs @@ -100,10 +100,7 @@ pub fn parse_height_from_key(key: &[u8]) -> Result { let revision_height = u64::from_be_bytes(key[key.len() - 8..key.len()].try_into().unwrap()); let revision_number = u64::from_be_bytes(key[key.len() - 16..key.len() - 8].try_into().unwrap()); - Ok(Height { - revision_number, - revision_height, - }) + Ok(Height::new_with_revision(revision_number, revision_height)) } /// Save the consensus state metadata at `height`. @@ -121,8 +118,8 @@ pub fn consensus_state_iterator_key(height: Height) -> Vec { CONSENSUS_STATE_ITER_KEY_PREFIX .bytes() .chain(*b"/") - .chain(height.revision_number.to_be_bytes()) - .chain(height.revision_height.to_be_bytes()) + .chain(height.revision().to_be_bytes()) + .chain(height.height().to_be_bytes()) .collect() } @@ -173,17 +170,12 @@ mod tests { (0, u64::MAX), ]; - heights - .into_iter() - .for_each(|(revision_number, revision_height)| { - let height = Height { - revision_number, - revision_height, - }; - let key = consensus_state_iterator_key(height); + heights.into_iter().for_each(|(revision, height)| { + let height = Height::new_with_revision(revision, height); + let key = consensus_state_iterator_key(height); - assert_eq!(parse_height_from_key(&key), Ok(height)); - }); + assert_eq!(parse_height_from_key(&key), Ok(height)); + }); assert_eq!( parse_height_from_key(&[0; CONSENSUS_STATE_ITER_KEY_PREFIX.len() + 17 + 1]), @@ -210,30 +202,21 @@ mod tests { save_consensus_state_metadata( deps.as_mut(), *timestamp, - Height { - revision_number: *rn, - revision_height: *rh, - }, + Height::new_with_revision(*rn, *rh), ); }); - let prev_height = Height { - revision_number: ordered_heights[2].0, - revision_height: ordered_heights[2].1, - }; + let prev_height = Height::new_with_revision(ordered_heights[2].0, ordered_heights[2].1); - let next_height = Height { - revision_number: ordered_heights[3].0, - revision_height: ordered_heights[3].1, - }; + let next_height = Height::new_with_revision(ordered_heights[3].0, ordered_heights[3].1); let next = get_current_or_next_consensus_state_meta( deps.as_ref(), - Height { - revision_number: prev_height.revision_number, + Height::new_with_revision( + prev_height.revision(), // +1 because the api says that if the input exists, it returns the input - revision_height: prev_height.revision_height + 1, - }, + prev_height.height() + 1, + ), ) .unwrap() .unwrap(); @@ -243,11 +226,11 @@ mod tests { let prev = get_current_or_prev_consensus_state_meta( deps.as_ref(), - Height { - revision_number: next_height.revision_number, + Height::new_with_revision( + next_height.revision(), // -1 because the api says that if the input exists, it returns the input - revision_height: next_height.revision_height - 1, - }, + next_height.height() - 1, + ), ) .unwrap() .unwrap(); @@ -259,10 +242,10 @@ mod tests { assert_eq!( get_current_or_next_consensus_state_meta( deps.as_ref(), - Height { - revision_number: ordered_heights.last().unwrap().0, - revision_height: ordered_heights.last().unwrap().1 + 1 - } + Height::new_with_revision( + ordered_heights.last().unwrap().0, + ordered_heights.last().unwrap().1 + 1 + ) ) .unwrap(), None @@ -272,10 +255,10 @@ mod tests { assert_eq!( get_current_or_prev_consensus_state_meta( deps.as_ref(), - Height { - revision_number: ordered_heights.first().unwrap().0, - revision_height: ordered_heights.first().unwrap().1 - 1 - } + Height::new_with_revision( + ordered_heights.first().unwrap().0, + ordered_heights.first().unwrap().1 - 1 + ) ) .unwrap(), None @@ -299,10 +282,7 @@ mod tests { unordered_heights.iter().for_each(|(rn, rh)| { deps.storage.set( - &consensus_state_iterator_key(Height { - revision_number: *rn, - revision_height: *rh, - }), + &consensus_state_iterator_key(Height::new_with_revision(*rn, *rh)), &[1], ); }); @@ -315,10 +295,10 @@ mod tests { .for_each(|(i, (k, _))| { assert_eq!( k, - consensus_state_iterator_key(Height { - revision_number: unordered_heights[i].0, - revision_height: unordered_heights[i].1, - }) + consensus_state_iterator_key(Height::new_with_revision( + unordered_heights[i].0, + unordered_heights[i].1, + )) ); }) } diff --git a/light-clients/cometbls-light-client/src/zkp_verifier.rs b/light-clients/cometbls-light-client/src/zkp_verifier.rs index 4523af690d..02733f7b38 100644 --- a/light-clients/cometbls-light-client/src/zkp_verifier.rs +++ b/light-clients/cometbls-light-client/src/zkp_verifier.rs @@ -1,10 +1,10 @@ -use unionlabs::{hash::H256, ibc::lightclients::cometbls::light_header::LightHeader}; +use unionlabs::{hash::H256, ibc::lightclients::cometbls::signed_header::SignedHeader}; pub trait ZkpVerifier { fn verify_zkp( chain_id: &str, trusted_validators_hash: H256, - header: &LightHeader, + header: &SignedHeader, zkp: &[u8], ) -> Result<(), cometbls_groth16_verifier::Error> { cometbls_groth16_verifier::verify_zkp(chain_id, trusted_validators_hash, header, zkp) @@ -19,7 +19,7 @@ impl ZkpVerifier for MockZKPVerifier { fn verify_zkp( _chain_id: &str, _trusted_validators_hash: H256, - _header: &LightHeader, + _header: &SignedHeader, _zkp: &[u8], ) -> Result<(), cometbls_groth16_verifier::Error> { Ok(()) diff --git a/light-clients/ethereum-light-client/Cargo.toml b/light-clients/ethereum-light-client/Cargo.toml index 4157a72590..c39645d0c4 100644 --- a/light-clients/ethereum-light-client/Cargo.toml +++ b/light-clients/ethereum-light-client/Cargo.toml @@ -16,24 +16,23 @@ test-include = ["light-clients/ethereum-light-client/src/test"] crate-type = ["cdylib", "rlib"] [dependencies] -bytes = { workspace = true } -cosmwasm-std = { workspace = true, features = ["abort"] } -ethereum-verifier = { workspace = true } -ethers-contract-derive = { workspace = true } -ethers-core = { workspace = true } -hex = { workspace = true } -ics008-wasm-client = { workspace = true } -prost = { workspace = true } -protos = { workspace = true } -rlp = { workspace = true } -schemars = { workspace = true } -serde = { workspace = true, features = ["derive"] } -serde-json-wasm = { workspace = true } -serde_json = { workspace = true, optional = true } -sha3 = { workspace = true } -thiserror = { workspace = true } -tiny-keccak = { workspace = true, features = ["keccak"] } -unionlabs = { workspace = true, features = ["ethabi"] } +alloy-core = { workspace = true } +bytes = { workspace = true } +cosmwasm-std = { workspace = true, features = ["abort"] } +ethereum-verifier = { workspace = true } +hex = { workspace = true } +ics008-wasm-client = { workspace = true } +prost = { workspace = true } +protos = { workspace = true } +rlp = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde-json-wasm = { workspace = true } +serde_json = { workspace = true, optional = true } +sha3 = { workspace = true } +thiserror = { workspace = true } +tiny-keccak = { workspace = true, features = ["keccak"] } +unionlabs = { workspace = true, features = ["ethabi"] } [dev-dependencies] base64 = { workspace = true } diff --git a/light-clients/ethereum-light-client/src/client.rs b/light-clients/ethereum-light-client/src/client.rs index 15fea49fd0..b07fc45ab6 100644 --- a/light-clients/ethereum-light-client/src/client.rs +++ b/light-clients/ethereum-light-client/src/client.rs @@ -20,26 +20,20 @@ use ics008_wasm_client::{ }; use unionlabs::{ cosmwasm::wasm::union::custom_query::UnionCustomQuery, - encoding::{DecodeAs, EncodeAs, EthAbi, Proto}, + encoding::{DecodeAs, Proto}, ensure, ethereum::{ibc_commitment_key, keccak256}, - google::protobuf::any::Any, hash::H256, ibc::{ core::{ client::{genesis_metadata::GenesisMetadata, height::Height}, commitment::merkle_path::MerklePath, }, - lightclients::{ - cometbls, - ethereum::{ - client_state::ClientState, consensus_state::ConsensusState, header::Header, - misbehaviour::Misbehaviour, storage_proof::StorageProof, - }, - wasm, + lightclients::ethereum::{ + client_state::ClientState, consensus_state::ConsensusState, header::Header, + misbehaviour::Misbehaviour, storage_proof::StorageProof, }, }, - ics24::Path, uint::U256, }; @@ -47,7 +41,7 @@ use crate::{ consensus_state::TrustedConsensusState, context::LightClientContext, custom_query::VerificationContext, - errors::{CanonicalizeStoredValueError, Error, InvalidCommitmentKey, StoredValueMismatch}, + errors::{Error, InvalidCommitmentKey, StoredValueMismatch}, Config, }; @@ -274,7 +268,7 @@ impl IbcClient for EthereumLightClient { // Some updates can be only for updating the sync committee, therefore the slot number can be // smaller. We don't want to save a new state if this is the case. let updated_height = core::cmp::max( - trusted_height.revision_height, + trusted_height.height(), consensus_update.attested_header.beacon.slot, ); @@ -296,10 +290,7 @@ impl IbcClient for EthereumLightClient { } } - let updated_height = Height { - revision_number: trusted_height.revision_number, - revision_height: updated_height, - }; + let updated_height = Height::new_with_revision(trusted_height.revision(), updated_height); save_consensus_state::(deps, consensus_state, &updated_height); @@ -322,10 +313,8 @@ impl IbcClient for EthereumLightClient { deps: Deps, header: Self::Header, ) -> Result> { - let height = Height { - revision_number: 0, - revision_height: header.consensus_update.attested_header.beacon.slot, - }; + let height = + Height::new_with_revision(0, header.consensus_update.attested_header.beacon.slot); if let Some(consensus_state) = read_consensus_state::(deps, &height)? { // New header is given with the same height but the storage roots don't match. @@ -473,7 +462,7 @@ pub fn do_verify_membership( check_commitment_key(&path, ibc_commitment_slot, storage_proof.key)?; // we store the hash of the data, not the data itself to the commitments map - let expected_value_hash = keccak256(canonicalize_stored_value(path, raw_value)?); + let expected_value_hash = keccak256(raw_value); let proof_value = H256::from(storage_proof.value.to_be_bytes()); @@ -494,38 +483,38 @@ pub fn do_verify_membership( .map_err(Error::VerifyStorageProof) } -// this is required because ibc-go requires the client state to be a protobuf Any, even though -// the counterparty (ethereum in this case) stores it as raw bytes. this will no longer be -// required with ibc-go v9. -pub fn canonicalize_stored_value( - path: String, - raw_value: Vec, -) -> Result, CanonicalizeStoredValueError> { - let path = path - .parse::() - .map_err(|_| CanonicalizeStoredValueError::UnknownIbcPath(path))?; - - let canonical_value = match path { - // proto(any) -> ethabi(cometbls) - Path::ClientState(_) => { - Any::::decode_as::(raw_value.as_ref()) - .map_err(CanonicalizeStoredValueError::CometblsClientStateDecode)? - .0 - .encode_as::() - } - // proto(any>) -> ethabi(cometbls) - Path::ClientConsensusState(_) => Any::< - wasm::consensus_state::ConsensusState, - >::decode_as::(raw_value.as_ref()) - .map_err(CanonicalizeStoredValueError::CometblsConsensusStateDecode)? - .0 - .data - .encode_as::(), - _ => raw_value, - }; - - Ok(canonical_value) -} +// // this is required because ibc-go requires the client state to be a protobuf Any, even though +// // the counterparty (ethereum in this case) stores it as raw bytes. this will no longer be +// // required with ibc-go v9. +// pub fn canonicalize_stored_value( +// path: String, +// raw_value: Vec, +// ) -> Result, CanonicalizeStoredValueError> { +// let path = path +// .parse::() +// .map_err(|_| CanonicalizeStoredValueError::UnknownIbcPath(path))?; + +// let canonical_value = match path { +// // proto(any) -> ethabi(cometbls) +// Path::ClientState(_) => { +// Any::::decode_as::(raw_value.as_ref()) +// .map_err(CanonicalizeStoredValueError::CometblsClientStateDecode)? +// .0 +// .encode_as::() +// } +// // proto(any>) -> ethabi(cometbls) +// Path::ClientConsensusState(_) => Any::< +// wasm::consensus_state::ConsensusState, +// >::decode_as::(raw_value.as_ref()) +// .map_err(CanonicalizeStoredValueError::CometblsConsensusStateDecode)? +// .0 +// .data +// .encode_as::(), +// _ => raw_value, +// }; + +// Ok(canonical_value) +// } /// Verifies that no value is committed at `path` in the counterparty light client's storage. pub fn do_verify_non_membership( @@ -577,9 +566,11 @@ mod test { }; use serde::Deserialize; use unionlabs::{ - encoding::Encode, + encoding::{Encode, EncodeAs}, ethereum::config::Mainnet, + google::protobuf::any::Any, ibc::{core::connection::connection_end::ConnectionEnd, lightclients::ethereum}, + id::ClientId, }; use super::*; @@ -599,15 +590,9 @@ mod test { expected_data: T, } - const INITIAL_CONSENSUS_STATE_HEIGHT: Height = Height { - revision_number: 0, - revision_height: 3577152, - }; + const INITIAL_CONSENSUS_STATE_HEIGHT: Height = Height::new_with_revision(0, 3577152); - const INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT: Height = Height { - revision_number: 0, - revision_height: 3577200, - }; + const INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT: Height = Height::new_with_revision(0, 3577200); lazy_static::lazy_static! { static ref UPDATES: Vec> = { @@ -635,7 +620,7 @@ mod test { for f in update_files { let mut data: ethereum::header::Header= serde_json::from_str(&fs::read_to_string(f).unwrap()).unwrap(); if prev_height != 0 { - data.trusted_sync_committee.trusted_height.revision_height = prev_height; + *data.trusted_sync_committee.trusted_height.height_mut() = prev_height; } prev_height = data.consensus_update.attested_header.beacon.slot; updates.push(data); @@ -737,16 +722,16 @@ mod test { EthereumLightClient::update_state(deps.as_mut(), env, update.clone()).unwrap(); // Consensus state is saved to the updated height. if update.consensus_update.attested_header.beacon.slot - > update.trusted_sync_committee.trusted_height.revision_height + > update.trusted_sync_committee.trusted_height.height() { // It's a finality update let wasm_consensus_state: WasmConsensusState = read_consensus_state::( deps.as_ref(), - &Height { - revision_number: 0, - revision_height: update.consensus_update.attested_header.beacon.slot, - }, + &Height::new_with_revision( + 0, + update.consensus_update.attested_header.beacon.slot, + ), ) .unwrap() .unwrap(); @@ -771,16 +756,13 @@ mod test { } else { // It's a sync committee update let updated_height = core::cmp::max( - update.trusted_sync_committee.trusted_height.revision_height, + update.trusted_sync_committee.trusted_height.height(), update.consensus_update.attested_header.beacon.slot, ); let wasm_consensus_state: WasmConsensusState = read_consensus_state::( deps.as_ref(), - &Height { - revision_number: 0, - revision_height: updated_height, - }, + &Height::new_with_revision(0, updated_height), ) .unwrap() .unwrap(); @@ -938,7 +920,7 @@ mod test { let proofs = vec![ { let mut proof = proof.clone(); - proof.key.0 .0[0] ^= u64::MAX; + proof.key = proof.key + U256::from(1); proof }, { @@ -981,8 +963,7 @@ mod test { let (proof, commitment_path, slot, storage_root, mut connection_end) = membership_data::("src/test/memberships/valid_connection_end.json"); - connection_end.client_id = - unionlabs::validated::Validated::new("08-client-1".into()).unwrap(); + connection_end.client_id = ClientId::new(1); assert!(do_verify_membership( commitment_path, diff --git a/light-clients/ethereum-light-client/src/contract.rs b/light-clients/ethereum-light-client/src/contract.rs index 01e825e03d..050099bcfc 100644 --- a/light-clients/ethereum-light-client/src/contract.rs +++ b/light-clients/ethereum-light-client/src/contract.rs @@ -31,23 +31,14 @@ pub fn instantiate( ProtoConsensusState { data: msg.consensus_state.into(), }, - &Height { - revision_number: 0, - revision_height: client_state.latest_slot, - }, + &Height::new(client_state.latest_slot), ); save_proto_client_state::( deps, ProtoClientState { data: msg.client_state.into(), checksum: msg.checksum.into(), - latest_height: Some( - Height { - revision_number: 0, - revision_height: client_state.latest_slot, - } - .into(), - ), + latest_height: Some(Height::new(client_state.latest_slot).into()), }, ); Ok(Response::default()) diff --git a/light-clients/ethereum-light-client/src/custom_query.rs b/light-clients/ethereum-light-client/src/custom_query.rs index 038c64243a..eb2e9e59ae 100644 --- a/light-clients/ethereum-light-client/src/custom_query.rs +++ b/light-clients/ethereum-light-client/src/custom_query.rs @@ -1,9 +1,9 @@ use cosmwasm_std::{Binary, Deps}; use ethereum_verifier::{error::InvalidSignature, verify::BlsVerify}; use unionlabs::{ - bls::{BlsPublicKey, BlsSignature}, cosmwasm::wasm::union::custom_query::{query_fast_aggregate_verify, UnionCustomQuery}, ensure, + hash::{H384, H768}, }; pub struct VerificationContext<'a> { @@ -13,9 +13,9 @@ pub struct VerificationContext<'a> { impl<'a> BlsVerify for VerificationContext<'a> { fn fast_aggregate_verify<'pk>( &self, - public_keys: impl IntoIterator, + public_keys: impl IntoIterator, msg: Vec, - signature: BlsSignature, + signature: H768, ) -> Result<(), ethereum_verifier::error::Error> { let public_keys: Vec<_> = public_keys.into_iter().cloned().collect(); diff --git a/light-clients/ethereum-light-client/src/errors.rs b/light-clients/ethereum-light-client/src/errors.rs index 3502e3831e..a88d060402 100644 --- a/light-clients/ethereum-light-client/src/errors.rs +++ b/light-clients/ethereum-light-client/src/errors.rs @@ -1,9 +1,8 @@ use ics008_wasm_client::IbcClientError; use unionlabs::{ - bls::BlsPublicKey, encoding::{DecodeErrorOf, Proto}, google::protobuf::any::Any, - hash::H256, + hash::{H256, H384}, ibc::{ core::client::height::Height, lightclients::{ @@ -44,8 +43,8 @@ pub enum Error { key ({given_aggregate}) or the stored one ({stored_aggregate})" )] TrustedSyncCommitteeMismatch { - stored_aggregate: BlsPublicKey, - given_aggregate: BlsPublicKey, + stored_aggregate: H384, + given_aggregate: H384, }, #[error("active sync committee is `next` but there is no next sync committee in the consensus state")] diff --git a/light-clients/evm-in-cosmos-light-client/src/client.rs b/light-clients/evm-in-cosmos-light-client/src/client.rs index c198baa593..fca71125cb 100644 --- a/light-clients/evm-in-cosmos-light-client/src/client.rs +++ b/light-clients/evm-in-cosmos-light-client/src/client.rs @@ -108,16 +108,15 @@ impl IbcClient for EvmInCosmosLightClient { deps, &env, client_state.data.l1_client_id.clone(), + todo!(), header.l1_height, ) .map_err(Error::CustomQuery)?; - let client_consensus_state_path = Path::ClientConsensusState(ClientConsensusStatePath { - client_id: client_state.data.l2_client_id.parse().unwrap(), - height: Height { - revision_number: 0, - revision_height: header.l2_slot, - }, - }); + let client_consensus_state_path = format!( + "clients/{}/consensusStates/{}", + client_state.data.l2_client_id, + Height::new(header.l2_slot) + ); // The ethereum consensus state is stored in proto-encoded wasm-wrapped form. let normalized_l2_consensus_state = WasmL2ConsensusState { data: header.l2_consensus_state, @@ -127,10 +126,7 @@ impl IbcClient for EvmInCosmosLightClient { &header.l2_inclusion_proof, &SDK_SPECS, &l1_consensus_state.data.app_hash, - &[ - b"ibc".to_vec(), - client_consensus_state_path.to_string().into_bytes(), - ], + &[b"ibc".to_vec(), client_consensus_state_path.into_bytes()], normalized_l2_consensus_state.encode_as::(), ) .map_err(Error::VerifyL2Membership)?; @@ -152,18 +148,14 @@ impl IbcClient for EvmInCosmosLightClient { ) -> Result, IbcClientError> { let mut client_state: WasmClientState = read_client_state(deps.as_ref())?; - let updated_height = Height { - revision_number: client_state.latest_height.revision_number, - revision_height: header.l1_height.revision_height, - }; + let updated_height = Height::new_with_revision( + client_state.latest_height.revision(), + header.l1_height.height(), + ); if client_state.latest_height < header.l1_height { - client_state.data.latest_slot = updated_height.revision_height; - update_client_state::( - deps.branch(), - client_state, - updated_height.revision_height, - ); + client_state.data.latest_slot = updated_height.height(); + update_client_state::(deps.branch(), client_state, updated_height.height()); } let consensus_state = WasmConsensusState { diff --git a/light-clients/evm-in-cosmos-light-client/src/contract.rs b/light-clients/evm-in-cosmos-light-client/src/contract.rs index cf14a15d1b..4194e6852c 100644 --- a/light-clients/evm-in-cosmos-light-client/src/contract.rs +++ b/light-clients/evm-in-cosmos-light-client/src/contract.rs @@ -31,23 +31,14 @@ pub fn instantiate( ProtoConsensusState { data: msg.consensus_state.into(), }, - &Height { - revision_number: 0, - revision_height: client_state.latest_slot, - }, + &Height::new(client_state.latest_slot), ); save_proto_client_state::( deps, ProtoClientState { data: msg.client_state.into(), checksum: msg.checksum.into(), - latest_height: Some( - Height { - revision_number: 0, - revision_height: client_state.latest_slot, - } - .into(), - ), + latest_height: Some(Height::new(client_state.latest_slot).into()), }, ); Ok(Response::default()) diff --git a/light-clients/linea-light-client/Cargo.toml b/light-clients/linea-light-client/Cargo.toml index dab5604edc..64e6dcba51 100644 --- a/light-clients/linea-light-client/Cargo.toml +++ b/light-clients/linea-light-client/Cargo.toml @@ -13,10 +13,10 @@ workspace = true crate-type = ["cdylib", "rlib"] [dependencies] +alloy-core = { workspace = true } cosmwasm-std = { workspace = true, features = ["abort"] } ethereum-light-client = { workspace = true, features = ["mainnet", "library"] } ethereum-verifier = { workspace = true } -ethers-core = { workspace = true } gnark-mimc = { workspace = true } hex = { workspace = true } ics008-wasm-client = { workspace = true } diff --git a/light-clients/linea-light-client/src/client.rs b/light-clients/linea-light-client/src/client.rs index 69bd021ac2..5d758c1933 100644 --- a/light-clients/linea-light-client/src/client.rs +++ b/light-clients/linea-light-client/src/client.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{Deps, DepsMut, Env}; -use ethereum_light_client::client::{canonicalize_stored_value, check_commitment_key}; +use ethereum_light_client::client::check_commitment_key; use gnark_mimc::new_mimc_constants_bls12_377; use ics008_wasm_client::{ storage_utils::{ @@ -137,18 +137,14 @@ impl IbcClient for LineaLightClient { ) -> Result, IbcClientError> { let mut client_state: WasmClientState = read_client_state(deps.as_ref())?; - let updated_height = Height { - revision_number: client_state.latest_height.revision_number, - revision_height: header.l1_height.revision_height, - }; + let updated_height = Height::new_with_revision( + client_state.latest_height.revision(), + header.l1_height.height(), + ); if client_state.latest_height < header.l1_height { client_state.data.l1_latest_height = updated_height; - update_client_state::( - deps.branch(), - client_state, - updated_height.revision_height, - ); + update_client_state::(deps.branch(), client_state, updated_height.height()); } // Guaranteed to succeed as we previously verified the header @@ -173,10 +169,8 @@ impl IbcClient for LineaLightClient { _client_message: Vec, ) -> Result<(), IbcClientError> { let mut client_state: WasmClientState = read_client_state(deps.as_ref())?; - client_state.data.frozen_height = Height { - revision_number: client_state.latest_height.revision_number, - revision_height: env.block.height, - }; + client_state.data.frozen_height = + Height::new_with_revision(client_state.latest_height.revision(), env.block.height); save_client_state::(deps, client_state); Ok(()) } @@ -254,7 +248,7 @@ fn do_verify_membership( check_commitment_key(&path, ibc_commitment_slot, key)?; // we store the hash of the data, not the data itself to the commitments map - let expected_value_hash = keccak256(canonicalize_stored_value(path, raw_value)?); + let expected_value_hash = keccak256(raw_value); // TODO: handle error let proof_value = H256::new(storage_proof.proof.value.clone().try_into().unwrap()); diff --git a/light-clients/linea-light-client/src/errors.rs b/light-clients/linea-light-client/src/errors.rs index 429a7a6522..6f48110e72 100644 --- a/light-clients/linea-light-client/src/errors.rs +++ b/light-clients/linea-light-client/src/errors.rs @@ -8,7 +8,6 @@ use unionlabs::{ core::client::height::Height, lightclients::{cometbls, linea, wasm}, }, - ics24::PathParseError, linea::proof::InclusionProof, }; @@ -58,9 +57,6 @@ pub enum Error { #[error("expected value ({expected}) and stored value ({stored}) don't match")] StoredValueMismatch { expected: H256, stored: H256 }, - #[error("unable to parse ics24 path")] - PathParse(#[from] PathParseError), - #[error("failed to verify linea header: {0}")] Verify(#[from] linea_verifier::Error), diff --git a/light-clients/movement/ics08-movement/src/client.rs b/light-clients/movement/ics08-movement/src/client.rs index 753e710024..fe924118e4 100644 --- a/light-clients/movement/ics08-movement/src/client.rs +++ b/light-clients/movement/ics08-movement/src/client.rs @@ -10,20 +10,17 @@ use unionlabs::{ account::AccountAddress, storage_proof::StorageProof, transaction_info::TransactionInfo, }, cosmwasm::wasm::union::custom_query::UnionCustomQuery, - encoding::{Bcs, DecodeAs, EncodeAs as _, Proto}, - google::protobuf::any::Any, + encoding::{DecodeAs, Proto}, hash::H256, ibc::{ core::{client::height::Height, commitment::merkle_path::MerklePath}, lightclients::{ - cometbls, movement::{ client_state::ClientState, consensus_state::ConsensusState, header::Header, }, wasm, }, }, - ics24::Path, }; use crate::errors::Error; @@ -181,14 +178,11 @@ impl IbcClient for MovementLightClient { if header.new_height > client_state.data.latest_block_num { client_state.data.latest_block_num = header.new_height; - client_state.latest_height.revision_height = header.new_height; + *client_state.latest_height.height_mut() = header.new_height; save_client_state::(deps.branch(), client_state); } - let update_height = Height { - revision_number: 0, - revision_height: header.new_height, - }; + let update_height = Height::new(header.new_height); save_consensus_state::( deps, @@ -276,35 +270,13 @@ fn do_verify_membership( ) -> Result<(), IbcClientError> { let proof = StorageProof::decode_as::(&proof).map_err(Error::StorageProofDecode)?; - let value = match path - .parse::() - .map_err(|_| Error::InvalidIbcPath(path.clone()))? - { - // proto(any) -> bcs(cometbls) - Path::ClientState(_) => { - Any::::decode_as::(&value) - .map_err(Error::CometblsClientStateDecode)? - .0 - .encode_as::() - } - // proto(any>) -> bcs(cometbls) - Path::ClientConsensusState(_) => Any::< - wasm::consensus_state::ConsensusState, - >::decode_as::(&value) - .map_err(Error::CometblsConsensusStateDecode)? - .0 - .data - .encode_as::(), - _ => value, - }; - let Some(proof_value) = &proof.state_value else { return Err(Error::MembershipProofWithoutValue.into()); }; // `aptos_std::table` stores the value as bcs encoded let given_value = bcs::to_bytes(&value).expect("cannot fail"); - if proof_value.data() != &given_value { + if proof_value.data() != given_value { return Err(Error::ProofValueMismatch(proof_value.data().to_vec(), given_value).into()); } diff --git a/light-clients/movement/ics08-movement/src/contract.rs b/light-clients/movement/ics08-movement/src/contract.rs index e7bf00fb60..f44c1fa422 100644 --- a/light-clients/movement/ics08-movement/src/contract.rs +++ b/light-clients/movement/ics08-movement/src/contract.rs @@ -31,23 +31,14 @@ pub fn instantiate( ProtoConsensusState { data: msg.consensus_state.into(), }, - &Height { - revision_number: 0, - revision_height: client_state.latest_block_num, - }, + &Height::new(client_state.latest_block_num), ); save_proto_client_state::( deps, ProtoClientState { data: msg.client_state.into(), checksum: msg.checksum.into(), - latest_height: Some( - Height { - revision_number: 0, - revision_height: client_state.latest_block_num, - } - .into(), - ), + latest_height: Some(Height::new(client_state.latest_block_num).into()), }, ); Ok(Response::default()) diff --git a/light-clients/movement/ics08-movement/src/errors.rs b/light-clients/movement/ics08-movement/src/errors.rs index 7a53ad2266..becb37d8cf 100644 --- a/light-clients/movement/ics08-movement/src/errors.rs +++ b/light-clients/movement/ics08-movement/src/errors.rs @@ -1,6 +1,6 @@ use ics008_wasm_client::IbcClientError; use unionlabs::{ - aptos::storage_proof::TryFromStorageProofError, + aptos::storage_proof::proto::TryFromStorageProofError, encoding::{DecodeErrorOf, Proto}, google::protobuf::any::Any, ibc::{ diff --git a/light-clients/scroll-light-client/Cargo.toml b/light-clients/scroll-light-client/Cargo.toml index e4e2db8d6f..b38cc2f010 100644 --- a/light-clients/scroll-light-client/Cargo.toml +++ b/light-clients/scroll-light-client/Cargo.toml @@ -13,10 +13,10 @@ workspace = true crate-type = ["cdylib", "rlib"] [dependencies] +alloy-core = { workspace = true } cosmwasm-std = { workspace = true, features = ["abort"] } ethereum-light-client = { workspace = true, features = ["mainnet", "library"] } ethereum-verifier = { workspace = true } -ethers-core = { workspace = true } hex = { workspace = true } ics008-wasm-client = { workspace = true } protos = { workspace = true } diff --git a/light-clients/scroll-light-client/src/client.rs b/light-clients/scroll-light-client/src/client.rs index 0e27c3eb8f..a3d2524f16 100644 --- a/light-clients/scroll-light-client/src/client.rs +++ b/light-clients/scroll-light-client/src/client.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{Deps, DepsMut, Env}; -use ethereum_light_client::client::{canonicalize_stored_value, check_commitment_key}; +use ethereum_light_client::client::check_commitment_key; use ics008_wasm_client::{ storage_utils::{ read_client_state, read_consensus_state, read_subject_client_state, @@ -136,18 +136,14 @@ impl IbcClient for ScrollLightClient { let timestamp = batch_header.last_block_timestamp; - let updated_height = Height { - revision_number: client_state.latest_height.revision_number, - revision_height: header.l1_height.revision_height, - }; + let updated_height = Height::new_with_revision( + client_state.latest_height.revision(), + header.l1_height.height(), + ); if client_state.latest_height < header.l1_height { - client_state.data.latest_slot = updated_height.revision_height; - update_client_state::( - deps.branch(), - client_state, - updated_height.revision_height, - ); + client_state.data.latest_slot = updated_height.height(); + update_client_state::(deps.branch(), client_state, updated_height.height()); } let consensus_state = WasmConsensusState { @@ -168,10 +164,8 @@ impl IbcClient for ScrollLightClient { _client_message: Vec, ) -> Result<(), IbcClientError> { let mut client_state: WasmClientState = read_client_state(deps.as_ref())?; - client_state.data.frozen_height = Height { - revision_number: client_state.latest_height.revision_number, - revision_height: env.block.height, - }; + client_state.data.frozen_height = + Height::new_with_revision(client_state.latest_height.revision(), env.block.height); save_client_state::(deps, client_state); Ok(()) } @@ -285,7 +279,7 @@ fn do_verify_membership( check_commitment_key(&path, ibc_commitment_slot, storage_proof.key)?; // we store the hash of the data, not the data itself to the commitments map - let expected_value_hash = keccak256(canonicalize_stored_value(path, raw_value)?); + let expected_value_hash = keccak256(raw_value); let proof_value = H256::from(storage_proof.value.to_be_bytes()); @@ -366,15 +360,9 @@ mod test { }; use crate::errors::Error; - const INITIAL_CONSENSUS_STATE_HEIGHT: Height = Height { - revision_number: 0, - revision_height: 950, - }; + const INITIAL_CONSENSUS_STATE_HEIGHT: Height = Height::new_with_revision(0, 950); - const INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT: Height = Height { - revision_number: 0, - revision_height: 970, - }; + const INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT: Height = Height::new_with_revision(0, 970); #[allow(clippy::type_complexity)] fn mock_dependencies( @@ -458,14 +446,14 @@ mod test { let subject_client_state = create_client_state( "client_1".to_string(), U256::from(1), - INITIAL_CONSENSUS_STATE_HEIGHT.revision_height, + INITIAL_CONSENSUS_STATE_HEIGHT.height(), INITIAL_CONSENSUS_STATE_HEIGHT, Height::default(), ); let substitute_client_state = create_client_state( "client_1".to_string(), U256::from(1), - INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT.revision_height, + INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT.height(), INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT, Height::default(), ); @@ -504,10 +492,7 @@ mod test { substitute_consensus_state, ) = prepare_migrate_tests(); - subject_client_state.data.frozen_height = Height { - revision_number: 0, - revision_height: 1000, - }; + subject_client_state.data.frozen_height = Height::new_with_revision(0, 1000); substitute_client_state.data.frozen_height = Height::default(); @@ -524,10 +509,7 @@ mod test { assert_eq!( original_subject_client_state.data.frozen_height, - Height { - revision_number: 0, - revision_height: 1000, - } + Height::new_with_revision(0, 1000) ); // Perform migration @@ -562,10 +544,7 @@ mod test { ) = prepare_migrate_tests(); // Make the substitute client frozen - substitute_client_state.data.frozen_height = Height { - revision_number: 0, - revision_height: 100, - }; + substitute_client_state.data.frozen_height = Height::new_with_revision(0, 100); // Save the states into the mock storage save_states_to_migrate_store( @@ -622,10 +601,7 @@ mod test { ) = prepare_migrate_tests(); // modify latest height to a height where the consensus state is not found - substitute_client_state.latest_height = Height { - revision_number: 0, - revision_height: 15, - }; + substitute_client_state.latest_height = Height::new_with_revision(0, 15); // Save only the client states and subject consensus state (skip substitute consensus state) save_states_to_migrate_store( diff --git a/light-clients/scroll-light-client/src/contract.rs b/light-clients/scroll-light-client/src/contract.rs index 455d7e1136..175f640185 100644 --- a/light-clients/scroll-light-client/src/contract.rs +++ b/light-clients/scroll-light-client/src/contract.rs @@ -29,23 +29,14 @@ pub fn instantiate( ProtoConsensusState { data: msg.consensus_state.into(), }, - &Height { - revision_number: 0, - revision_height: client_state.latest_slot, - }, + &Height::new(client_state.latest_slot), ); save_proto_client_state::( deps, ProtoClientState { data: msg.client_state.into(), checksum: msg.checksum.into(), - latest_height: Some( - Height { - revision_number: 0, - revision_height: client_state.latest_slot, - } - .into(), - ), + latest_height: Some(Height::new(client_state.latest_slot).into()), }, ); Ok(Response::default()) diff --git a/light-clients/scroll-light-client/src/errors.rs b/light-clients/scroll-light-client/src/errors.rs index faeee2de5b..4a2b6253d7 100644 --- a/light-clients/scroll-light-client/src/errors.rs +++ b/light-clients/scroll-light-client/src/errors.rs @@ -6,7 +6,6 @@ use unionlabs::{ google::protobuf::any::Any, hash::H256, ibc::{core::client::height::Height, lightclients::wasm}, - ics24::PathParseError, }; use crate::client::ScrollLightClient; @@ -71,9 +70,6 @@ pub enum Error { #[error("expected value ({expected}) and stored value ({stored}) don't match")] StoredValueMismatch { expected: H256, stored: H256 }, - #[error("unable to parse ics24 path")] - PathParse(#[from] PathParseError), - #[error("failed to verify scroll header")] Verify(#[from] scroll_verifier::Error), diff --git a/light-clients/tendermint-light-client/src/client.rs b/light-clients/tendermint-light-client/src/client.rs index c71efe919f..38305656b4 100644 --- a/light-clients/tendermint-light-client/src/client.rs +++ b/light-clients/tendermint-light-client/src/client.rs @@ -125,10 +125,10 @@ impl IbcClient for TendermintLightClient { Error::from(InvalidChainId(header.signed_header.header.chain_id.clone())), )?; - if revision_number != header.trusted_height.revision_number { + if revision_number != header.trusted_height.revision() { return Err(Error::from(RevisionNumberMismatch { trusted_revision_number: revision_number, - header_revision_number: header.trusted_height.revision_number, + header_revision_number: header.trusted_height.revision(), }) .into()); } @@ -141,10 +141,10 @@ impl IbcClient for TendermintLightClient { .try_into() .expect("value is bounded >= 0; qed;"); - if signed_height <= header.trusted_height.revision_height { + if signed_height <= header.trusted_height.height() { return Err(InvalidHeaderError::SignedHeaderHeightMustBeMoreRecent { signed_height, - trusted_height: header.trusted_height.revision_height, + trusted_height: header.trusted_height.height(), } .into()); } @@ -152,10 +152,10 @@ impl IbcClient for TendermintLightClient { tendermint_verifier::verify::verify( &construct_partial_header( client_state.data.chain_id, - i64::try_from(header.trusted_height.revision_height) + i64::try_from(header.trusted_height.height()) .map_err(|_| { Error::from(IbcHeightTooLargeForTendermintHeight( - header.trusted_height.revision_height, + header.trusted_height.height(), )) })? .try_into() @@ -498,11 +498,11 @@ pub fn is_client_expired( /// revision height. This function is a utility to generate a `Height` type out /// of the update data. pub fn height_from_header(header: &Header) -> Height { - Height { - revision_number: header.trusted_height.revision_number, + Height::new_with_revision( + header.trusted_height.revision(), // SAFETY: height's bounds are [0..i64::MAX] - revision_height: header.signed_header.header.height.inner() as u64, - } + header.signed_header.header.height.inner() as u64, + ) } pub fn check_trusted_header( @@ -544,15 +544,9 @@ mod tests { use super::*; - const INITIAL_CONSENSUS_STATE_HEIGHT: Height = Height { - revision_number: 1, - revision_height: 10, - }; + const INITIAL_CONSENSUS_STATE_HEIGHT: Height = Height::new_with_revision(1, 10); - const INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT: Height = Height { - revision_number: 1, - revision_height: 12, - }; + const INITIAL_SUBSTITUTE_CONSENSUS_STATE_HEIGHT: Height = Height::new_with_revision(1, 12); fn save_states_to_migrate_store( deps: DepsMut, diff --git a/light-clients/tendermint-light-client/src/storage.rs b/light-clients/tendermint-light-client/src/storage.rs index ccbeb026bb..589e5b6e51 100644 --- a/light-clients/tendermint-light-client/src/storage.rs +++ b/light-clients/tendermint-light-client/src/storage.rs @@ -109,10 +109,7 @@ pub fn parse_height_from_key(key: &[u8]) -> Result { let revision_height = u64::from_be_bytes(key[key.len() - 8..key.len()].try_into().unwrap()); let revision_number = u64::from_be_bytes(key[key.len() - 16..key.len() - 8].try_into().unwrap()); - Ok(Height { - revision_number, - revision_height, - }) + Ok(Height::new_with_revision(revision_number, revision_height)) } /// Save the consensus state metadata at `height`. @@ -134,7 +131,7 @@ pub fn consensus_state_iterator_key(height: Height) -> Vec { CONSENSUS_STATE_ITER_KEY_PREFIX .bytes() .chain(*b"/") - .chain(height.revision_number.to_be_bytes()) - .chain(height.revision_height.to_be_bytes()) + .chain(height.revision().to_be_bytes()) + .chain(height.height().to_be_bytes()) .collect() } diff --git a/tools/generate-rust-sol-bindings/Cargo.toml b/tools/generate-rust-sol-bindings/Cargo.toml deleted file mode 100644 index 7c10e9c60c..0000000000 --- a/tools/generate-rust-sol-bindings/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -edition = { workspace = true } -license-file = { workspace = true } -name = "generate-rust-sol-bindings" -publish = false -repository = { workspace = true } -version = "0.1.0" - -[lints] -workspace = true - -[dependencies] -clap = { workspace = true, features = ["default", "derive"] } -ethers-contract-abigen = { workspace = true, features = ["default", "fs"] } diff --git a/tools/generate-rust-sol-bindings/generate-rust-sol-bindings.nix b/tools/generate-rust-sol-bindings/generate-rust-sol-bindings.nix deleted file mode 100644 index 3931b115e5..0000000000 --- a/tools/generate-rust-sol-bindings/generate-rust-sol-bindings.nix +++ /dev/null @@ -1,94 +0,0 @@ -_: { - perSystem = - { - self', - pkgs, - system, - config, - crane, - stdenv, - ensureAtRepositoryRoot, - mkCi, - ... - }: - let - generate-rust-sol-bindings-crate = - (crane.buildWorkspaceMember { - crateDirFromRoot = "tools/generate-rust-sol-bindings"; - }).packages.generate-rust-sol-bindings; - - # cargo-toml = crane.lib.writeTOML "Cargo.toml" { - # package = { - # name = "contracts"; - # version = "0.0.0"; - # edition = "2021"; - # }; - # dependencies = { - # # TODO(benluelo): use workspace dependencies - # ethers = "2.0.4"; - # }; - # }; - - rust-sol-bindings = pkgs.stdenv.mkDerivation { - name = "generate-rust-sol-bindings"; - pname = "generate-rust-sol-bindings"; - src = ./.; - buildInputs = [ pkgs.taplo ]; - buildPhase = '' - mkdir $out - - ${generate-rust-sol-bindings-crate}/bin/generate-rust-sol-bindings \ - --cratedir ./out/ \ - ${self'.packages.evm-contracts}/out/IBCHandler.sol/IBCHandler.json \ - ${self'.packages.evm-contracts}/out/IBCClient.sol/IBCClient.json \ - ${self'.packages.evm-contracts}/out/IBCConnection.sol/IBCConnection.json \ - ${self'.packages.evm-contracts}/out/IBCChannel.sol/IBCChannel.json \ - ${self'.packages.evm-contracts}/out/IBCPacket.sol/IBCPacket.json \ - ${self'.packages.evm-contracts}/out/Glue.sol/Glue.json \ - ${self'.packages.evm-contracts}/out/ERC20.sol/ERC20.json \ - ${self'.packages.evm-contracts}/out/Relay.sol/UCS01Relay.json \ - ${self'.packages.evm-contracts}/out/CometblsClientV2.sol/CometblsClient.json \ - ${self'.packages.evm-contracts}/out/ILightClient.sol/ILightClient.json \ - ${self'.packages.evm-contracts}/out/Multicall.sol/Multicall.json - - ls -al ./out/ - - # format and normalize comments in generated code - # rustfmt --config normalize_comments=true --edition "2021" lib.rs - - cp -r ./out/* $out - - taplo format $out/Cargo.toml - - sed -i 's/version = "2"/workspace = true/g' $out/Cargo.toml - - # heredocs confuse me - echo "[features]" >> $out/Cargo.toml - echo "providers = []" >> $out/Cargo.toml - - taplo format $out/Cargo.toml - ''; - }; - in - { - packages = { - rust-sol-bindings = mkCi false rust-sol-bindings; - - generate-rust-sol-bindings = mkCi false ( - pkgs.writeShellApplication { - name = "generate-rust-sol-bindings"; - runtimeInputs = [ rust-sol-bindings ]; - text = '' - ${ensureAtRepositoryRoot} - - outdir="generated/rust/contracts" - - cp -r --no-preserve=mode ${rust-sol-bindings}/* $outdir - - echo "Generation successful!" - ''; - } - ); - }; - }; -} diff --git a/tools/generate-rust-sol-bindings/src/main.rs b/tools/generate-rust-sol-bindings/src/main.rs deleted file mode 100644 index 3be00e043e..0000000000 --- a/tools/generate-rust-sol-bindings/src/main.rs +++ /dev/null @@ -1,33 +0,0 @@ -use std::{error::Error, path::PathBuf}; - -use clap::Parser; -use ethers_contract_abigen::{Abigen, MultiAbigen}; - -#[derive(Parser)] -struct Args { - input: Vec, - #[arg(long)] - cratedir: PathBuf, - #[arg(long)] - overwrite: bool, -} - -fn main() -> Result<(), Box> { - let args = Args::parse(); - - if args.cratedir.exists() && !args.overwrite { - return Err("out file exists, not overwriting".into()); - } - - dbg!(&args.input); - - MultiAbigen::from_abigens( - args.input - .into_iter() - .map(|s| Abigen::from_file(s).unwrap()), - ) - .build()? - .write_to_crate("contracts", "0.0.0", args.cratedir, false)?; - - Ok(()) -} diff --git a/tools/parse-wasm-client-type/src/main.rs b/tools/parse-wasm-client-type/src/main.rs index e1fed70ecf..f70b36df44 100644 --- a/tools/parse-wasm-client-type/src/main.rs +++ b/tools/parse-wasm-client-type/src/main.rs @@ -1,14 +1,14 @@ use std::ffi::OsString; use clap::Parser; -use unionlabs::{parse_wasm_client_type, WasmClientType}; +use unionlabs::parse_wasm_client_type; #[derive(Parser)] #[command(arg_required_else_help = true)] struct Args { file_path: OsString, /// Optionally provide a client type to expect, exiting with a non-zero status code if it's incorrect. - expected_client_type: Option, + expected_client_type: Option, } fn main() { @@ -17,9 +17,8 @@ fn main() { let bz = std::fs::read(args.file_path).unwrap(); match (parse_wasm_client_type(bz), args.expected_client_type) { - (Ok(Some(ty)), Some(expected)) => assert_eq!(ty, expected), - (Ok(Some(ty)), None) => println!("{ty}"), - (Ok(None), _) => panic!("file does not contain a wasm client type"), - (Err(err), _) => panic!("{err}"), + (Some(ty), Some(expected)) => assert_eq!(ty, expected), + (Some(ty), None) => println!("{ty}"), + (None, _) => panic!("file does not contain a wasm client type"), } } diff --git a/tools/rust-proto.nix b/tools/rust-proto.nix index 486aa2f913..a63a895652 100644 --- a/tools/rust-proto.nix +++ b/tools/rust-proto.nix @@ -39,11 +39,6 @@ _: { workspace = true; features = [ "prost-derive" ]; }; - ethers = { - workspace = true; - optional = true; - features = [ "rustls" ]; - }; serde = { workspace = true; features = [ "derive" ]; @@ -85,10 +80,6 @@ _: { "prost/std" "serde/std" ]; - eth-abi = [ - "ethers" - "std" - ]; client = [ "tonic" ]; json-schema = [ "schemars" ]; # nix attrsets don't preserve order, use this to replace with the insertion point (see command below) @@ -137,10 +128,10 @@ _: { sed -i 's/pub enum Sum {/#\[cfg_attr(feature = "serde", serde(tag = "type", content = "value"))\]pub enum Sum {/' "./src/tendermint.crypto.rs" # i can't figure out how to add attributes to the variants directly, possibly related to the issue linked above - sed -i 's/Ed25519(::prost::alloc::vec::Vec)/#\[serde(rename = "tendermint\/PubKeyEd25519")\]Ed25519(#[serde(with = "::serde_utils::base64")] ::prost::alloc::vec::Vec)/' "./src/tendermint.crypto.rs" - sed -i 's/Secp256k1(::prost::alloc::vec::Vec)/#\[serde(rename = "tendermint\/PubKeySecp256k1")\]Secp256k1(#[serde(with = "::serde_utils::base64")] ::prost::alloc::vec::Vec)/' "./src/tendermint.crypto.rs" - sed -i 's/Bn254(::prost::alloc::vec::Vec)/#\[serde(rename = "tendermint\/PubKeyBn254")\]Bn254(#[serde(with = "::serde_utils::base64")] ::prost::alloc::vec::Vec)/' "./src/tendermint.crypto.rs" - sed -i 's/Bls12_381(::prost::alloc::vec::Vec)/#\[serde(rename = "cometbft\/PubKeyBls12_381")\]Bls12_381(#[serde(with = "::serde_utils::base64")] ::prost::alloc::vec::Vec)/' "./src/tendermint.crypto.rs" + sed -i 's/Ed25519(::prost::alloc::vec::Vec)/#\[cfg_attr(feature = "serde", serde(rename = "tendermint\/PubKeyEd25519"))\]Ed25519(#[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] ::prost::alloc::vec::Vec)/' "./src/tendermint.crypto.rs" + sed -i 's/Secp256k1(::prost::alloc::vec::Vec)/#\[cfg_attr(feature = "serde", serde(rename = "tendermint\/PubKeySecp256k1"))\]Secp256k1(#[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] ::prost::alloc::vec::Vec)/' "./src/tendermint.crypto.rs" + sed -i 's/Bn254(::prost::alloc::vec::Vec)/#\[cfg_attr(feature = "serde", serde(rename = "tendermint\/PubKeyBn254"))\]Bn254(#[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] ::prost::alloc::vec::Vec)/' "./src/tendermint.crypto.rs" + sed -i 's/Bls12_381(::prost::alloc::vec::Vec)/#\[cfg_attr(feature = "serde", serde(rename = "cometbft\/PubKeyBls12_381"))\]Bls12_381(#[cfg_attr(feature = "serde", serde(with = "::serde_utils::base64"))] ::prost::alloc::vec::Vec)/' "./src/tendermint.crypto.rs" @@ -148,8 +139,8 @@ _: { sed -i 's/pub sum: ::core::option::Option,/#\[cfg_attr(feature = "serde", serde(flatten))\]pub sum: ::core::option::Option,/' "./src/tendermint.types.rs" sed -i 's/pub enum Sum {/#\[cfg_attr(feature = "serde", serde(tag = "type", content = "value"))\]pub enum Sum {/' "./src/tendermint.types.rs" - sed -i 's/DuplicateVoteEvidence(/#\[serde(rename = "tendermint\/DuplicateVoteEvidence")\]DuplicateVoteEvidence(/' "./src/tendermint.types.rs" - sed -i 's/LightClientAttackEvidence(/#\[serde(rename = "tendermint\/DuplicateVoteEvidence")\]LightClientAttackEvidence(/' "./src/tendermint.types.rs" + sed -i 's/DuplicateVoteEvidence(/#\[cfg_attr(feature = "serde", serde(rename = "tendermint\/DuplicateVoteEvidence"))\]DuplicateVoteEvidence(/' "./src/tendermint.types.rs" + sed -i 's/LightClientAttackEvidence(/#\[cfg_attr(feature = "serde", serde(rename = "tendermint\/DuplicateVoteEvidence"))\]LightClientAttackEvidence(/' "./src/tendermint.types.rs" ''; }; uniond = rec { @@ -241,8 +232,6 @@ _: { # ord = ''#[derive(Eq, PartialOrd, Ord)]''; # eq = ''#[derive(Eq)]''; - # eth_abi = ''#[cfg_attr(feature = "ethers", derive(::ethers::contract::EthAbiType, ::ethers::contract::EthAbiCodec))]''; - serde = ''#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]''; serde_default = ''#[cfg_attr(feature = "serde", serde(default))]''; # serde_flatten = ''#[cfg_attr(feature = "serde", serde(flatten))]''; @@ -255,7 +244,7 @@ _: { # jsonschema = ''#[cfg_attr(all(feature = "json-schema", feature = "std"), derive(::schemars::JsonSchema))]''; # jsonschema_str = ''#[cfg_attr(all(feature = "json-schema", feature = "std"), schemars(with = "String"))]''; - serde_alias = alias: ''#[serde(alias = "${alias}")]''; + serde_alias = alias: ''#[cfg_attr(feature = "serde", serde(alias = "${alias}"))]''; in { type_attribute = { @@ -449,9 +438,10 @@ _: { ".tendermint.types.CommitSig.timestamp" = [ '' #[cfg_attr( - feature = "serde", - serde(with = "::serde_utils::parse_from_rfc3339_string_but_0001_01_01T00_00_00Z_is_none") - )]'' + feature = "serde", + serde(with = "::serde_utils::parse_from_rfc3339_string_but_0001_01_01T00_00_00Z_is_none") + )] + '' ]; ".tendermint.version.Consensus.block" = [ serde_string ]; diff --git a/tools/rust/crane.nix b/tools/rust/crane.nix index 59a7582faf..e34d0a583a 100644 --- a/tools/rust/crane.nix +++ b/tools/rust/crane.nix @@ -485,7 +485,6 @@ # "--exclude=tidy" # "--exclude=generate-rust-sol-bindings" # "--exclude=ensure-blocks" - # "--exclude=ucli" # "--hide-instantiations" # ]; # SQLX_OFFLINE = true; diff --git a/ucli/Cargo.toml b/ucli/Cargo.toml deleted file mode 100644 index 30371388dc..0000000000 --- a/ucli/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -edition = { workspace = true } -name = "ucli" -repository = { workspace = true } -version = "0.1.0" - -[lints] -workspace = true - -[dependencies] -clap = { workspace = true, features = ["default", "derive", "env", "error-context"] } -ethers = { workspace = true, features = ["rustls", "ws"] } -hex = { workspace = true } -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -tokio = { workspace = true, features = ["macros"] } - -beacon-api = { workspace = true } -chain-utils = { workspace = true } -contracts = { workspace = true } -cosmwasm-std = { workspace = true } -subtle-encoding = { workspace = true, features = ["bech32-preview"] } -tendermint-rpc = { workspace = true, features = ["http-client", "websocket-client"] } -unionlabs = { workspace = true, features = ["ethabi"] } - -[features] -eth-minimal = [] diff --git a/ucli/src/cli.rs b/ucli/src/cli.rs deleted file mode 100644 index aa281db14f..0000000000 --- a/ucli/src/cli.rs +++ /dev/null @@ -1,181 +0,0 @@ -use std::{ffi::OsString, marker::PhantomData}; - -use chain_utils::{cosmos_sdk::GasConfig, private_key::PrivateKey}; -use clap::{Parser, Subcommand}; -use ethers::{ - prelude::k256::ecdsa, - providers::{Middleware, Provider, Ws}, - signers::LocalWallet, - utils::secret_key_to_address, -}; -use serde::{Deserialize, Serialize}; -use tendermint_rpc::WebSocketClientUrl; -use unionlabs::{ - ethereum::config::ChainSpec, - hash::{H160, H256}, -}; - -#[derive(Debug, Parser)] -#[command(arg_required_else_help = true)] -pub struct AppArgs { - #[arg( - long, - short = 'c', - env, - global = true, - default_value = "~/.config/ucli/config.json" - )] - pub config_file_path: OsString, - #[command(subcommand)] - pub command: Command, -} - -#[derive(Debug, Subcommand)] -pub enum Command { - #[command(subcommand)] - Tx(TxCmd), - #[command(subcommand)] - Query(QueryCmd), - #[command(subcommand)] - Compute(ComputeCmd), -} - -#[derive(Debug, Subcommand)] -pub enum ComputeCmd { - Instantiate2Address { - #[arg(long)] - creator: H160, - #[arg(long)] - checksum: H256, - #[arg(long)] - salt: String, - }, -} - -#[derive(Debug, Subcommand)] -pub enum TxCmd { - #[command(subcommand)] - Ethereum(EthereumTx), -} - -#[derive(Debug, Subcommand)] -pub enum EthereumTx { - Transfer { - #[arg(long)] - relay_address: H160, - #[arg(long)] - channel_id: String, - #[arg(long)] - receiver: String, - #[arg(long)] - amount: u64, - #[arg(long)] - denom: String, - #[arg(long)] - memo: String, - }, -} - -#[derive(Debug, Subcommand)] -pub enum QueryCmd { - #[command(subcommand)] - Ethereum(EthereumQuery), - #[command(subcommand)] - Union(UnionQuery), -} - -#[derive(Debug, Subcommand)] -pub enum EthereumQuery { - // TODO(aeryz): Check if native denoms present in the `denomToAddress` mapping. - Ucs01Balance { - #[arg(long)] - contract_address: H160, - #[arg(long)] - denom: String, - #[arg(long)] - address: H160, - #[arg(long)] - channel_id: String, - }, - Erc20Balance { - #[arg(long)] - contract_address: H160, - #[arg(long)] - address: H160, - }, -} - -#[derive(Debug, Subcommand)] -pub enum UnionQuery { - AccountInfo { - #[arg(long)] - address: String, - }, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(bound(serialize = "", deserialize = ""), deny_unknown_fields)] -pub struct Config { - pub ethereum: EthereumChainConfig, - pub union: UnionChainConfig, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "snake_case", tag = "preset_base")] -pub enum EthereumChainConfig { - Mainnet(EthereumChainConfigFields), - Minimal(EthereumChainConfigFields), -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct EthereumChainConfigFields { - /// The address of the `IBCHandler` smart contract. - pub ibc_handler_address: H160, - - /// The signer that will be used to submit transactions by voyager. - pub signer: PrivateKey, - - // TODO(benluelo): Use `Url` or something similar - /// The RPC endpoint for the execution chain. - pub eth_rpc_api: String, - /// The RPC endpoint for the beacon chain. - pub eth_beacon_rpc_api: String, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct UnionChainConfig { - pub signers: Vec>, - pub ws_url: WebSocketClientUrl, - pub prover_endpoint: String, - pub grpc_url: String, - pub gas_config: GasConfig, -} - -#[derive(Debug, Clone)] -pub struct Ethereum { - // pub chain_id: U256, - pub wallet: LocalWallet, - pub provider: Provider, - // pub beacon_api_client: BeaconApiClient, - __marker: PhantomData C>, -} - -impl Ethereum { - pub async fn new(config: EthereumChainConfigFields) -> Result { - let provider = Provider::new(Ws::connect(config.eth_rpc_api).await.unwrap()); - - let chain_id = provider.get_chainid().await.unwrap(); - - let signer = config.signer.value(); - let address = secret_key_to_address(&signer); - let wallet = LocalWallet::new_with_signer(signer, address, chain_id.as_u64()); - - Ok(Self { - // chain_id: U256(chain_id), - provider, - // beacon_api_client: BeaconApiClient::new(config.eth_beacon_rpc_api).await, - wallet, - __marker: PhantomData, - }) - } -} diff --git a/ucli/src/main.rs b/ucli/src/main.rs deleted file mode 100644 index 4864e3c272..0000000000 --- a/ucli/src/main.rs +++ /dev/null @@ -1,266 +0,0 @@ -use std::{fs::read_to_string, sync::Arc}; - -use clap::Parser; -use cli::Ethereum; -use contracts::{ - erc20, - ucs01_relay::{LocalToken, UCS01Relay}, -}; -use ethers::{middleware::SignerMiddleware, signers::Signer, types::Address}; -use unionlabs::{ - ethereum::config::{ChainSpec, Mainnet, Minimal}, - ibc::core::client::height::Height, - uint::U256, -}; - -use crate::cli::{AppArgs, Config}; - -mod cli; - -#[tokio::main] -async fn main() { - let args = AppArgs::parse(); - - let read_config = || { - let config = read_to_string(&args.config_file_path).unwrap(); - serde_json::from_str::(&config).unwrap() - }; - - match args.command { - cli::Command::Compute(compute) => match compute { - cli::ComputeCmd::Instantiate2Address { - creator, - checksum, - salt, - } => { - println!( - "{}", - hex::encode( - &*cosmwasm_std::instantiate2_address( - checksum.as_ref(), - &creator.get().into(), - &hex::decode(salt).unwrap(), - ) - .unwrap() - ) - ); - } - }, - cli::Command::Tx(tx) => { - let config = read_config(); - match tx { - cli::TxCmd::Ethereum(ethereum_tx) => { - match ethereum_tx { - cli::EthereumTx::Transfer { - relay_address, - channel_id, - receiver, - amount, - denom, - memo, - } => match config.ethereum { - cli::EthereumChainConfig::Mainnet(config) => { - handle_transfer::( - Ethereum::new(config).await.unwrap(), - relay_address.into(), - channel_id, - receiver, - amount, - denom, - memo, - ) - .await - } - cli::EthereumChainConfig::Minimal(config) => { - handle_transfer::( - Ethereum::new(config).await.unwrap(), - relay_address.into(), - channel_id, - receiver, - amount, - denom, - memo, - ) - .await - } - }, - }; - } - } - } - cli::Command::Query(query) => { - let config = read_config(); - match query { - cli::QueryCmd::Ethereum(ethereum_query) => match ethereum_query { - cli::EthereumQuery::Ucs01Balance { - contract_address, - denom, - address, - channel_id, - } => match config.ethereum { - cli::EthereumChainConfig::Mainnet(config) => { - handle_ucs_balance::( - Ethereum::new(config).await.unwrap(), - contract_address.into(), - denom, - address.into(), - channel_id, - ) - .await - } - cli::EthereumChainConfig::Minimal(config) => { - handle_ucs_balance::( - Ethereum::new(config).await.unwrap(), - contract_address.into(), - denom, - address.into(), - channel_id, - ) - .await - } - }, - cli::EthereumQuery::Erc20Balance { - contract_address, - address, - } => match config.ethereum { - cli::EthereumChainConfig::Mainnet(config) => { - handle_erc_balance::( - Ethereum::new(config).await.unwrap(), - contract_address.into(), - address.into(), - ) - .await - } - cli::EthereumChainConfig::Minimal(config) => { - handle_erc_balance::( - Ethereum::new(config).await.unwrap(), - contract_address.into(), - address.into(), - ) - .await - } - }, - }, - // cli::QueryCmd::Union(union_query) => match union_query { - // cli::UnionQuery::AccountInfo { address } => { - // let info = Union::new(chain_utils::union::Config { - // keyring: config.union.signers, - // ws_url: config.union.ws_url, - // prover_endpoint: config.union.prover_endpoint, - // grpc_url: config.union.grpc_url, - // gas_config: config.union.gas_config, - // }) - // .await - // .unwrap() - // .account_info(&address) - // .await; - // println!("{info:#?}"); - // } - // }, - _ => unimplemented!(), - } - } - } -} - -async fn handle_ucs_balance( - ethereum: Ethereum, - contract_address: Address, - denom: String, - address: Address, - channel_id: String, -) { - let signer_middleware = Arc::new(SignerMiddleware::new( - ethereum.provider.clone(), - ethereum.wallet.clone(), - )); - let relay = UCS01Relay::new(contract_address, signer_middleware.clone()); - - let denom = relay.get_denom_address(channel_id, denom).await.unwrap(); - println!("Corresponding ERC20 address: {}", denom); - - let erc_contract = erc20::ERC20::new(denom, signer_middleware.clone()); - - let balance = erc_contract.balance_of(address).await.unwrap(); - println!("Balance is: {}", balance); -} - -async fn handle_erc_balance( - ethereum: Ethereum, - contract_address: Address, - address: Address, -) { - let signer_middleware = Arc::new(SignerMiddleware::new( - ethereum.provider.clone(), - ethereum.wallet.clone(), - )); - let erc_contract = erc20::ERC20::new(contract_address, signer_middleware); - - let balance = erc_contract.balance_of(address).await.unwrap(); - println!("Balance is: {}", balance); -} - -async fn handle_transfer( - ethereum: Ethereum, - relay_address: Address, - channel_id: String, - receiver: String, - amount: u64, - denom: String, - memo: String, -) { - let signer_middleware = Arc::new(SignerMiddleware::new( - ethereum.provider.clone(), - ethereum.wallet.clone(), - )); - let relay = UCS01Relay::new(relay_address, signer_middleware.clone()); - - let denom = relay - .get_denom_address(channel_id.clone(), denom) - .await - .unwrap(); - println!("Address is: {:?}", denom); - - let erc_contract = erc20::ERC20::new(denom, signer_middleware.clone()); - - let balance = erc_contract - .balance_of(ethereum.wallet.address()) - .await - .unwrap(); - println!("Balance is: {}", balance); - - erc_contract - .approve(relay_address, (U256::MAX / U256::from(2)).into()) - .send() - .await - .unwrap() - .await - .unwrap() - .unwrap(); - - let tx_rcp = relay - .send( - channel_id, - hex::decode(receiver).unwrap().into(), - [LocalToken { - denom, - amount: amount.into(), - }] - .into(), - memo, - Height { - revision_number: 0, - revision_height: 0, - } - .into(), - u64::MAX, - ) - .send() - .await - .unwrap() - .await - .unwrap() - .unwrap(); - - dbg!(tx_rcp); -} diff --git a/ucli/ucli-config.json b/ucli/ucli-config.json deleted file mode 100644 index c6178edee4..0000000000 --- a/ucli/ucli-config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "ethereum": { - "preset_base": "minimal", - "ibc_handler_address": "0xeda338e4dc46038493b885327842fd3e301cab39", - "signer": { - "raw": "0x4e9444a6efd6d42725a250b650a781da2737ea308c839eaccb0f7f3dbd2fea77" - }, - "eth_rpc_api": "ws://localhost:8546", - "eth_beacon_rpc_api": "http://localhost:9596" - }, - "union": { - "signers": [ - { - "raw": "0xaa820fa947beb242032a41b6dc9a8b9c37d8f5fbcda0966b1ec80335b10a7d6f" - }, - { - "raw": "0xf562d20f0a4ffd8814d262f7023f33971cbcd14a96d60027585777f174b9cdeb" - }, - { - "raw": "0xa1f713e0f36404586085a599a45ca8233e23709e23cd54bc8d5452ef8f7bc1e6" - }, - { - "raw": "0xedc165ff1ebc27044ddc284c9cf5da656dcbff324f6ecbb9d3203cf5f4738d6d" - }, - { - "raw": "0x40c30853b7f3e6d7ec997fc72c78aef65fce2e82d5b71032a98cb8efaa4710ca" - }, - { - "raw": "0xaeff1a3cf6e96d1551c95677fff8399b1ee0c3ed2f610928520897202e5ae690" - }, - { - "raw": "0x007c467d778a10ca5975f306c23fbb3e904b6d26cb1eefe861a2b21771e56608" - }, - { - "raw": "0xd015be9181c7a575c701552fd8c1ba22ae6b8528d0f15db42062e387c77e529f" - }, - { - "raw": "0xc85dc3662b72c79d0d484b4599dd8389a08b157b997682455dcb746066eab3b0" - }, - { - "raw": "0xc14641f65d26bb81202fdf6c9b36584ccca64a52f47b236117a9ece5b920013c" - } - ], - "fee_denom": "stake", - "ws_url": "ws://localhost:26657/websocket", - "prover_endpoint": "https://galois-devnet.cryptware.io:443", - "grpc_url": "http://localhost:9090" - } -} diff --git a/ucli/ucli.nix b/ucli/ucli.nix deleted file mode 100644 index d9e094aab0..0000000000 --- a/ucli/ucli.nix +++ /dev/null @@ -1,25 +0,0 @@ -_: { - perSystem = - { - self', - pkgs, - crane, - ... - }: - let - ucli = crane.buildWorkspaceMember { - crateDirFromRoot = "ucli"; - cargoTestExtraAttrs = { - partitions = 1; - partitionType = "count"; - }; - extraEnv = { - SQLX_OFFLINE = "1"; - }; - }; - in - { - inherit (ucli) packages; - inherit (ucli) checks; - }; -} diff --git a/uniond/proto/union/ibc/lightclients/cometbls/v1/cometbls.proto b/uniond/proto/union/ibc/lightclients/cometbls/v1/cometbls.proto index 610c05c647..3e5d81b732 100644 --- a/uniond/proto/union/ibc/lightclients/cometbls/v1/cometbls.proto +++ b/uniond/proto/union/ibc/lightclients/cometbls/v1/cometbls.proto @@ -14,14 +14,12 @@ message ClientState { // duration of the period since the LastestTimestamp during which the // submitted headers are valid for upgrade uint64 trusting_period = 2; - // duration of the staking unbonding period - uint64 unbonding_period = 3; // defines how much new (untrusted) header's Time can drift into the future. - uint64 max_clock_drift = 4; + uint64 max_clock_drift = 3; // Block height when the client was frozen due to a misbehaviour - .ibc.core.client.v1.Height frozen_height = 5 [(gogoproto.nullable) = false]; + .ibc.core.client.v1.Height frozen_height = 4 [(gogoproto.nullable) = false]; // Latest height the client was updated to - .ibc.core.client.v1.Height latest_height = 6 [(gogoproto.nullable) = false]; + .ibc.core.client.v1.Height latest_height = 5 [(gogoproto.nullable) = false]; } message ConsensusState { @@ -39,7 +37,7 @@ message Misbehaviour { Header header_b = 2; } -message LightHeader { +message SignedHeader { int64 height = 1; google.protobuf.Timestamp time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; bytes validators_hash = 3; @@ -48,7 +46,7 @@ message LightHeader { } message Header { - LightHeader signed_header = 1; + SignedHeader signed_header = 1; .ibc.core.client.v1.Height trusted_height = 2; bytes zero_knowledge_proof = 3; } diff --git a/voyager/Cargo.toml b/voyager/Cargo.toml index b2389e648c..056d41e2b9 100644 --- a/voyager/Cargo.toml +++ b/voyager/Cargo.toml @@ -15,57 +15,45 @@ test-include = [] workspace = true [dependencies] -axum = { workspace = true, features = ["macros", "tokio", "json"] } -beacon-api = { workspace = true } -bech32 = "0.9.1" -bip32 = { workspace = true, features = ["secp256k1"] } -bitvec = { workspace = true } -chain-utils = { workspace = true } -clap = { workspace = true, features = ["default", "derive", "env", "error-context", "color"] } -contracts = { workspace = true } -crossbeam-queue = { workspace = true, features = ["std"] } -derive_more = { workspace = true } -either = { workspace = true, features = ["serde"] } -enumorph = { workspace = true } -ethers = { workspace = true, features = ["rustls", "ws"] } -frame-support-procedural = { workspace = true } -futures = { workspace = true } -hex = { workspace = true } -hex-literal = { workspace = true } -itertools = "0.13.0" -jsonrpsee = { workspace = true, features = ["client", "full", "tracing"] } -num-bigint = { workspace = true } -pg-queue = { workspace = true } -pin-utils = "0.1.0" -prometheus = "0.13.4" -prost = { workspace = true } -protos = { workspace = true, features = ["proto_full", "client"] } -reqwest = { workspace = true, features = ["tokio-rustls"] } -ripemd = { workspace = true } -schemars.workspace = true -serde = { workspace = true, features = ["derive"] } -serde-utils = { workspace = true } -serde_json = { workspace = true } -sha2 = { workspace = true } -soketto = "0.8.0" -sqlx = { workspace = true, features = ["postgres", "migrate", "tls-rustls"] } -subtle-encoding = { workspace = true, features = ["bech32-preview"] } -tendermint = { workspace = true } -tendermint-proto = { workspace = true } -tendermint-rpc = { workspace = true, features = ["http-client", "websocket-client"] } -thiserror = { workspace = true } -tikv-jemallocator = "0.5" -tokio = { workspace = true, features = ["macros"] } -tokio-stream = { workspace = true } -tokio-util = "0.7.9" -tonic = { workspace = true, features = ["transport", "tls", "tls-roots", "tls-webpki-roots"] } -tracing = { workspace = true, features = ["max_level_trace"] } -tracing-futures = { version = "0.2.5", features = ["futures-03"] } -tracing-subscriber = { workspace = true, features = ["env-filter", "json"] } -typenum = { workspace = true } -unionlabs = { workspace = true, features = ["ethabi"] } -voyager-message = { workspace = true } -voyager-vm = { workspace = true } +axum = { workspace = true, features = ["macros", "tokio", "json"] } +bech32 = "0.9.1" +bip32 = { workspace = true, features = ["secp256k1"] } +bitvec = { workspace = true } +clap = { workspace = true, features = ["default", "derive", "env", "error-context", "color"] } +crossbeam-queue = { workspace = true, features = ["std"] } +derive_more = { workspace = true } +either = { workspace = true, features = ["serde"] } +enumorph = { workspace = true } +futures = { workspace = true } +hex = { workspace = true } +hex-literal = { workspace = true } +itertools = "0.13.0" +jsonrpsee = { workspace = true, features = ["client", "full", "tracing"] } +num-bigint = { workspace = true } +pg-queue = { workspace = true } +pin-utils = "0.1.0" +prometheus = "0.13.4" +prost = { workspace = true } +reqwest = { workspace = true, features = ["tokio-rustls", "json"] } +schemars = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde-utils = { workspace = true } +serde_json = { workspace = true } +sha2 = { workspace = true } +sqlx = { workspace = true, features = ["postgres", "migrate", "tls-rustls"] } +subtle-encoding = { workspace = true, features = ["bech32-preview"] } +thiserror = { workspace = true } +tikv-jemallocator = "0.5" +tokio = { workspace = true, features = ["macros"] } +tokio-stream = { workspace = true } +tokio-util = "0.7.9" +tonic = { workspace = true, features = ["transport", "tls", "tls-roots", "tls-webpki-roots"] } +tracing = { workspace = true, features = ["max_level_trace"] } +tracing-futures = { version = "0.2.5", features = ["futures-03"] } +tracing-subscriber = { workspace = true, features = ["env-filter", "json"] } +unionlabs = { workspace = true, features = ["ethabi"] } +voyager-message = { workspace = true } +voyager-vm = { workspace = true } [features] default = [] diff --git a/voyager/modules/chain/cosmos-sdk/Cargo.toml b/voyager/modules/chain/cosmos-sdk/Cargo.toml index c97efd8eba..006dc3bb1d 100644 --- a/voyager/modules/chain/cosmos-sdk/Cargo.toml +++ b/voyager/modules/chain/cosmos-sdk/Cargo.toml @@ -9,6 +9,7 @@ cometbft-rpc = { workspace = true } dashmap = { workspace = true } enumorph = { workspace = true } futures = { workspace = true } +itertools = "0.13.0" jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] } macros = { workspace = true } prost = { workspace = true } diff --git a/voyager/modules/chain/cosmos-sdk/src/main.rs b/voyager/modules/chain/cosmos-sdk/src/main.rs index 533ac68fea..b7cbb0b27a 100644 --- a/voyager/modules/chain/cosmos-sdk/src/main.rs +++ b/voyager/modules/chain/cosmos-sdk/src/main.rs @@ -1,13 +1,20 @@ // #![warn(clippy::unwrap_used)] use std::{ + collections::HashMap, error::Error, fmt::{Debug, Display}, - num::ParseIntError, + num::{NonZeroU64, ParseIntError}, sync::Arc, }; +use clap::{builder::TypedValueParser, value_parser}; use dashmap::DashMap; +use futures::{ + stream::{self, FuturesUnordered}, + StreamExt, TryStreamExt, +}; +use itertools::Itertools; use jsonrpsee::{ core::{async_trait, RpcResult}, types::{ErrorObject, ErrorObjectOwned}, @@ -26,21 +33,29 @@ use unionlabs::{ }, ics24::{ AcknowledgementPath, ChannelEndPath, ClientConsensusStatePath, ClientStatePath, - CommitmentPath, ConnectionPath, IbcPath, NextClientSequencePath, - NextConnectionSequencePath, NextSequenceAckPath, NextSequenceRecvPath, - NextSequenceSendPath, Path, ReceiptPath, + CommitmentPath, ConnectionPath, NextClientSequencePath, NextConnectionSequencePath, + NextSequenceAckPath, NextSequenceRecvPath, NextSequenceSendPath, Path, ReceiptPath, }, - id::ClientId, - parse_wasm_client_type, ErrorReporter, WasmClientType, + id::{ChannelId, ClientId, ConnectionId, PortId}, + parse_wasm_client_type, + tendermint::abci::response_query::ResponseQuery, + ErrorReporter, WasmClientType, }; use voyager_message::{ - core::{ChainId, ClientInfo, ClientType, IbcGo08WasmClientMetadata, IbcInterface}, + core::{ + ChainId, ClientInfo, ClientType, IbcGo08WasmClientMetadata, IbcInterface, IbcStoreFormat, + }, into_value, module::{ChainModuleInfo, ChainModuleServer, RawClientState}, - run_chain_module_server, ChainModule, FATAL_JSONRPC_ERROR_CODE, + rpc::{ChannelInfo, ConnectionInfo}, + run_chain_module_server, + valuable::Valuable, + ChainModule, FATAL_JSONRPC_ERROR_CODE, }; use voyager_vm::BoxDynError; +const IBC_STORE_PATH: &str = "store/ibc/key"; + #[tokio::main(flavor = "multi_thread")] async fn main() { run_chain_module_server::().await @@ -50,6 +65,10 @@ async fn main() { pub enum Cmd { ChainId, LatestHeight, + PrefixOfClientId { + #[arg(value_parser = value_parser!(u32).map(ClientId::new))] + client_id: ClientId, + }, } #[derive(Debug, Clone)] @@ -106,10 +125,7 @@ impl ChainModule for Module { impl Module { #[must_use] pub fn make_height(&self, height: u64) -> Height { - Height { - revision_number: self.chain_revision, - revision_height: height, - } + Height::new_with_revision(self.chain_revision, height) } async fn client_type_of_checksum(&self, checksum: H256) -> RpcResult> { @@ -153,31 +169,137 @@ impl Module { .data; match parse_wasm_client_type(bz) { - Ok(Some(ty)) => { + Some(ty) => { info!( %checksum, ?ty, "parsed checksum" ); + let ty = match &*ty { + "EthereumMinimal" => WasmClientType::EthereumMinimal, + "EthereumMainnet" => WasmClientType::EthereumMainnet, + "Cometbls" => WasmClientType::Cometbls, + "Tendermint" => WasmClientType::Tendermint, + "Scroll" => WasmClientType::Scroll, + "Arbitrum" => WasmClientType::Arbitrum, + "Linea" => WasmClientType::Linea, + // TODO: Rename to beacon-kit + "Berachain" => WasmClientType::Berachain, + "EvmInCosmos" => WasmClientType::EvmInCosmos, + "Movement" => WasmClientType::Movement, + _ => { + warn!("unknown wasm client type `{ty}` for checksum {checksum}"); + return Ok(None); + } + }; + self.checksum_cache.insert(checksum, ty); Ok(Some(ty)) } - Ok(None) => Ok(None), - Err(err) => { - error!( - %checksum, - %err, - "unable to parse wasm client type" - ); - - Ok(None) - } + None => Ok(None), } } - #[instrument(skip_all, fields(%client_id))] + async fn prefix_of_client_id(&self, client_id: &ClientId) -> RpcResult<&'static str> { + // TODO: Make this a config param + const KNOWN_PREFIXES: &[&str] = &["07-tendermint", "08-wasm"]; + + KNOWN_PREFIXES + .iter() + .map(move |prefix| { + let client_id = client_id.clone(); + async move { + protos::ibc::core::client::v1::query_client::QueryClient::connect( + self.grpc_url.clone(), + ) + .await + .map_err(rpc_error( + "error connecting to grpc server", + Some(json!({ "client_id": client_id })), + ))? + .client_state(protos::ibc::core::client::v1::QueryClientStateRequest { + // NOTE: We assume this is a wasm client if we're fetching the checksum + client_id: client_id.to_string_prefixed("08-wasm"), + }) + .await + .map_err(rpc_error( + "error querying client state", + Some(json!({ "client_id": client_id })), + ))? + .into_inner() + .client_state + .ok_or_else(|| { + // lol + rpc_error( + "error fetching client state", + Some(json!({ "client_id": client_id })), + )(&*Box::::from( + "client state field is empty", + )) + }) + .map(|_| prefix) + } + }) + .collect::>() + .try_collect::>() + .await? + .into_iter() + .exactly_one() + .map_err(|e| { + ErrorObject::owned( + FATAL_JSONRPC_ERROR_CODE, + format!("error fetching prefix of client id: {e}"), + Some(json!({ + "found_prefixes": e.collect::>() + })), + ) + }) + } + + async fn port_id_of_channel_id(&self, channel_id: &ChannelId) -> RpcResult { + let client = protos::ibc::core::channel::v1::query_client::QueryClient::connect( + self.grpc_url.clone(), + ) + .await + .map_err(rpc_error("error connecting to grpc server", None))?; + + let all = stream::unfold((client, None), |(mut client, page)| async move { + let response = client + .channels(protos::ibc::core::channel::v1::QueryChannelsRequest { pagination: page }) + .await + .unwrap() + .into_inner(); + + let channels = response.channels; + let page = response.pagination; + + Some(( + channels + .into_iter() + .map(|channel| (channel.channel_id, channel.port_id)), + ( + client, + page.map(|page| protos::cosmos::base::query::v1beta1::PageRequest { + key: page.next_key, + ..Default::default() + }), + ), + )) + }) + .flat_map(stream::iter) + .collect::>() + .await; + + Ok(all + .get(&channel_id.to_string_prefixed()) + .unwrap() + .parse() + .unwrap()) + } + + #[instrument(skip_all, fields(client_id = client_id.as_value()))] async fn checksum_of_client_id(&self, client_id: ClientId) -> RpcResult { type WasmClientState = protos::ibc::lightclients::wasm::v1::ClientState; @@ -190,7 +312,8 @@ impl Module { Some(json!({ "client_id": client_id })), ))? .client_state(protos::ibc::core::client::v1::QueryClientStateRequest { - client_id: client_id.to_string(), + // NOTE: We assume this is a wasm client if we're fetching the checksum + client_id: client_id.to_string_prefixed("08-wasm"), }) .await .map_err(rpc_error( @@ -286,6 +409,27 @@ impl Module { Ok(self.make_height(height)) } + + async fn abci_query(&self, path_string: &str, height: Height) -> RpcResult { + self.tm_client + .abci_query( + IBC_STORE_PATH, + &path_string, + Some( + i64::try_from(height.height()) + .expect("should be fine") + .try_into() + .expect("invalid height"), + ), + false, + ) + .await + .map_err(rpc_error( + format_args!("error fetching abci query"), + Some(json!({ "height": height, "path": path_string })), + )) + .map(|response| response.response) + } } #[derive(Debug, thiserror::Error)] @@ -360,13 +504,15 @@ impl ChainModuleServer for Module { #[instrument(skip_all, fields(chain_id = %self.chain_id))] async fn client_info(&self, _: &Extensions, client_id: ClientId) -> RpcResult { - match client_id.to_string().rsplit_once('-') { - Some(("07-tendermint", _)) => Ok(ClientInfo { + let prefix = self.prefix_of_client_id(&client_id).await?; + + match prefix { + "07-tendermint" => Ok(ClientInfo { client_type: ClientType::new(ClientType::TENDERMINT), ibc_interface: IbcInterface::new(IbcInterface::IBC_GO_V8_NATIVE), metadata: Default::default(), }), - Some(("08-wasm", _)) => { + "08-wasm" => { let checksum = self.checksum_of_client_id(client_id.clone()).await?; Ok(ClientInfo { @@ -390,13 +536,16 @@ impl ChainModuleServer for Module { WasmClientType::EvmInCosmos => todo!(), }, None => { - warn!(%client_id, "unknown client type for 08-wasm client"); + warn!( + client_id = client_id.as_value(), + "unknown client type for 08-wasm client" + ); // this early return is kind of dirty but it works return Err(ErrorObject::owned( -1, "unknown client type for 08-wasm client", Some(json!({ - "client_id": client_id.to_string() + "client_id": client_id.to_string_prefixed(prefix) })), )); } @@ -407,165 +556,321 @@ impl ChainModuleServer for Module { } _ => Err(ErrorObject::owned( -1, - format!("unknown client type (client id `{client_id}`)"), + format!( + "unknown client type (prefix `{prefix}`, id {})", + client_id.id() + ), Some(json!({ - "client_id": client_id.to_string() + "client_id": client_id })), )), } } - #[instrument(skip_all, fields(chain_id = %self.chain_id))] - async fn query_ibc_state(&self, _: &Extensions, at: Height, path: Path) -> RpcResult { - const IBC_STORE_PATH: &str = "store/ibc/key"; + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, client_id = client_id.as_value()))] + async fn query_client_state( + &self, + _: &Extensions, + height: Height, + client_id: ClientId, + ) -> RpcResult>> { + let prefix = self.prefix_of_client_id(&client_id).await?; + let path_string = ClientStatePath { client_id }.ics24_commitment_path(prefix); - let path_string = path.to_string(); + let query_result = self.abci_query(&path_string, height).await?; - let error_data = || Some(json!({ "height": at, "path": path })); + Ok(Hex(query_result.value)) + } - let query_result = self - .tm_client - .abci_query( - IBC_STORE_PATH, - &path_string, - Some( - i64::try_from(at.revision_height) - .expect("should be fine") - .try_into() - .expect("invalid height"), - ), - false, + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, client_id = client_id.as_value(), %trusted_height))] + async fn query_client_consensus_state( + &self, + _: &Extensions, + height: Height, + client_id: ClientId, + trusted_height: Height, + ) -> RpcResult>> { + let prefix = self.prefix_of_client_id(&client_id).await?; + let path_string = ClientConsensusStatePath { + client_id, + height: trusted_height, + } + .ics24_commitment_path(prefix); + + let query_result = self.abci_query(&path_string, height).await?; + + Ok(Hex(query_result.value)) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, connection_id = connection_id.as_value()))] + async fn query_connection( + &self, + _: &Extensions, + height: Height, + connection_id: ConnectionId, + ) -> RpcResult> { + let path_string = ConnectionPath { connection_id }.ics24_commitment_path(); + + let query_result = self.abci_query(&path_string, height).await?; + + Ok(if query_result.value.is_empty() { + None + } else { + Some( + ConnectionEnd::decode_as::(&query_result.value) + .map_err(fatal_rpc_error("error decoding connection end", None))?, ) - .await - .map_err(rpc_error( - format_args!("error fetching abci query"), - error_data(), - ))? - .response; + }) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_channel( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult> { + let port_id = self.port_id_of_channel_id(&channel_id).await?; + let path_string = ChannelEndPath { channel_id }.ics24_commitment_path(&port_id); + + let query_result = self.abci_query(&path_string, height).await?; + + Ok(if query_result.value.is_empty() { + None + } else { + let channel = Channel::decode_as::(&query_result.value) + .map_err(fatal_rpc_error("error decoding channel end", None))?; + Some(ChannelInfo { + port_id, + state: channel.state, + ordering: channel.ordering, + counterparty_channel_id: channel.counterparty.channel_id, + connection_hops: channel.connection_hops, + version: channel.version, + }) + }) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value(), %sequence))] + async fn query_commitment( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult> { + let port_id = self.port_id_of_channel_id(&channel_id).await?; + let path_string = CommitmentPath { + channel_id, + sequence, + } + .ics24_commitment_path(&port_id); + + let query_result = self.abci_query(&path_string, height).await?; + + Ok(if query_result.value.is_empty() { + None + } else { + Some( + H256::try_from(query_result.value) + .map_err(fatal_rpc_error("error decoding commitment", None))?, + ) + }) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value(), %sequence))] + async fn query_acknowledgement( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult> { + let port_id = self.port_id_of_channel_id(&channel_id).await?; + let path_string = AcknowledgementPath { + channel_id, + sequence, + } + .ics24_commitment_path(&port_id); - // NOTE: At this point, we assume that if the node has given us a response that the data contained within said response is fully reflective of the actual state on-chain, and as such it is a fatal error if we fail to decode it + let query_result = self.abci_query(&path_string, height).await?; - type ValueOf = ::Value; + Ok(if query_result.value.is_empty() { + None + } else { + Some(H256::try_from(query_result.value).map_err(fatal_rpc_error( + "error decoding acknowledgement commitment", + None, + ))?) + }) + } - Ok(match path { - Path::ClientState(_) => into_value::>(Hex(query_result.value)), - Path::ClientConsensusState(_) => { - into_value::>(Hex(query_result.value)) + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value(), %sequence))] + async fn query_receipt( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult { + let port_id = self.port_id_of_channel_id(&channel_id).await?; + let path_string = ReceiptPath { + channel_id, + sequence, + } + .ics24_commitment_path(&port_id); + + let query_result = self.abci_query(&path_string, height).await?; + + Ok(match query_result.value[..] { + [] => false, + [1] => true, + ref invalid => { + return Err(fatal_rpc_error("error decoding receipt", None)(format!( + "value is neither empty nor the single byte 0x01, found {}", + serde_utils::to_hex(invalid) + ))) } - Path::Connection(_) => { - into_value::>(if query_result.value.is_empty() { - None - } else { - Some( - ConnectionEnd::decode_as::(&query_result.value).map_err( - fatal_rpc_error("error decoding connection end", error_data()), - )?, - ) - }) + }) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_next_sequence_send( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult { + let port_id = self.port_id_of_channel_id(&channel_id).await?; + let path_string = NextSequenceSendPath { channel_id }.ics24_commitment_path(&port_id); + + let query_result = self.abci_query(&path_string, height).await?; + + Ok(u64::from_be_bytes( + *::try_from(query_result.value) + .map_err(fatal_rpc_error("error decoding next_sequence_send", None))? + .get(), + )) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_next_sequence_recv( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult { + let port_id = self.port_id_of_channel_id(&channel_id).await?; + let path_string = NextSequenceRecvPath { channel_id }.ics24_commitment_path(&port_id); + + let query_result = self.abci_query(&path_string, height).await?; + + Ok(u64::from_be_bytes( + *::try_from(query_result.value) + .map_err(fatal_rpc_error("error decoding next_sequence_recv", None))? + .get(), + )) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_next_sequence_ack( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult { + let port_id = self.port_id_of_channel_id(&channel_id).await?; + let path_string = NextSequenceAckPath { channel_id }.ics24_commitment_path(&port_id); + + let query_result = self.abci_query(&path_string, height).await?; + + Ok(u64::from_be_bytes( + *::try_from(query_result.value) + .map_err(fatal_rpc_error("error decoding next_sequence_ack", None))? + .get(), + )) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height))] + async fn query_next_connection_sequence( + &self, + _: &Extensions, + height: Height, + ) -> RpcResult { + let path_string = NextConnectionSequencePath {}.ics24_commitment_path(); + + let query_result = self.abci_query(&path_string, height).await?; + + Ok(u64::from_be_bytes( + *::try_from(query_result.value) + .map_err(fatal_rpc_error( + "error decoding next_connection_sequence", + None, + ))? + .get(), + )) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height))] + async fn query_next_client_sequence(&self, _: &Extensions, height: Height) -> RpcResult { + let path_string = NextClientSequencePath {}.ics24_commitment_path(); + + let query_result = self.abci_query(&path_string, height).await?; + + Ok(u64::from_be_bytes( + *::try_from(query_result.value) + .map_err(fatal_rpc_error("error decoding next_client_sequence", None))? + .get(), + )) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id))] + async fn query_ibc_proof( + &self, + _: &Extensions, + at: Height, + path: Path, + ibc_store_format: IbcStoreFormat<'static>, + ) -> RpcResult { + let path_string = match &path { + Path::ClientState(path) => { + path.ics24_commitment_path(self.prefix_of_client_id(&path.client_id).await?) } - Path::ChannelEnd(_) => { - into_value::>(if query_result.value.is_empty() { - None - } else { - Some( - Channel::decode_as::(&query_result.value) - .map_err(fatal_rpc_error("error decoding channel end", error_data()))?, - ) - }) + Path::ClientConsensusState(path) => { + path.ics24_commitment_path(self.prefix_of_client_id(&path.client_id).await?) } - Path::Commitment(_) => { - into_value::>(if query_result.value.is_empty() { - None - } else { - Some( - H256::try_from(query_result.value) - .map_err(fatal_rpc_error("error decoding commitment", error_data()))?, - ) - }) + Path::Connection(path) => path.ics24_commitment_path(), + Path::ChannelEnd(path) => { + let port_id = self.port_id_of_channel_id(&path.channel_id).await?; + path.ics24_commitment_path(&port_id) } - Path::Acknowledgement(_) => { - into_value::>(if query_result.value.is_empty() { - None - } else { - Some(H256::try_from(query_result.value).map_err(fatal_rpc_error( - "error decoding acknowledgement commitment", - error_data(), - ))?) - }) + Path::Commitment(path) => { + let port_id = self.port_id_of_channel_id(&path.channel_id).await?; + path.ics24_commitment_path(&port_id) } - Path::Receipt(_) => into_value::>(match query_result.value[..] { - [] => false, - [1] => true, - ref invalid => { - return Err(fatal_rpc_error("error decoding receipt", error_data())( - format!( - "value is neither empty nor the single byte 0x01, found {}", - serde_utils::to_hex(invalid) - ), - )) - } - }), - // NOTE: For these branches, we use H64 as a mildly hacky way to have a better error message (since `<[T; N] as TryFrom>>::Error = Vec`) - Path::NextSequenceSend(_) => { - into_value::>(u64::from_be_bytes( - *::try_from(query_result.value) - .map_err(fatal_rpc_error( - "error decoding next_sequence_send", - error_data(), - ))? - .get(), - )) + Path::Acknowledgement(path) => { + let port_id = self.port_id_of_channel_id(&path.channel_id).await?; + path.ics24_commitment_path(&port_id) } - Path::NextSequenceRecv(_) => { - into_value::>(u64::from_be_bytes( - *::try_from(query_result.value) - .map_err(fatal_rpc_error( - "error decoding next_sequence_recv", - error_data(), - ))? - .get(), - )) + Path::Receipt(path) => { + let port_id = self.port_id_of_channel_id(&path.channel_id).await?; + path.ics24_commitment_path(&port_id) } - Path::NextSequenceAck(_) => { - into_value::>(u64::from_be_bytes( - *::try_from(query_result.value) - .map_err(fatal_rpc_error( - "error decoding next_sequence_ack", - error_data(), - ))? - .get(), - )) + Path::NextSequenceSend(path) => { + let port_id = self.port_id_of_channel_id(&path.channel_id).await?; + path.ics24_commitment_path(&port_id) } - Path::NextConnectionSequence(_) => { - into_value::>(u64::from_be_bytes( - *::try_from(query_result.value) - .map_err(fatal_rpc_error( - "error decoding next_connection_sequence", - error_data(), - ))? - .get(), - )) + Path::NextSequenceRecv(path) => { + let port_id = self.port_id_of_channel_id(&path.channel_id).await?; + path.ics24_commitment_path(&port_id) } - Path::NextClientSequence(_) => { - into_value::>(u64::from_be_bytes( - *::try_from(query_result.value) - .map_err(fatal_rpc_error( - "error decoding next_client_sequence", - error_data(), - ))? - .get(), - )) + Path::NextSequenceAck(path) => { + let port_id = self.port_id_of_channel_id(&path.channel_id).await?; + path.ics24_commitment_path(&port_id) } - }) - } - - #[instrument(skip_all, fields(chain_id = %self.chain_id))] - async fn query_ibc_proof(&self, _: &Extensions, at: Height, path: Path) -> RpcResult { - // TODO: This is also in the fn above, move this to somewhere more appropriate (chain-utils perhaps?) - - const IBC_STORE_PATH: &str = "store/ibc/key"; - - let path_string = path.to_string(); + Path::NextConnectionSequence(path) => path.ics24_commitment_path(), + Path::NextClientSequence(path) => path.ics24_commitment_path(), + }; let query_result = self .tm_client @@ -575,7 +880,7 @@ impl ChainModuleServer for Module { // a proof at height H is provable at height H + 1 // we assume that the height passed in to this function is the intended height to prove against, thus we have to query the height - 1 Some( - (i64::try_from(at.revision_height).expect("should be fine") - 1) + (i64::try_from(at.height()).expect("should be fine") - 1) .try_into() .expect("invalid height"), ), @@ -613,32 +918,34 @@ impl ChainModuleServer for Module { e: &Extensions, client_id: ClientId, ) -> RpcResult> { - let height = self.query_latest_height(e).await?; - - let client_state = serde_json::from_value::>>( - self.query_ibc_state( - e, - height, - ClientStatePath { - client_id: client_id.clone(), - } - .into(), - ) - .await?, - ) - .expect("infallible"); - - let ClientInfo { - client_type, - ibc_interface, - metadata: _, - } = self.client_info(e, client_id.clone()).await?; - - Ok(RawClientState { - client_type, - ibc_interface, - bytes: client_state.0.into(), - }) + // let height = self.query_latest_height(e).await?; + + // let client_state = serde_json::from_value::>>( + // self.query_ibc_state( + // e, + // height, + // ClientStatePath { + // client_id: client_id.clone(), + // } + // .into(), + // ) + // .await?, + // ) + // .expect("infallible"); + + // let ClientInfo { + // client_type, + // ibc_interface, + // metadata: _, + // } = self.client_info(e, client_id.clone()).await?; + + // Ok(RawClientState { + // client_type, + // ibc_interface, + // bytes: client_state.0.into(), + // }) + + todo!() } } diff --git a/voyager/modules/chain/ethereum/Cargo.toml b/voyager/modules/chain/ethereum/Cargo.toml index a765dd19bc..a7ccb5c85c 100644 --- a/voyager/modules/chain/ethereum/Cargo.toml +++ b/voyager/modules/chain/ethereum/Cargo.toml @@ -4,12 +4,11 @@ name = "voyager-chain-module-ethereum" version = "0.1.0" [dependencies] +alloy = { workspace = true } beacon-api = { workspace = true } -chain-utils = { workspace = true } -contracts = { workspace = true, features = ["providers"] } enumorph = { workspace = true } -ethers = { workspace = true, features = ["rustls", "ws"] } futures = { workspace = true } +ibc-solidity = { workspace = true } jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] } macros = { workspace = true } serde = { workspace = true, features = ["derive"] } @@ -20,6 +19,6 @@ thiserror = { workspace = true } tokio = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } -unionlabs = { workspace = true } +unionlabs = { workspace = true, features = ["serde", "valuable", "ethabi"] } voyager-message = { workspace = true } voyager-vm = { workspace = true } diff --git a/voyager/modules/chain/ethereum/src/main.rs b/voyager/modules/chain/ethereum/src/main.rs index da660fb3b5..ff0d06834a 100644 --- a/voyager/modules/chain/ethereum/src/main.rs +++ b/voyager/modules/chain/ethereum/src/main.rs @@ -1,11 +1,16 @@ // #![warn(clippy::unwrap_used)] // oh boy this will be a lot of work -use std::sync::Arc; +use std::{num::NonZeroU64, sync::Arc}; +use alloy::{ + providers::{Provider, ProviderBuilder, RootProvider}, + transports::BoxTransport, +}; use beacon_api::client::BeaconApiClient; -use chain_utils::ethereum::IbcHandlerExt; -use contracts::ibc_handler::IBCHandler; -use ethers::providers::{Middleware, Provider, Ws}; +use ibc_solidity::ibc::{ + ChannelOrder, ChannelState, ConnectionState, ILightClient, + Ibc::{self, IbcInstance}, +}; use jsonrpsee::{ core::{async_trait, RpcResult}, types::ErrorObject, @@ -13,20 +18,31 @@ use jsonrpsee::{ }; use serde::{Deserialize, Serialize}; use serde_json::Value; +use serde_utils::Hex; use tracing::{debug, instrument}; use unionlabs::{ ethereum::{ibc_commitment_key, IBC_HANDLER_COMMITMENTS_SLOT}, - hash::H160, - ibc::{core::client::height::Height, lightclients::ethereum::storage_proof::StorageProof}, - ics24::{ClientStatePath, Path}, - id::ClientId, + hash::{H160, H256}, + ibc::{ + core::{ + channel::{self, channel::Channel, order::Order}, + client::height::Height, + connection::{self, connection_end::ConnectionEnd, version::Version}, + }, + lightclients::ethereum::storage_proof::StorageProof, + }, + ics24::{ClientStatePath, CommitmentPath, Path, ReceiptPath}, + id::{ChannelId, ClientId, ConnectionId, PortId}, uint::U256, ErrorReporter, }; use voyager_message::{ - core::{ChainId, ClientInfo, ClientType, IbcInterface}, + core::{ChainId, ClientInfo, ClientType, IbcInterface, IbcStoreFormat}, module::{ChainModuleInfo, ChainModuleServer, RawClientState}, - run_chain_module_server, ChainModule, + rpc::{ChannelInfo, ConnectionInfo}, + run_chain_module_server, + valuable::Valuable, + ChainModule, }; use voyager_vm::BoxDynError; @@ -43,7 +59,7 @@ pub struct Module { pub ibc_handler_address: H160, - pub provider: Provider, + pub provider: RootProvider, pub beacon_api_client: BeaconApiClient, } @@ -63,14 +79,16 @@ impl ChainModule for Module { type Config = Config; async fn new(config: Self::Config, info: ChainModuleInfo) -> Result { - let provider = Provider::new(Ws::connect(config.eth_rpc_api).await?); + let provider = ProviderBuilder::new() + .on_builtin(&config.eth_rpc_api) + .await?; - let chain_id = provider.get_chainid().await?; + let chain_id = provider.get_chain_id().await?; - info.ensure_chain_id(U256(chain_id).to_string())?; + info.ensure_chain_id(chain_id.to_string())?; Ok(Module { - chain_id: ChainId::new(U256(chain_id).to_string()), + chain_id: ChainId::new(chain_id.to_string()), ibc_handler_address: config.ibc_handler_address, provider, beacon_api_client: BeaconApiClient::new(config.eth_beacon_rpc_api).await?, @@ -79,29 +97,13 @@ impl ChainModule for Module { } impl Module { - pub async fn new(config: Config) -> Result { - let provider = Provider::new(Ws::connect(config.eth_rpc_api).await?); - - let chain_id = provider.get_chainid().await?; - - Ok(Self { - chain_id: ChainId::new(U256(chain_id).to_string()), - ibc_handler_address: config.ibc_handler_address, - provider, - beacon_api_client: BeaconApiClient::new(config.eth_beacon_rpc_api).await?, - }) - } - #[must_use] pub fn make_height(&self, height: u64) -> Height { - Height { - revision_number: ETHEREUM_REVISION_NUMBER, - revision_height: height, - } + Height::new(height) } - fn ibc_handler(&self) -> IBCHandler> { - IBCHandler::new(self.ibc_handler_address, Arc::new(self.provider.clone())) + fn ibc_handler(&self) -> IbcInstance> { + Ibc::new(self.ibc_handler_address.get().into(), self.provider.clone()) } #[instrument(skip(self))] @@ -116,100 +118,6 @@ impl Module { execution_height } - - #[instrument(skip_all, fields(%path, %height))] - pub async fn fetch_ibc_state(&self, path: Path, height: Height) -> Result { - let execution_height = self - .execution_height_of_beacon_slot(height.revision_height) - .await; - - Ok(match path { - Path::ClientState(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::ClientConsensusState(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::Connection(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::ChannelEnd(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::Commitment(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::Acknowledgement(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::Receipt(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::NextSequenceSend(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::NextSequenceRecv(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::NextSequenceAck(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::NextConnectionSequence(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - Path::NextClientSequence(path) => serde_json::to_value( - self.ibc_handler() - .ibc_state_read(execution_height, path.clone()) - .await - .unwrap(), - ) - .unwrap(), - }) - } } #[async_trait] @@ -281,44 +189,416 @@ impl ChainModuleServer for Module { #[instrument(skip_all, fields(chain_id = %self.chain_id))] async fn client_info(&self, _: &Extensions, client_id: ClientId) -> RpcResult { + let ibc_handler = self.ibc_handler(); + let client_type = ibc_handler + .clientTypes(client_id.id()) + .call() + .await + .unwrap() + ._0; Ok(ClientInfo { - client_type: ClientType::new( - self.ibc_handler() - .client_types(client_id.to_string()) - .await - .unwrap(), - ), + client_type: ClientType::new(client_type), ibc_interface: IbcInterface::new(IbcInterface::IBC_SOLIDITY), metadata: Default::default(), }) } - #[instrument(skip_all, fields(chain_id = %self.chain_id))] - async fn query_ibc_state(&self, _: &Extensions, at: Height, path: Path) -> RpcResult { - self.fetch_ibc_state(path, at).await.map_err(|err| { - ErrorObject::owned( - -1, - format!("error fetching ibc state: {}", ErrorReporter(&*err)), - None::<()>, + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, client_id = client_id.as_value()))] + async fn query_client_state( + &self, + _: &Extensions, + height: Height, + client_id: ClientId, + ) -> RpcResult>> { + let execution_height = self.execution_height_of_beacon_slot(height.height()).await; + + let ibc_handler = self.ibc_handler(); + + let client_address = ibc_handler + .clientImpls(client_id.id()) + .block(execution_height.into()) + .call() + .await + .map_err(|err| { + ErrorObject::owned( + -1, + format!("error fetching ibc state: {}", ErrorReporter(err)), + None::<()>, + ) + })? + ._0; + + let light_client = ILightClient::new(client_address, self.provider.clone()); + let client_state = light_client + .getClientState(client_id.id()) + .block(execution_height.into()) + .call() + .await + .map_err(|err| { + ErrorObject::owned( + -1, + format!("error fetching ibc state: {}", ErrorReporter(err)), + None::<()>, + ) + })? + ._0 + .0; + + Ok(Hex(client_state.to_vec())) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, client_id = client_id.as_value(), %trusted_height))] + async fn query_client_consensus_state( + &self, + _: &Extensions, + height: Height, + client_id: ClientId, + trusted_height: Height, + ) -> RpcResult>> { + let execution_height = self.execution_height_of_beacon_slot(height.height()).await; + + let ibc_handler = self.ibc_handler(); + + let client_address = ibc_handler + .clientImpls(client_id.id()) + .block(execution_height.into()) + .call() + .await + .map_err(|err| { + ErrorObject::owned( + -1, + format!("error fetching ibc state: {}", ErrorReporter(err)), + None::<()>, + ) + })? + ._0; + + let light_client = ILightClient::new(client_address, self.provider.clone()); + + let consensus_state = light_client + .getConsensusState(client_id.id(), trusted_height.height()) + .block(execution_height.into()) + .call() + .await + .map_err(|err| { + ErrorObject::owned( + -1, + format!("error fetching ibc state: {}", ErrorReporter(err)), + None::<()>, + ) + })? + ._0 + .0; + + Ok(Hex(consensus_state.to_vec())) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, connection_id = connection_id.as_value()))] + async fn query_connection( + &self, + _: &Extensions, + height: Height, + connection_id: ConnectionId, + ) -> RpcResult> { + let execution_height = self.execution_height_of_beacon_slot(height.height()).await; + + let ibc_handler = self.ibc_handler(); + + let raw = ibc_handler + .connections(connection_id.id()) + .block(execution_height.into()) + .call() + .await + .map_err(|err| { + ErrorObject::owned( + -1, + format!("error fetching connection: {}", ErrorReporter(err)), + None::<()>, + ) + })? + ._0; + + Ok(Some(ConnectionInfo { + client_id: ClientId::new(raw.clientId), + versions: vec![Version { + identifier: "1".to_owned(), + features: vec![Order::Ordered, Order::Unordered], + }], + state: match raw.state { + ConnectionState::Unspecified => connection::state::State::UninitializedUnspecified, + ConnectionState::Init => connection::state::State::Init, + ConnectionState::TryOpen => connection::state::State::Tryopen, + ConnectionState::Open => connection::state::State::Open, + _ => todo!(), + }, + counterparty: connection::counterparty::Counterparty { + client_id: ClientId::new(raw.counterparty.clientId), + connection_id: Some(ConnectionId::new(raw.counterparty.connectionId)), + prefix: todo!(), + }, + delay_period: 0, + })) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_channel( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult> { + let execution_height = self.execution_height_of_beacon_slot(height.height()).await; + + let ibc_handler = self.ibc_handler(); + + let raw = ibc_handler + .channels(channel_id.id()) + .block(execution_height.into()) + .call() + .await + .map_err(|err| { + ErrorObject::owned( + -1, + format!("error fetching ibc state: {}", ErrorReporter(err)), + None::<()>, + ) + })? + ._0; + + let port_id = ibc_handler + .channelOwner(channel_id.id()) + .block(execution_height.into()) + .call() + .await + .map_err(|err| { + ErrorObject::owned( + -1, + format!("error fetching ibc state: {}", ErrorReporter(err)), + None::<()>, + ) + })? + ._0; + + Ok(Some(ChannelInfo { + port_id: PortId::new(port_id.to_string()).unwrap(), + state: match raw.state { + ChannelState::Unspecified => channel::state::State::UninitializedUnspecified, + ChannelState::Init => channel::state::State::Init, + ChannelState::TryOpen => channel::state::State::Tryopen, + ChannelState::Open => channel::state::State::Open, + ChannelState::Closed => channel::state::State::Closed, + _ => todo!(), + }, + ordering: match raw.ordering { + ChannelOrder::Unspecified => Order::NoneUnspecified, + ChannelOrder::Unordered => Order::Unordered, + ChannelOrder::Ordered => Order::Ordered, + _ => todo!(), + }, + counterparty_channel_id: Some(ChannelId::new(raw.counterparty.channelId)), + connection_hops: vec![ConnectionId::new(raw.connectionId)], + version: ::from(raw.version).to_string(), + })) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value(), %sequence))] + async fn query_commitment( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult> { + let execution_height = self.execution_height_of_beacon_slot(height.height()).await; + + let ibc_handler = self.ibc_handler(); + + let raw: H256 = ibc_handler + .commitments( + CommitmentPath { + channel_id, + sequence, + } + .commitments_key() + .into(), ) + .block(execution_height.into()) + .call() + .await + .map_err(|err| { + ErrorObject::owned( + -1, + format!("error fetching ibc state: {}", ErrorReporter(err)), + None::<()>, + ) + })? + ._0 + .into(); + + Ok(if raw == ::default() { + None + } else { + Some(raw) }) } - #[instrument(skip_all, fields(chain_id = %self.chain_id))] - async fn query_ibc_proof(&self, _: &Extensions, at: Height, path: Path) -> RpcResult { - let location = ibc_commitment_key(&path.to_string(), IBC_HANDLER_COMMITMENTS_SLOT); + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value(), %sequence))] + async fn query_acknowledgement( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult> { + let execution_height = self.execution_height_of_beacon_slot(height.height()).await; + + let ibc_handler = self.ibc_handler(); + + let raw: H256 = ibc_handler + .commitments( + CommitmentPath { + channel_id, + sequence, + } + .commitments_key() + .into(), + ) + .block(execution_height.into()) + .call() + .await + .map_err(|err| { + ErrorObject::owned( + -1, + format!("error fetching ibc state: {}", ErrorReporter(err)), + None::<()>, + ) + })? + ._0 + .into(); + + Ok(if raw == ::default() { + None + } else { + Some(raw) + }) + } - let execution_height = self - .execution_height_of_beacon_slot(at.revision_height) - .await; + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value(), %sequence))] + async fn query_receipt( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult { + let execution_height = self.execution_height_of_beacon_slot(height.height()).await; + + let ibc_handler = self.ibc_handler(); + + let raw: H256 = ibc_handler + .commitments( + ReceiptPath { + channel_id, + sequence, + } + .commitments_key() + .into(), + ) + .block(execution_height.into()) + .call() + .await + .map_err(|err| { + ErrorObject::owned( + -1, + format!("error fetching ibc state: {}", ErrorReporter(err)), + None::<()>, + ) + })? + ._0 + .into(); + + Ok(raw.get()[0] == 1) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_next_sequence_send( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult { + todo!() + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_next_sequence_recv( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult { + todo!() + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_next_sequence_ack( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult { + todo!() + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height))] + async fn query_next_connection_sequence( + &self, + _: &Extensions, + height: Height, + ) -> RpcResult { + todo!() + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height))] + async fn query_next_client_sequence(&self, _: &Extensions, height: Height) -> RpcResult { + todo!() + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id))] + async fn query_ibc_proof( + &self, + _: &Extensions, + at: Height, + path: Path, + ibc_store_format: IbcStoreFormat<'static>, + ) -> RpcResult { + let location = ibc_commitment_key( + match path { + Path::ClientState(path) => path.commitments_key(), + Path::ClientConsensusState(path) => path.commitments_key(), + Path::Connection(path) => path.commitments_key(), + Path::ChannelEnd(path) => path.commitments_key(), + Path::Commitment(path) => path.commitments_key(), + Path::Acknowledgement(path) => path.commitments_key(), + Path::Receipt(path) => path.commitments_key(), + Path::NextSequenceSend(path) => todo!(), + Path::NextSequenceRecv(path) => todo!(), + Path::NextSequenceAck(path) => todo!(), + Path::NextConnectionSequence(path) => todo!(), + Path::NextClientSequence(path) => todo!(), + }, + IBC_HANDLER_COMMITMENTS_SLOT, + ); + + let execution_height = self.execution_height_of_beacon_slot(at.height()).await; let proof = self .provider .get_proof( - ethers::types::H160::from(self.ibc_handler_address), + self.ibc_handler_address.into(), vec![location.to_be_bytes().into()], - Some(execution_height.into()), ) + .block_id(execution_height.into()) .await .unwrap(); @@ -330,7 +610,7 @@ impl ChainModuleServer for Module { }; let proof = StorageProof { - key: U256::from_be_bytes(proof.key.to_fixed_bytes()), + key: U256::from_be_bytes(proof.key.0 .0), value: proof.value.into(), proof: proof .proof @@ -348,25 +628,27 @@ impl ChainModuleServer for Module { e: &Extensions, client_id: ClientId, ) -> RpcResult> { - let latest_execution_height = self.provider.get_block_number().await.unwrap().as_u64(); - - let ClientInfo { - client_type, - ibc_interface, - metadata: _, - } = self.client_info(e, client_id.clone()).await?; - - Ok(RawClientState { - client_type, - ibc_interface, - bytes: self - .ibc_handler() - .ibc_state_read(latest_execution_height, ClientStatePath { client_id }) - .await - .unwrap() - .0 - .into(), - }) + // let latest_execution_height = self.provider.get_block_number().await.unwrap().as_u64(); + + // let ClientInfo { + // client_type, + // ibc_interface, + // metadata: _, + // } = self.client_info(e, client_id.clone()).await?; + + // Ok(RawClientState { + // client_type, + // ibc_interface, + // bytes: self + // .ibc_handler() + // .ibc_state_read(latest_execution_height, ClientStatePath { client_id }) + // .await + // .unwrap() + // .0 + // .into(), + // }) + + todo!() } } diff --git a/voyager/modules/chain/movement/Cargo.toml b/voyager/modules/chain/movement/Cargo.toml index 4feefb912d..a2b8775ad4 100644 --- a/voyager/modules/chain/movement/Cargo.toml +++ b/voyager/modules/chain/movement/Cargo.toml @@ -30,6 +30,6 @@ thiserror = { workspace = true } tokio = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } -unionlabs = { workspace = true } +unionlabs = { workspace = true, features = ["serde", "valuable", "proto"]} voyager-message = { workspace = true } voyager-vm = { workspace = true } diff --git a/voyager/modules/chain/movement/src/events.rs b/voyager/modules/chain/movement/src/events.rs index 0cc9454b2d..ec9d0a90f0 100644 --- a/voyager/modules/chain/movement/src/events.rs +++ b/voyager/modules/chain/movement/src/events.rs @@ -1,6 +1,6 @@ use aptos_move_ibc::ibc; use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/modules/chain/movement/src/main.rs b/voyager/modules/chain/movement/src/main.rs index b2139bfac6..eaa23fcc28 100644 --- a/voyager/modules/chain/movement/src/main.rs +++ b/voyager/modules/chain/movement/src/main.rs @@ -1,4 +1,4 @@ -use std::fmt::Debug; +use std::{fmt::Debug, num::NonZeroU64}; use aptos_move_ibc::ibc::ClientExt as _; use aptos_rest_client::{aptos_api_types::Address, error::RestError}; @@ -9,7 +9,7 @@ use jsonrpsee::{ Extensions, }; use serde::{Deserialize, Serialize}; -use serde_json::{json, Value}; +use serde_json::Value; use serde_utils::Hex; use tracing::{debug, instrument}; use unionlabs::{ @@ -24,16 +24,19 @@ use unionlabs::{ commitment::merkle_prefix::MerklePrefix, connection::{self, connection_end::ConnectionEnd}, }, - ics24::{ClientStatePath, Path}, - id::ClientId, + ics24::Path, + id::{ChannelId, ClientId, ConnectionId}, uint::U256, ErrorReporter, }; use voyager_message::{ - core::{ChainId, ClientInfo, ClientType, IbcInterface}, + core::{ChainId, ClientInfo}, into_value, module::{ChainModuleInfo, ChainModuleServer, RawClientState}, - run_chain_module_server, ChainModule, + rpc::{ChannelInfo, ConnectionInfo}, + run_chain_module_server, + valuable::Valuable, + ChainModule, }; use voyager_vm::BoxDynError; @@ -98,11 +101,7 @@ impl aptos_move_ibc::ibc::ClientExt for Module { impl Module { #[must_use] pub fn make_height(&self, height: u64) -> Height { - Height { - // TODO: Make this a constant - revision_number: 0, - revision_height: height, - } + Height::new(height) } pub async fn ledger_version_of_height(&self, height: u64) -> u64 { @@ -157,7 +156,7 @@ impl ChainModuleServer for Module { match self .aptos_client - .get_block_by_height(latest_height.revision_height, false) + .get_block_by_height(latest_height.height(), false) .await { Ok(block) => { @@ -177,196 +176,250 @@ impl ChainModuleServer for Module { #[instrument(skip_all, fields(chain_id = %self.chain_id))] async fn client_info(&self, _: &Extensions, client_id: ClientId) -> RpcResult { - match client_id.to_string().rsplit_once('-') { - Some(("cometbls", _)) => Ok(ClientInfo { - client_type: ClientType::new(ClientType::COMETBLS_GROTH16), - ibc_interface: IbcInterface::new(IbcInterface::IBC_MOVE_APTOS), - metadata: Default::default(), - }), - _ => Err(ErrorObject::owned( - -1, - format!("unknown client type (client id `{client_id}`)"), - Some(json!({ - "client_id": client_id.to_string() - })), - )), - } + // match client_id.to_string().rsplit_once('-') { + // Some(("cometbls", _)) => Ok(ClientInfo { + // client_type: ClientType::new(ClientType::COMETBLS_GROTH16), + // ibc_interface: IbcInterface::new(IbcInterface::IBC_MOVE_APTOS), + // metadata: Default::default(), + // }), + // _ => Err(ErrorObject::owned( + // -1, + // format!("unknown client type (client id `{client_id}`)"), + // Some(json!({ + // "client_id": client_id.to_string() + // })), + // )), + // } + + todo!() } - #[instrument(skip_all, fields(chain_id = %self.chain_id, %at, %path))] - async fn query_ibc_state(&self, _: &Extensions, at: Height, path: Path) -> RpcResult { - let ledger_version = self.ledger_version_of_height(at.revision_height).await; - - Ok(match path { - Path::ClientState(path) => { - let client_state_bytes = self - .client_state( - self.ibc_handler_address.into(), - (path.client_id.to_string(),), - Some(ledger_version), - ) - .await - .map_err(rest_error_to_rpc_error)?; - - into_value(client_state_bytes) - } - Path::ClientConsensusState(path) => { - let consensus_state_bytes = self - .consensus_state( - self.ibc_handler_address.into(), - ( - path.client_id.to_string(), - path.height.revision_number, - path.height.revision_height, - ), - Some(ledger_version), - ) - .await - .map_err(rest_error_to_rpc_error)?; - - into_value(consensus_state_bytes) - } - Path::Connection(path) => into_value( - self.get_connection( - self.ibc_handler_address.into(), - (path.connection_id.to_string(),), - Some(ledger_version), - ) - .await - .map_err(rest_error_to_rpc_error)? - .into_option() - .map(convert_connection), - ), - Path::ChannelEnd(path) => into_value( - self.get_channel( - self.ibc_handler_address.into(), - (path.port_id.to_string(), path.channel_id.to_string()), - Some(ledger_version), - ) - .await - .map_err(rest_error_to_rpc_error)? - .into_option() - .map(convert_channel), - ), - Path::Commitment(path) => { - let commitment = self - .get_commitment( - self.ibc_handler_address.into(), - (path.to_string().into_bytes().into(),), - Some(ledger_version), - ) - .await - .map_err(rest_error_to_rpc_error)?; - - into_value(::try_from(commitment.0).unwrap()) - } - Path::Acknowledgement(path) => { - let commitment = self - .get_commitment( - self.ibc_handler_address.into(), - (path.to_string().into_bytes().into(),), - Some(ledger_version), - ) - .await - .map_err(rest_error_to_rpc_error)?; - - into_value(::try_from(commitment.0).unwrap()) - } - Path::Receipt(path) => { - let commitment = self - .get_commitment( - self.ibc_handler_address.into(), - (path.to_string().into_bytes().into(),), - Some(ledger_version), - ) - .await - .map_err(rest_error_to_rpc_error)?; - - into_value(match &commitment.0[..] { - [] => false, - [1] => true, - _ => panic!("not a bool??? {commitment}"), - }) - } - Path::NextSequenceSend(_) => todo!(), - Path::NextSequenceRecv(_) => todo!(), - Path::NextSequenceAck(_) => todo!(), - Path::NextConnectionSequence(_) => todo!(), - Path::NextClientSequence(_) => todo!(), + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, client_id = client_id.as_value()))] + async fn query_client_state( + &self, + _: &Extensions, + height: Height, + client_id: ClientId, + ) -> RpcResult>> { + let ledger_version = self.ledger_version_of_height(height.height()).await; + + let client_state_bytes = self + .client_state( + self.ibc_handler_address.into(), + (client_id.to_string_prefixed(todo!()),), + Some(ledger_version), + ) + .await + .map_err(rest_error_to_rpc_error)? + .0; + + Ok(Hex(client_state_bytes)) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, client_id = client_id.as_value(), %trusted_height))] + async fn query_client_consensus_state( + &self, + _: &Extensions, + height: Height, + client_id: ClientId, + trusted_height: Height, + ) -> RpcResult>> { + let ledger_version = self.ledger_version_of_height(height.height()).await; + let consensus_state_bytes = self + .consensus_state( + self.ibc_handler_address.into(), + ( + client_id.to_string_prefixed(todo!()), + height.revision(), + height.height(), + ), + Some(ledger_version), + ) + .await + .map_err(rest_error_to_rpc_error)? + .0; + + Ok(Hex(consensus_state_bytes)) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, connection_id = connection_id.as_value()))] + async fn query_connection( + &self, + _: &Extensions, + height: Height, + connection_id: ConnectionId, + ) -> RpcResult> { + let ledger_version = self.ledger_version_of_height(height.height()).await; + + Ok(self + .get_connection( + self.ibc_handler_address.into(), + (connection_id.to_string_prefixed(),), + Some(ledger_version), + ) + .await + .map_err(rest_error_to_rpc_error)? + .into_option() + .map(convert_connection)) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_channel( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult> { + let ledger_version = self.ledger_version_of_height(height.height()).await; + + Ok(self + .get_channel( + self.ibc_handler_address.into(), + (port_id.to_string(), channel_id.to_string_prefixed()), + Some(ledger_version), + ) + .await + .map_err(rest_error_to_rpc_error)? + .into_option() + .map(convert_channel) + .map(|channel| ChannelInfo { + port_id: channel.port_id, + state: channel.state, + ordering: channel.ordering, + counterparty_channel_id: channel.counterparty.channel_id, + connection_hops: channel.connection_hops, + version: channel.version, + })) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value(), %sequence))] + async fn query_commitment( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult> { + let ledger_version = self.ledger_version_of_height(height.height()).await; + + let commitment = self + .get_commitment( + self.ibc_handler_address.into(), + (todo!(),), + Some(ledger_version), + ) + .await + .map_err(rest_error_to_rpc_error)?; + + Ok(Some(::try_from(commitment.0).unwrap())) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value(), %sequence))] + async fn query_acknowledgement( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult> { + let ledger_version = self.ledger_version_of_height(height.height()).await; + + let commitment = self + .get_commitment( + self.ibc_handler_address.into(), + (todo!(),), + Some(ledger_version), + ) + .await + .map_err(rest_error_to_rpc_error)?; + + Ok(Some(::try_from(commitment.0).unwrap())) + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value(), %sequence))] + async fn query_receipt( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + sequence: NonZeroU64, + ) -> RpcResult { + let ledger_version = self.ledger_version_of_height(height.height()).await; + + let commitment = self + .get_commitment( + self.ibc_handler_address.into(), + (todo!(),), + Some(ledger_version), + ) + .await + .map_err(rest_error_to_rpc_error)?; + + Ok(match &commitment.0[..] { + [] => false, + [1] => true, + _ => panic!("not a bool??? {commitment}"), }) + } - // self.get_connection(, , ) + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_next_sequence_send( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult { + // let ledger_version = self.ledger_version_of_height(at.height()).await; + todo!() + } - // const IBC_STORE_PATH: &str = "store/ibc/key"; + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_next_sequence_recv( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult { + // let ledger_version = self.ledger_version_of_height(at.height()).await; + todo!() + } - // let path_string = path.to_string(); + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height, channel_id = channel_id.as_value()))] + async fn query_next_sequence_ack( + &self, + _: &Extensions, + height: Height, + channel_id: ChannelId, + ) -> RpcResult { + // let ledger_version = self.ledger_version_of_height(at.height()).await; + todo!() + } - // let query_result = self - // .tm_client - // .abci_query( - // IBC_STORE_PATH, - // &path_string, - // Some( - // i64::try_from(at.revision_height) - // .unwrap() - // .try_into() - // .expect("invalid height"), - // ), - // false, - // ) - // .await - // .unwrap() - // .response; - - // Ok(match path { - // Path::ClientState(_) => serde_json::to_value(Hex(query_result.value)).unwrap(), - // Path::ClientConsensusState(_) => serde_json::to_value(Hex(query_result.value)).unwrap(), - // Path::Connection(_) => serde_json::to_value( - // ConnectionEnd::decode_as::(&query_result.value).unwrap(), - // ) - // .unwrap(), - // Path::ChannelEnd(_) => { - // serde_json::to_value(Channel::decode_as::(&query_result.value).unwrap()) - // .unwrap() - // } - // Path::Commitment(_) => { - // serde_json::to_value(H256::try_from(query_result.value).unwrap()).unwrap() - // } - // Path::Acknowledgement(_) => { - // serde_json::to_value(H256::try_from(query_result.value).unwrap()).unwrap() - // } - // Path::Receipt(_) => serde_json::to_value(match query_result.value[..] { - // [] => false, - // [1] => true, - // ref invalid => panic!("not a bool??? {invalid:?}"), - // }) - // .unwrap(), - // Path::NextSequenceSend(_) => { - // serde_json::to_value(u64::from_be_bytes(query_result.value.try_into().unwrap())) - // .unwrap() - // } - // Path::NextSequenceRecv(_) => { - // serde_json::to_value(u64::from_be_bytes(query_result.value.try_into().unwrap())) - // .unwrap() - // } - // Path::NextSequenceAck(_) => { - // serde_json::to_value(u64::from_be_bytes(query_result.value.try_into().unwrap())) - // .unwrap() - // } - // Path::NextConnectionSequence(_) => { - // serde_json::to_value(u64::from_be_bytes(query_result.value.try_into().unwrap())) - // .unwrap() - // } - // Path::NextClientSequence(_) => { - // serde_json::to_value(u64::from_be_bytes(query_result.value.try_into().unwrap())) - // .unwrap() - // } - // }) + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height))] + async fn query_next_connection_sequence( + &self, + _: &Extensions, + height: Height, + ) -> RpcResult { + // let ledger_version = self.ledger_version_of_height(at.height()).await; + todo!() + } + + #[instrument(skip_all, fields(chain_id = %self.chain_id, %height))] + async fn query_next_client_sequence(&self, _: &Extensions, height: Height) -> RpcResult { + // let ledger_version = self.ledger_version_of_height(at.height()).await; + todo!() } #[instrument(skip_all, fields(chain_id = %self.chain_id))] - async fn query_ibc_proof(&self, _: &Extensions, at: Height, path: Path) -> RpcResult { - let ledger_version = self.ledger_version_of_height(at.revision_height).await; + async fn query_ibc_proof( + &self, + _: &Extensions, + at: Height, + path: Path, + ibc_store_format: IbcStoreFormat<'static>, + ) -> RpcResult { + let ledger_version = self.ledger_version_of_height(at.height()).await; let vault_addr = self .get_vault_addr(self.ibc_handler_address.into(), Some(ledger_version)) @@ -396,7 +449,7 @@ impl ChainModuleServer for Module { // &self.ctx.movement_rpc_url, // address, // hex::encode(bcs::to_bytes(&path.to_string().as_bytes()).expect("won't fail")), - // at.revision_height, + // at.height(), // ).await; Ok(into_value(StorageProof { @@ -414,32 +467,34 @@ impl ChainModuleServer for Module { e: &Extensions, client_id: ClientId, ) -> RpcResult> { - let height = self.query_latest_height(e).await?; - - let client_state = serde_json::from_value::>>( - self.query_ibc_state( - e, - height, - ClientStatePath { - client_id: client_id.clone(), - } - .into(), - ) - .await?, - ) - .unwrap(); - - let ClientInfo { - client_type, - ibc_interface, - metadata: _, - } = self.client_info(e, client_id.clone()).await?; - - Ok(RawClientState { - client_type, - ibc_interface, - bytes: client_state.0.into(), - }) + // let height = self.query_latest_height(e).await?; + + // let client_state = serde_json::from_value::>>( + // self.query_ibc_state( + // e, + // height, + // ClientStatePath { + // client_id: client_id.clone(), + // } + // .into(), + // ) + // .await?, + // ) + // .unwrap(); + + // let ClientInfo { + // client_type, + // ibc_interface, + // metadata: _, + // } = self.client_info(e, client_id.clone()).await?; + + // Ok(RawClientState { + // client_type, + // ibc_interface, + // bytes: client_state.0.into(), + // }) + + todo!() } } @@ -451,7 +506,7 @@ pub fn convert_connection( connection: aptos_move_ibc::connection_end::ConnectionEnd, ) -> ConnectionEnd { ConnectionEnd { - client_id: connection.client_id.parse().unwrap(), + client_id: ClientId::parse_prefixed(&connection.client_id).unwrap().1, versions: connection .versions .into_iter() @@ -467,11 +522,13 @@ pub fn convert_connection( state: connection::state::State::try_from(u8::try_from(connection.state.0).unwrap()) .unwrap(), counterparty: connection::counterparty::Counterparty { - client_id: connection.counterparty.client_id.parse().unwrap(), + client_id: ClientId::parse_prefixed(&connection.counterparty.client_id) + .unwrap() + .1, connection_id: if connection.counterparty.connection_id.is_empty() { None } else { - Some(connection.counterparty.connection_id.parse().unwrap()) + Some(ConnectionId::parse_prefixed(&connection.counterparty.connection_id).unwrap()) }, prefix: MerklePrefix { key_prefix: connection.counterparty.prefix.key_prefix.into(), @@ -487,12 +544,12 @@ pub fn convert_channel(channel: aptos_move_ibc::channel::Channel) -> Channel { ordering: channel.ordering.try_into().unwrap(), counterparty: channel::counterparty::Counterparty { port_id: channel.counterparty.port_id.parse().unwrap(), - channel_id: channel.counterparty.channel_id.parse().unwrap(), + channel_id: Some(ChannelId::parse_prefixed(&channel.counterparty.channel_id).unwrap()), }, connection_hops: channel .connection_hops .into_iter() - .map(|hop| hop.parse().unwrap()) + .map(|hop| ConnectionId::parse_prefixed(&hop).unwrap()) .collect(), version: channel.version, } diff --git a/voyager/modules/client/cometbls/src/main.rs b/voyager/modules/client/cometbls/src/main.rs index 5e6cb970f6..9a3b2d57d7 100644 --- a/voyager/modules/client/cometbls/src/main.rs +++ b/voyager/modules/client/cometbls/src/main.rs @@ -4,7 +4,6 @@ use jsonrpsee::{ types::ErrorObject, Extensions, }; -use macros::model; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; use serde_utils::Hex; @@ -25,6 +24,7 @@ use voyager_message::{ ChainId, ClientStateMeta, ClientType, ConsensusStateMeta, ConsensusType, IbcGo08WasmClientMetadata, IbcInterface, }, + macros::model, module::{ClientModuleInfo, ClientModuleServer}, run_client_module_server, ClientModule, FATAL_JSONRPC_ERROR_CODE, }; @@ -35,8 +35,7 @@ async fn main() { run_client_module_server::().await } -#[model(no_serde)] -#[derive(Copy, Serialize, Deserialize)] +#[derive(Debug, Copy, Serialize, Deserialize)] #[serde(try_from = "String", into = "String")] pub enum SupportedIbcInterface { IbcSolidity, diff --git a/voyager/modules/client/ethereum/Cargo.toml b/voyager/modules/client/ethereum/Cargo.toml index bd1b4709fa..a40eeb16b2 100644 --- a/voyager/modules/client/ethereum/Cargo.toml +++ b/voyager/modules/client/ethereum/Cargo.toml @@ -4,7 +4,6 @@ name = "voyager-client-module-ethereum" version = "0.1.0" [dependencies] -chain-utils = { workspace = true } enumorph = { workspace = true } futures = { workspace = true } jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] } diff --git a/voyager/modules/client/movement/Cargo.toml b/voyager/modules/client/movement/Cargo.toml index 74d0f027e0..ebfda5fc8c 100644 --- a/voyager/modules/client/movement/Cargo.toml +++ b/voyager/modules/client/movement/Cargo.toml @@ -4,7 +4,6 @@ name = "voyager-client-module-movement" version = "0.1.0" [dependencies] -chain-utils = { workspace = true } enumorph = { workspace = true } futures = { workspace = true } jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] } diff --git a/voyager/modules/client/movement/src/main.rs b/voyager/modules/client/movement/src/main.rs index f5ffe351bc..3791773f61 100644 --- a/voyager/modules/client/movement/src/main.rs +++ b/voyager/modules/client/movement/src/main.rs @@ -80,11 +80,8 @@ impl Module { }) } - pub fn make_height(revision_height: u64) -> Height { - Height { - revision_number: 0, // TODO(aeryz): use chain_utils - revision_height, - } + pub fn make_height(height: u64) -> Height { + Height::new(height) } } diff --git a/voyager/modules/client/tendermint/src/main.rs b/voyager/modules/client/tendermint/src/main.rs index 6de1d2617e..782f1a5fe6 100644 --- a/voyager/modules/client/tendermint/src/main.rs +++ b/voyager/modules/client/tendermint/src/main.rs @@ -3,7 +3,7 @@ use jsonrpsee::{ types::ErrorObject, Extensions, }; -use macros::model; +use voyager_message::macros::model; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; use serde_utils::Hex; diff --git a/voyager/modules/consensus/cometbls/src/main.rs b/voyager/modules/consensus/cometbls/src/main.rs index cdeb958d5c..10a5db2758 100644 --- a/voyager/modules/consensus/cometbls/src/main.rs +++ b/voyager/modules/consensus/cometbls/src/main.rs @@ -10,12 +10,12 @@ use jsonrpsee::{ use serde::{Deserialize, Serialize}; use serde_json::Value; use tracing::{error, instrument}; -use unionlabs::{ - ibc::{ - core::{client::height::Height, commitment::merkle_root::MerkleRoot}, - lightclients::cometbls::{client_state::ClientState, consensus_state::ConsensusState}, +use unionlabs::ibc::{ + core::{client::height::Height, commitment::merkle_root::MerkleRoot}, + lightclients::cometbls::{ + client_state::{ClientState, CometblsChainId}, + consensus_state::ConsensusState, }, - traits::Member, }; use voyager_message::{ core::{ChainId, ConsensusType}, @@ -103,7 +103,7 @@ impl ConsensusModuleServer for Module { let commit = self .tm_client - .commit(Some(NonZeroU64::new(height.revision_height).unwrap())) + .commit(Some(NonZeroU64::new(height.height()).unwrap())) .await .unwrap(); @@ -114,25 +114,20 @@ impl ConsensusModuleServer for Module { u64::try_from(params.unbonding_time.clone().unwrap().seconds).unwrap() * 1_000_000_000; Ok(serde_json::to_value(ClientState { - chain_id: self.chain_id.to_string(), + chain_id: CometblsChainId::from_string(self.chain_id.to_string()).unwrap(), trusting_period: unbonding_period * 85 / 100, - unbonding_period, max_clock_drift: (60 * 20) * 1_000_000_000, - frozen_height: Height { - revision_number: 0, - revision_height: 0, - }, - latest_height: Height { - revision_number: self - .chain_id + frozen_height: Height::default(), + latest_height: Height::new_with_revision( + self.chain_id .as_str() .split('-') .last() .unwrap() .parse() .unwrap(), - revision_height: height.inner().try_into().expect("value is >= 0; qed;"), - }, + height.inner().try_into().expect("value is >= 0; qed;"), + ), }) .unwrap()) } @@ -142,7 +137,7 @@ impl ConsensusModuleServer for Module { async fn self_consensus_state(&self, _: &Extensions, height: Height) -> RpcResult { let commit = self .tm_client - .commit(Some(NonZeroU64::new(height.revision_height).unwrap())) + .commit(Some(NonZeroU64::new(height.height()).unwrap())) .await .unwrap(); diff --git a/voyager/modules/consensus/ethereum/Cargo.toml b/voyager/modules/consensus/ethereum/Cargo.toml index fd4d708048..00ebe22f29 100644 --- a/voyager/modules/consensus/ethereum/Cargo.toml +++ b/voyager/modules/consensus/ethereum/Cargo.toml @@ -4,12 +4,11 @@ name = "voyager-consensus-module-ethereum" version = "0.1.0" [dependencies] +alloy = { workspace = true, features = ["providers"] } beacon-api = { workspace = true } bitvec = { workspace = true } -chain-utils = { workspace = true } enumorph = { workspace = true } ethereum-verifier = { workspace = true } -ethers = { workspace = true, features = ["rustls", "ws"] } futures = { workspace = true } jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] } macros = { workspace = true } diff --git a/voyager/modules/consensus/ethereum/src/main.rs b/voyager/modules/consensus/ethereum/src/main.rs index 984312c655..9f2140055b 100644 --- a/voyager/modules/consensus/ethereum/src/main.rs +++ b/voyager/modules/consensus/ethereum/src/main.rs @@ -1,7 +1,10 @@ use std::ops::Div; +use alloy::{ + providers::{Provider, ProviderBuilder, RootProvider}, + transports::BoxTransport, +}; use beacon_api::client::BeaconApiClient; -use ethers::providers::{Middleware, Provider, ProviderError, Ws, WsClientError}; use jsonrpsee::{ core::{async_trait, RpcResult}, Extensions, @@ -40,7 +43,7 @@ pub struct Module { /// The address of the `IBCHandler` smart contract. pub ibc_handler_address: H160, - pub provider: Provider, + pub provider: RootProvider, pub beacon_api_client: BeaconApiClient, } @@ -67,11 +70,10 @@ impl Module { let account_update = self .provider - .get_proof( - ethers::types::H160::from(self.ibc_handler_address), - vec![], + .get_proof(self.ibc_handler_address.into(), vec![]) + .block_id( // NOTE: Proofs are from the execution layer, so we use execution height, not beacon slot. - Some(execution_height.into()), + execution_height.into(), ) .await .unwrap(); @@ -93,9 +95,11 @@ impl ConsensusModule for Module { type Config = Config; async fn new(config: Self::Config, info: ConsensusModuleInfo) -> Result { - let provider = Provider::new(Ws::connect(config.eth_rpc_api).await?); + let provider = ProviderBuilder::new() + .on_builtin(&config.eth_rpc_api) + .await?; - let chain_id = ChainId::new(provider.get_chainid().await?.to_string()); + let chain_id = ChainId::new(provider.get_chain_id().await?.to_string()); info.ensure_chain_id(chain_id.to_string())?; info.ensure_consensus_type(match config.chain_spec { @@ -125,16 +129,6 @@ impl ConsensusModule for Module { } } -#[derive(Debug, thiserror::Error)] -pub enum ModuleInitError { - #[error("unable to connect to websocket")] - Ws(#[from] WsClientError), - #[error("provider error")] - Provider(#[from] ProviderError), - #[error("beacon error")] - Beacon(#[from] beacon_api::client::NewError), -} - #[async_trait] impl ConsensusModuleServer for Module { #[instrument(skip_all, fields(chain_id = %self.chain_id))] @@ -155,12 +149,9 @@ impl ConsensusModuleServer for Module { seconds_per_slot: spec.seconds_per_slot, slots_per_epoch: spec.slots_per_epoch, epochs_per_sync_committee_period: spec.epochs_per_sync_committee_period, - latest_slot: height.revision_height, + latest_slot: height.height(), min_sync_committee_participants: 0, - frozen_height: Height { - revision_number: 0, - revision_height: 0, - }, + frozen_height: Height::default(), ibc_commitment_slot: IBC_HANDLER_COMMITMENTS_SLOT, ibc_contract_address: self.ibc_handler_address, }) @@ -173,7 +164,7 @@ impl ConsensusModuleServer for Module { let beacon_api_client = &self.beacon_api_client; let trusted_header = beacon_api_client - .header(beacon_api::client::BlockId::Slot(height.revision_height)) + .header(beacon_api::client::BlockId::Slot(height.height())) .await .unwrap() .data; @@ -186,10 +177,10 @@ impl ConsensusModuleServer for Module { let spec = self.beacon_api_client.spec().await.unwrap().data; - assert!(bootstrap.header.beacon.slot == height.revision_height); + assert!(bootstrap.header.beacon.slot == height.height()); let light_client_update = { - let current_period = height.revision_height.div(spec.period()); + let current_period = height.height().div(spec.period()); debug!(%current_period); @@ -214,15 +205,11 @@ impl ConsensusModuleServer for Module { state_root: bootstrap.header.execution.state_root, storage_root: self .provider - .get_proof( - ethers::types::H160::from(*self.ibc_handler_address.get()), - vec![], - Some(bootstrap.header.execution.block_number.into()), - ) + .get_proof(self.ibc_handler_address.into(), vec![]) + .block_id(bootstrap.header.execution.block_number.into()) .await .unwrap() .storage_hash - .0 .into(), timestamp, current_sync_committee: bootstrap.current_sync_committee.aggregate_pubkey, diff --git a/voyager/modules/consensus/movement/Cargo.toml b/voyager/modules/consensus/movement/Cargo.toml index 9a126d5c11..e7d65e5497 100644 --- a/voyager/modules/consensus/movement/Cargo.toml +++ b/voyager/modules/consensus/movement/Cargo.toml @@ -4,13 +4,12 @@ name = "voyager-consensus-module-movement" version = "0.1.0" [dependencies] +alloy = { workspace = true } aptos-move-ibc = { workspace = true } aptos-rest-client = { workspace = true } aptos-types = { workspace = true } bitvec = { workspace = true } -chain-utils = { workspace = true } enumorph = { workspace = true } -ethers = { workspace = true, features = ["rustls", "ws"] } futures = { workspace = true } jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] } macros = { workspace = true } diff --git a/voyager/modules/consensus/movement/src/main.rs b/voyager/modules/consensus/movement/src/main.rs index 77ea25c02d..700322310f 100644 --- a/voyager/modules/consensus/movement/src/main.rs +++ b/voyager/modules/consensus/movement/src/main.rs @@ -130,7 +130,7 @@ pub enum ModuleInitError { impl ConsensusModuleServer for Module { #[instrument(skip_all, fields(chain_id = %self.chain_id))] async fn self_client_state(&self, _: &Extensions, height: Height) -> RpcResult { - let ledger_version = self.ledger_version_of_height(height.revision_height).await; + let ledger_version = self.ledger_version_of_height(height.height()).await; let vault_addr = self .get_vault_addr( @@ -164,11 +164,8 @@ impl ConsensusModuleServer for Module { table_handle: AccountAddress(Hash::new( U256::from_be_hex(table_handle).unwrap().to_be_bytes(), )), - frozen_height: Height { - revision_number: 0, - revision_height: 0, - }, - latest_block_num: height.revision_height, + frozen_height: Height::default(), + latest_block_num: height.height(), }) .expect("infallible")) } diff --git a/voyager/modules/consensus/tendermint/src/main.rs b/voyager/modules/consensus/tendermint/src/main.rs index 608a9b5a7b..6af12b162e 100644 --- a/voyager/modules/consensus/tendermint/src/main.rs +++ b/voyager/modules/consensus/tendermint/src/main.rs @@ -107,7 +107,7 @@ impl ConsensusModuleServer for Module { let commit = self .tm_client - .commit(Some(height.revision_height.try_into().unwrap())) + .commit(Some(height.height().try_into().unwrap())) .await .unwrap(); @@ -159,10 +159,13 @@ impl ConsensusModuleServer for Module { )) }, frozen_height: None, - latest_height: Height { - revision_number: self.chain_revision, - revision_height: height.inner().try_into().expect("is within bounds; qed;"), - }, + latest_height: Height::new_with_revision( + self.chain_revision, + height + .inner() + .try_into() + .expect("value is within bounds; qed;"), + ), proof_specs: SDK_SPECS.into(), upgrade_path: vec!["upgrade".into(), "upgradedIBCState".into()], }) @@ -174,7 +177,7 @@ impl ConsensusModuleServer for Module { async fn self_consensus_state(&self, _: &Extensions, height: Height) -> RpcResult { let commit = self .tm_client - .commit(Some(height.revision_height.try_into().unwrap())) + .commit(Some(height.height().try_into().unwrap())) .await .map_err(|e| { ErrorObject::owned( diff --git a/voyager/plugins/client-update/cometbls/src/call.rs b/voyager/plugins/client-update/cometbls/src/call.rs index d2483ca500..a516469d16 100644 --- a/voyager/plugins/client-update/cometbls/src/call.rs +++ b/voyager/plugins/client-update/cometbls/src/call.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use unionlabs::{ibc::core::client::height::Height, union::galois::prove_request::ProveRequest}; #[model] diff --git a/voyager/plugins/client-update/cometbls/src/callback.rs b/voyager/plugins/client-update/cometbls/src/callback.rs index e9dfa22793..4f1d864f53 100644 --- a/voyager/plugins/client-update/cometbls/src/callback.rs +++ b/voyager/plugins/client-update/cometbls/src/callback.rs @@ -1,12 +1,9 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use subset_of::SubsetOf; -use unionlabs::{ - ibc::{ - core::client::height::Height, - lightclients::cometbls::{header::Header, light_header::LightHeader}, - }, - tendermint::types::signed_header::SignedHeader, +use unionlabs::ibc::{ + core::client::height::Height, + lightclients::cometbls::{header::Header, signed_header::SignedHeader}, }; use voyager_message::{ core::ChainId, @@ -28,7 +25,7 @@ pub enum ModuleCallback { pub struct AggregateHeader { pub chain_id: ChainId<'static>, - pub signed_header: SignedHeader, + pub signed_header: unionlabs::tendermint::types::signed_header::SignedHeader, pub update_from: Height, pub update_to: Height, @@ -38,7 +35,7 @@ impl Module { pub fn aggregate_header( &self, AggregateHeader { - mut signed_header, + signed_header, chain_id: _, update_from, update_to: _, @@ -47,20 +44,16 @@ impl Module { prove_response: response, }: ProveResponse, ) -> Op { - // TODO: maybe introduce a new commit for union signed header as we don't need the signatures but the ZKP only - // Keeping this signatures significantly increase the size of the structure and the associated gas cost in EVM (calldata). - signed_header.commit.signatures.clear(); - data(OrderedHeaders { headers: vec![( DecodedHeaderMeta { - height: Height { - revision_number: update_from.revision_number, - revision_height: signed_header.header.height.inner().try_into().unwrap(), - }, + height: Height::new_with_revision( + update_from.revision(), + signed_header.header.height.inner().try_into().unwrap(), + ), }, serde_json::to_value(Header { - signed_header: LightHeader { + signed_header: SignedHeader { height: signed_header.header.height, time: signed_header.header.time, validators_hash: signed_header.header.validators_hash, diff --git a/voyager/plugins/client-update/cometbls/src/data.rs b/voyager/plugins/client-update/cometbls/src/data.rs index e84c50186c..ff6b541c73 100644 --- a/voyager/plugins/client-update/cometbls/src/data.rs +++ b/voyager/plugins/client-update/cometbls/src/data.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use subset_of::SubsetOf; use unionlabs::union::galois::prove_response; diff --git a/voyager/plugins/client-update/cometbls/src/main.rs b/voyager/plugins/client-update/cometbls/src/main.rs index 2b1aba952c..47758801eb 100644 --- a/voyager/plugins/client-update/cometbls/src/main.rs +++ b/voyager/plugins/client-update/cometbls/src/main.rs @@ -193,21 +193,21 @@ impl PluginServer for Module { }) => { let trusted_validators = self .tm_client - .all_validators(Some(update_from.revision_height.try_into().unwrap())) + .all_validators(Some(update_from.height().try_into().unwrap())) .await .unwrap() .validators; let untrusted_validators = self .tm_client - .all_validators(Some(update_to.revision_height.try_into().unwrap())) + .all_validators(Some(update_to.height().try_into().unwrap())) .await .unwrap() .validators; let signed_header = self .tm_client - .commit(Some(update_to.revision_height.try_into().unwrap())) + .commit(Some(update_to.height().try_into().unwrap())) .await .unwrap() .signed_header; @@ -324,10 +324,8 @@ impl PluginServer for Module { // REVIEW: Should this be hardcoded to precommit? ty: SignedMsgType::Precommit, height: signed_header.commit.height, - round: BoundedI64::new( - signed_header.commit.round.inner().into(), - ) - .expect( + round: BoundedI64::new(signed_header.commit.round.inner()) + .expect( "0..=i32::MAX can be converted to 0..=i64::MAX safely", ), block_id: CanonicalBlockId { diff --git a/voyager/plugins/client-update/ethereum/Cargo.toml b/voyager/plugins/client-update/ethereum/Cargo.toml index 56fb8a5bec..4b16b28eff 100644 --- a/voyager/plugins/client-update/ethereum/Cargo.toml +++ b/voyager/plugins/client-update/ethereum/Cargo.toml @@ -4,12 +4,11 @@ name = "voyager-client-update-plugin-ethereum" version = "0.1.0" [dependencies] +alloy = { workspace = true } beacon-api = { workspace = true } bitvec = { workspace = true } -chain-utils = { workspace = true } enumorph = { workspace = true } ethereum-verifier = { workspace = true } -ethers = { workspace = true, features = ["rustls", "ws"] } futures = { workspace = true } jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] } macros = { workspace = true } diff --git a/voyager/plugins/client-update/ethereum/src/call.rs b/voyager/plugins/client-update/ethereum/src/call.rs index b0593e18ed..a90c7f2a86 100644 --- a/voyager/plugins/client-update/ethereum/src/call.rs +++ b/voyager/plugins/client-update/ethereum/src/call.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use unionlabs::ibc::core::client::height::Height; use voyager_message::core::ChainId; diff --git a/voyager/plugins/client-update/ethereum/src/callback.rs b/voyager/plugins/client-update/ethereum/src/callback.rs index a332e95f9a..b97db6946c 100644 --- a/voyager/plugins/client-update/ethereum/src/callback.rs +++ b/voyager/plugins/client-update/ethereum/src/callback.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/client-update/ethereum/src/data.rs b/voyager/plugins/client-update/ethereum/src/data.rs index f52f66d6b6..3cbf2cb60b 100644 --- a/voyager/plugins/client-update/ethereum/src/data.rs +++ b/voyager/plugins/client-update/ethereum/src/data.rs @@ -1,4 +1,4 @@ -use macros::model; +use voyager_message::macros::model; #[model] pub enum ModuleData {} diff --git a/voyager/plugins/client-update/ethereum/src/main.rs b/voyager/plugins/client-update/ethereum/src/main.rs index e0a8cc1152..d6e40ad502 100644 --- a/voyager/plugins/client-update/ethereum/src/main.rs +++ b/voyager/plugins/client-update/ethereum/src/main.rs @@ -316,7 +316,7 @@ impl Module { let target_period = sync_committee_period(finality_update.attested_header.beacon.slot, spec.period()); - let trusted_period = sync_committee_period(update_from.revision_height, spec.period()); + let trusted_period = sync_committee_period(update_from.height(), spec.period()); info!("target period: {target_period}, trusted period: {trusted_period}"); @@ -347,7 +347,7 @@ impl Module { ); let (updates, last_update_block_number) = stream::iter(light_client_updates) - .fold((VecDeque::new(), update_from.revision_height), { + .fold((VecDeque::new(), update_from.height()), { |(mut vec, mut trusted_slot), update| { let self_ = self.clone(); let spec = spec.clone(); @@ -376,9 +376,9 @@ impl Module { [].into() }; - let does_not_have_finality_update = last_update_block_number >= update_to.revision_height; + let does_not_have_finality_update = last_update_block_number >= update_to.height(); - debug!(last_update_block_number, update_to.revision_height); + debug!(last_update_block_number, update_to.height()); let finality_update_msg = if does_not_have_finality_update { info!("does not have finality update"); @@ -449,14 +449,9 @@ impl Module { .map(|header| { ( DecodedHeaderMeta { - height: Height { - revision_number: ETHEREUM_REVISION_NUMBER, - revision_height: header - .consensus_update - .attested_header - .beacon - .slot, - }, + height: Height::new( + header.consensus_update.attested_header.beacon.slot, + ), }, serde_json::to_value(header).unwrap(), ) @@ -508,10 +503,7 @@ impl Module { UnboundedHeader { consensus_update: light_client_update, trusted_sync_committee: UnboundedTrustedSyncCommittee { - trusted_height: Height { - revision_number: ETHEREUM_REVISION_NUMBER, - revision_height: currently_trusted_slot, - }, + trusted_height: Height::new(currently_trusted_slot), sync_committee: if is_next { UnboundedActiveSyncCommittee::Next( previous_period_light_client_update diff --git a/voyager/plugins/client-update/movement/Cargo.toml b/voyager/plugins/client-update/movement/Cargo.toml index 1fa8e8ce88..1c649e26f3 100644 --- a/voyager/plugins/client-update/movement/Cargo.toml +++ b/voyager/plugins/client-update/movement/Cargo.toml @@ -4,13 +4,12 @@ name = "voyager-client-update-plugin-movement" version = "0.1.0" [dependencies] +alloy = { workspace = true } aptos-move-ibc = { workspace = true } aptos-rest-client = { workspace = true } aptos-types = { workspace = true } bitvec = { workspace = true } -chain-utils = { workspace = true } enumorph = { workspace = true } -ethers = { workspace = true, features = ["rustls", "ws"] } futures = { workspace = true } jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] } macros = { workspace = true } diff --git a/voyager/plugins/client-update/movement/src/call.rs b/voyager/plugins/client-update/movement/src/call.rs index b8b8357f9e..37729ae581 100644 --- a/voyager/plugins/client-update/movement/src/call.rs +++ b/voyager/plugins/client-update/movement/src/call.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/client-update/movement/src/callback.rs b/voyager/plugins/client-update/movement/src/callback.rs index a332e95f9a..b97db6946c 100644 --- a/voyager/plugins/client-update/movement/src/callback.rs +++ b/voyager/plugins/client-update/movement/src/callback.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/client-update/movement/src/data.rs b/voyager/plugins/client-update/movement/src/data.rs index c04dab4fac..dd6bcd672a 100644 --- a/voyager/plugins/client-update/movement/src/data.rs +++ b/voyager/plugins/client-update/movement/src/data.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use subset_of::SubsetOf; #[model] diff --git a/voyager/plugins/client-update/movement/src/main.rs b/voyager/plugins/client-update/movement/src/main.rs index b46080b6ef..f53f79d3cc 100644 --- a/voyager/plugins/client-update/movement/src/main.rs +++ b/voyager/plugins/client-update/movement/src/main.rs @@ -35,7 +35,7 @@ use voyager_message::{ module::{ConsensusModuleServer, PluginInfo, PluginServer, UnexpectedChainIdError}, run_plugin_server, DefaultCmd, Plugin, PluginMessage, VoyagerMessage, }; -use voyager_vm::{data, pass::PassResult, Op, Visit}; +use voyager_vm::{data, pass::PassResult, BoxDynError, Op, Visit}; use crate::{call::ModuleCall, callback::ModuleCallback}; @@ -79,7 +79,7 @@ impl Plugin for Module { type Config = Config; type Cmd = DefaultCmd; - async fn new(config: Self::Config) -> Result { + async fn new(config: Self::Config) -> Result { let aptos_client = aptos_rest_client::Client::new(config.aptos_rest_api.parse().unwrap()); let chain_id = aptos_client.get_index().await?.inner().chain_id.to_string(); @@ -192,8 +192,8 @@ impl PluginServer for Module { Call::Plugin(PluginMessage::new( self.plugin_name(), ModuleCall::from(FetchUpdate { - from: fetch.update_from.revision_height, - to: fetch.update_to.revision_height, + from: fetch.update_from.height(), + to: fetch.update_to.height(), }), )) }) @@ -217,19 +217,13 @@ impl PluginServer for Module { Ok(data(OrderedHeaders { headers: vec![( DecodedHeaderMeta { - height: Height { - revision_number: 0, - revision_height: to, - }, + height: Height::new(to), }, serde_json::to_value(movement::header::Header { // dummy value for now, until movement settles on a public L1 // 0-1, otherwise it's omitted in the proto encoding(?) l1_height: Height::default().increment(), - trusted_height: Height { - revision_number: 0, - revision_height: from, - }, + trusted_height: Height::new(from), state_proof: StateProof::default(), tx_index: 0, tx_proof: TransactionInfoWithProof::default(), @@ -266,7 +260,7 @@ impl PluginServer for Module { impl ConsensusModuleServer for Module { #[instrument(skip_all, fields(chain_id = %self.chain_id))] async fn self_client_state(&self, _: &Extensions, height: Height) -> RpcResult { - let ledger_version = self.ledger_version_of_height(height.revision_height).await; + let ledger_version = self.ledger_version_of_height(height.height()).await; let vault_addr = self .get_vault_addr( @@ -296,15 +290,12 @@ impl ConsensusModuleServer for Module { chain_id: self.chain_id.to_string(), l1_client_id: self.l1_client_id.clone(), l1_contract_address: self.l1_settlement_address, - l2_contract_address: self.ibc_handler_address, + l2_contract_address: self.ibc_handler_address.clone(), table_handle: AccountAddress(Hash::new( U256::from_be_hex(table_handle).unwrap().to_be_bytes(), )), - frozen_height: Height { - revision_number: 0, - revision_height: 0, - }, - latest_block_num: height.revision_height, + frozen_height: Height::default(), + latest_block_num: height.height(), }) .expect("infallible")) } @@ -343,10 +334,7 @@ pub async fn get_lc_header( // dummy value for now, until movement settles on a public L1 // 0-1, otherwise it's omitted in the proto encoding(?) l1_height: Height::default().increment(), - trusted_height: Height { - revision_number: 0, - revision_height: from, - }, + trusted_height: Height::new(from), state_proof: state_proof.state_proof, tx_index: state_proof.tx_index, tx_proof: state_proof.tx_proof, diff --git a/voyager/plugins/client-update/tendermint/src/call.rs b/voyager/plugins/client-update/tendermint/src/call.rs index 4a5a4f1f78..88ff86970e 100644 --- a/voyager/plugins/client-update/tendermint/src/call.rs +++ b/voyager/plugins/client-update/tendermint/src/call.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use unionlabs::ibc::core::client::height::Height; #[model] diff --git a/voyager/plugins/client-update/tendermint/src/callback.rs b/voyager/plugins/client-update/tendermint/src/callback.rs index a332e95f9a..b97db6946c 100644 --- a/voyager/plugins/client-update/tendermint/src/callback.rs +++ b/voyager/plugins/client-update/tendermint/src/callback.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/client-update/tendermint/src/data.rs b/voyager/plugins/client-update/tendermint/src/data.rs index f52f66d6b6..3cbf2cb60b 100644 --- a/voyager/plugins/client-update/tendermint/src/data.rs +++ b/voyager/plugins/client-update/tendermint/src/data.rs @@ -1,4 +1,4 @@ -use macros::model; +use voyager_message::macros::model; #[model] pub enum ModuleData {} diff --git a/voyager/plugins/client-update/tendermint/src/main.rs b/voyager/plugins/client-update/tendermint/src/main.rs index db7fcd0e86..a10b2759b5 100644 --- a/voyager/plugins/client-update/tendermint/src/main.rs +++ b/voyager/plugins/client-update/tendermint/src/main.rs @@ -165,25 +165,25 @@ impl PluginServer for Module { }) => { let trusted_commit = self .tm_client - .commit(Some(update_from.revision_height.try_into().unwrap())) + .commit(Some(update_from.height().try_into().unwrap())) .await .unwrap(); let untrusted_commit = self .tm_client - .commit(Some(update_to.revision_height.try_into().unwrap())) + .commit(Some(update_to.height().try_into().unwrap())) .await .unwrap(); let trusted_validators = self .tm_client - .all_validators(Some(update_from.revision_height.try_into().unwrap())) + .all_validators(Some(update_from.height().try_into().unwrap())) .await .unwrap(); let untrusted_validators = self .tm_client - .all_validators(Some(update_to.revision_height.try_into().unwrap())) + .all_validators(Some(update_to.height().try_into().unwrap())) .await .unwrap(); diff --git a/voyager/plugins/event-source/cosmos-sdk/src/call.rs b/voyager/plugins/event-source/cosmos-sdk/src/call.rs index 1c187bf871..1c449b7e1b 100644 --- a/voyager/plugins/event-source/cosmos-sdk/src/call.rs +++ b/voyager/plugins/event-source/cosmos-sdk/src/call.rs @@ -1,7 +1,7 @@ use std::num::NonZeroU32; use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use unionlabs::{events::IbcEvent, hash::H256, ibc::core::client::height::Height}; #[model] diff --git a/voyager/plugins/event-source/cosmos-sdk/src/callback.rs b/voyager/plugins/event-source/cosmos-sdk/src/callback.rs index a332e95f9a..b97db6946c 100644 --- a/voyager/plugins/event-source/cosmos-sdk/src/callback.rs +++ b/voyager/plugins/event-source/cosmos-sdk/src/callback.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/event-source/cosmos-sdk/src/data.rs b/voyager/plugins/event-source/cosmos-sdk/src/data.rs index 769c4844ec..3ac7804473 100644 --- a/voyager/plugins/event-source/cosmos-sdk/src/data.rs +++ b/voyager/plugins/event-source/cosmos-sdk/src/data.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/event-source/cosmos-sdk/src/main.rs b/voyager/plugins/event-source/cosmos-sdk/src/main.rs index 3c761ff567..0ca4050bcc 100644 --- a/voyager/plugins/event-source/cosmos-sdk/src/main.rs +++ b/voyager/plugins/event-source/cosmos-sdk/src/main.rs @@ -150,10 +150,7 @@ impl Module { #[must_use] pub fn make_height(&self, height: u64) -> Height { - Height { - revision_number: self.chain_revision, - revision_height: height, - } + Height::new_with_revision(self.chain_revision, height) } async fn client_type_of_checksum(&self, checksum: H256) -> RpcResult> { @@ -221,7 +218,7 @@ impl Module { } } - #[instrument(skip_all, fields(%client_id))] + #[instrument(skip_all, fields(client_id = client_id.as_value()))] async fn checksum_of_client_id(&self, client_id: ClientId) -> RpcResult { type WasmClientState = protos::ibc::lightclients::wasm::v1::ClientState; @@ -380,7 +377,6 @@ impl Module { self.chain_id.clone(), event_height.into(), ChannelEndPath { - port_id: self_port_id.clone(), channel_id: self_channel_id.clone(), }, ) @@ -394,7 +390,6 @@ impl Module { client_meta.chain_id.clone(), QueryHeight::Latest, ChannelEndPath { - port_id: other_port_id.clone(), channel_id: other_channel_id.clone(), }, ) @@ -491,7 +486,7 @@ impl PluginServer for Module { let response = self .tm_client .tx_search( - format!("tx.height={}", height.revision_height), + format!("tx.height={}", height.height()), false, page, PER_PAGE_LIMIT, @@ -780,7 +775,6 @@ impl PluginServer for Module { self.chain_id.clone(), height.into(), ChannelEndPath { - port_id: port_id.to_owned(), channel_id: channel_id.to_owned(), }, ) diff --git a/voyager/plugins/event-source/ethereum/Cargo.toml b/voyager/plugins/event-source/ethereum/Cargo.toml index 388700a55a..65d3c84db7 100644 --- a/voyager/plugins/event-source/ethereum/Cargo.toml +++ b/voyager/plugins/event-source/ethereum/Cargo.toml @@ -4,12 +4,11 @@ name = "voyager-event-source-plugin-ethereum" version = "0.1.0" [dependencies] +alloy = { workspace = true, features = ["rpc", "rpc-types"] } beacon-api = { workspace = true } -chain-utils = { workspace = true } -contracts = { workspace = true, features = ["providers"] } enumorph = { workspace = true } -ethers = { workspace = true, features = ["rustls", "ws"] } futures = { workspace = true } +ibc-solidity = { workspace = true } jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] } macros = { workspace = true } serde = { workspace = true, features = ["derive"] } @@ -21,6 +20,6 @@ thiserror = { workspace = true } tokio = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } -unionlabs = { workspace = true } +unionlabs = { workspace = true, features = ["serde", "valuable", "ethabi"] } voyager-message = { workspace = true } voyager-vm = { workspace = true } diff --git a/voyager/plugins/event-source/ethereum/src/call.rs b/voyager/plugins/event-source/ethereum/src/call.rs index 8538c9e856..4edf35b53b 100644 --- a/voyager/plugins/event-source/ethereum/src/call.rs +++ b/voyager/plugins/event-source/ethereum/src/call.rs @@ -1,8 +1,8 @@ use chain_utils::ethereum::IBCHandlerEvents; use enumorph::Enumorph; -use macros::model; use subset_of::SubsetOf; use unionlabs::hash::H256; +use voyager_message::macros::model; #[model] #[derive(Enumorph, SubsetOf)] @@ -33,5 +33,5 @@ pub struct MakeFullEvent { pub block_number: u64, /// Tx hash of the transaction that emitted this event. pub tx_hash: H256, - pub event: IBCHandlerEvents, + pub event: ibc_solidity::ibc::Ibc::IbcEvents, } diff --git a/voyager/plugins/event-source/ethereum/src/callback.rs b/voyager/plugins/event-source/ethereum/src/callback.rs index 684c18b4eb..feb40dd326 100644 --- a/voyager/plugins/event-source/ethereum/src/callback.rs +++ b/voyager/plugins/event-source/ethereum/src/callback.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use subset_of::SubsetOf; #[model] diff --git a/voyager/plugins/event-source/ethereum/src/data.rs b/voyager/plugins/event-source/ethereum/src/data.rs index 769c4844ec..3ac7804473 100644 --- a/voyager/plugins/event-source/ethereum/src/data.rs +++ b/voyager/plugins/event-source/ethereum/src/data.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/event-source/ethereum/src/main.rs b/voyager/plugins/event-source/ethereum/src/main.rs index e2ed649f74..9bc4c1a08e 100644 --- a/voyager/plugins/event-source/ethereum/src/main.rs +++ b/voyager/plugins/event-source/ethereum/src/main.rs @@ -2,16 +2,17 @@ use std::collections::VecDeque; -use beacon_api::client::BeaconApiClient; -use chain_utils::ethereum::IBCHandlerEvents; -use contracts::{ - ibc_channel_handshake::IBCChannelHandshakeEvents, ibc_client::IBCClientEvents, - ibc_connection::IBCConnectionEvents, ibc_packet::IBCPacketEvents, +use alloy::{ + network::primitives::BlockTransactionsKind, + providers::{Provider, ProviderBuilder, RootProvider}, + rpc::types::Filter, + sol_types::SolEventInterface, + transports::BoxTransport, }; -use ethers::{ - contract::EthLogDecode, - providers::{Middleware, Provider, Ws}, - types::Filter, +use beacon_api::client::BeaconApiClient; +use ibc_solidity::ibc::{ + self, + Ibc::{self, IbcEvents, IbcInstance}, }; use jsonrpsee::{ core::{async_trait, RpcResult}, @@ -24,8 +25,7 @@ use unionlabs::{ hash::{H160, H256}, ibc::core::{channel, client::height::Height}, ics24::{ChannelEndPath, ConnectionPath}, - id::{ChannelId, ClientId, PortId}, - uint::U256, + id::{ChannelId, ClientId, ConnectionId, PortId}, ErrorReporter, QueryHeight, }; use voyager_message::{ @@ -65,7 +65,7 @@ pub struct Module { pub ibc_handler_address: H160, - pub provider: Provider, + pub provider: RootProvider, pub beacon_api_client: BeaconApiClient, } @@ -121,13 +121,19 @@ impl Module { plugin_name(&self.chain_id) } + fn ibc_handler(&self) -> IbcInstance> { + Ibc::new(self.ibc_handler_address.get().into(), self.provider.clone()) + } + pub async fn new(config: Config) -> Result { - let provider = Provider::new(Ws::connect(config.eth_rpc_api).await?); + let provider = ProviderBuilder::new() + .on_builtin(&config.eth_rpc_api) + .await?; - let chain_id = provider.get_chainid().await?; + let chain_id = provider.get_chain_id().await?; Ok(Self { - chain_id: ChainId::new(U256(chain_id).to_string()), + chain_id: ChainId::new(chain_id.to_string()), ibc_handler_address: config.ibc_handler_address, provider, beacon_api_client: BeaconApiClient::new(config.eth_beacon_rpc_api).await?, @@ -136,10 +142,7 @@ impl Module { #[must_use] pub fn make_height(&self, height: u64) -> Height { - Height { - revision_number: ETHEREUM_REVISION_NUMBER, - revision_height: height, - } + Height::new(height) } async fn make_packet_metadata( @@ -160,7 +163,6 @@ impl Module { self.chain_id.clone(), event_height.into(), ChannelEndPath { - port_id: self_port_id.clone(), channel_id: self_channel_id.clone(), }, ) @@ -206,8 +208,7 @@ impl Module { client_meta.chain_id.clone(), QueryHeight::Latest, ChannelEndPath { - port_id: self_channel.counterparty.port_id.clone(), - channel_id: self_channel.counterparty.channel_id.parse().unwrap(), + channel_id: self_channel.counterparty.channel_id.unwrap(), }, ) .await @@ -263,7 +264,7 @@ impl PluginServer for Module { call(PluginMessage::new( self.plugin_name(), ModuleCall::from(FetchBlock { - slot: fetch.start_height.revision_height, + slot: fetch.start_height.height(), }), )) } @@ -297,16 +298,17 @@ impl PluginServer for Module { let slot = self .beacon_api_client .block( - self.provider - .get_block(block_number) - .await - .unwrap() - .unwrap() - .other - .get_with("parentBeaconBlockRoot", serde_json::from_value::) - .unwrap() - .unwrap() - .into(), + ::from( + self.provider + .get_block(block_number.into(), BlockTransactionsKind::Hashes) + .await + .unwrap() + .unwrap() + .header + .parent_beacon_block_root + .unwrap(), + ) + .into(), ) .await .unwrap() @@ -320,24 +322,214 @@ impl PluginServer for Module { let voyager_client = e.try_get::()?; match event { - IBCHandlerEvents::ChannelEvent( - IBCChannelHandshakeEvents::ChannelCloseConfirmFilter(_), - ) - | IBCHandlerEvents::ChannelEvent( - IBCChannelHandshakeEvents::ChannelCloseInitFilter(_), - ) => { - todo!() + IbcEvents::ClientCreated(raw_event) => { + let client_id = ClientId::new(raw_event.clientId); + + let client_info = voyager_client + .client_info(self.chain_id.clone(), client_id.clone()) + .await + .map_err(json_rpc_error_to_error_object)?; + + let client_meta = voyager_client + .client_meta( + self.chain_id.clone(), + height.into(), + ClientId::new(raw_event.clientId), + ) + .await + .map_err(json_rpc_error_to_error_object)?; + + Ok(data(ChainEvent { + chain_id: self.chain_id.clone(), + client_info: client_info.clone(), + counterparty_chain_id: client_meta.chain_id, + tx_hash, + provable_height: height, + event: CreateClient { + client_id, + client_type: client_info.client_type, + consensus_height: client_meta.height, + } + .into(), + })) + } + IbcEvents::ClientRegistered(raw_event) => { + info!(?raw_event, "observed ClientRegistered event"); + + Ok(noop()) + } + IbcEvents::ClientUpdated(raw_event) => { + let client_id = ClientId::new(raw_event.clientId); + + let client_info = voyager_client + .client_info(self.chain_id.clone(), client_id.clone()) + .await + .map_err(json_rpc_error_to_error_object)?; + + let client_meta = voyager_client + .client_meta( + self.chain_id.clone(), + height.into(), + ClientId::new(raw_event.clientId), + ) + .await + .map_err(json_rpc_error_to_error_object)?; + + Ok(data(ChainEvent { + chain_id: self.chain_id.clone(), + client_info: client_info.clone(), + counterparty_chain_id: client_meta.chain_id, + tx_hash, + provable_height: height, + event: UpdateClient { + client_id, + client_type: client_info.client_type, + consensus_heights: vec![raw_event.height.into()], + } + .into(), + })) + } + + IbcEvents::ConnectionOpenInit(raw_event) => { + let client_info = voyager_client + .client_info(self.chain_id.clone(), ClientId::new(raw_event.clientId)) + .await + .map_err(json_rpc_error_to_error_object)?; + + let client_meta = voyager_client + .client_meta( + self.chain_id.clone(), + height.into(), + ClientId::new(raw_event.clientId), + ) + .await + .map_err(json_rpc_error_to_error_object)?; + + Ok(data(ChainEvent { + chain_id: self.chain_id.clone(), + client_info, + counterparty_chain_id: client_meta.chain_id, + tx_hash, + provable_height: height, + event: ConnectionOpenInit { + client_id: ClientId::new(raw_event.clientId), + connection_id: ConnectionId::new(raw_event.connectionId), + counterparty_client_id: ClientId::new( + raw_event.counterpartyClientId, + ), + } + .into(), + })) + } + IbcEvents::ConnectionOpenTry(raw_event) => { + let client_info = voyager_client + .client_info(self.chain_id.clone(), ClientId::new(raw_event.clientId)) + .await + .map_err(json_rpc_error_to_error_object)?; + + let client_meta = voyager_client + .client_meta( + self.chain_id.clone(), + height.into(), + ClientId::new(raw_event.clientId), + ) + .await + .map_err(json_rpc_error_to_error_object)?; + + Ok(data(ChainEvent { + chain_id: self.chain_id.clone(), + client_info, + counterparty_chain_id: client_meta.chain_id, + tx_hash, + provable_height: height, + event: ConnectionOpenTry { + client_id: ClientId::new(raw_event.clientId), + connection_id: ConnectionId::new(raw_event.connectionId), + counterparty_client_id: ClientId::new( + raw_event.counterpartyClientId, + ), + counterparty_connection_id: ConnectionId::new( + raw_event.counterpartyConnectionId, + ), + } + .into(), + })) + } + IbcEvents::ConnectionOpenAck(raw_event) => { + let client_info = voyager_client + .client_info(self.chain_id.clone(), ClientId::new(raw_event.clientId)) + .await + .map_err(json_rpc_error_to_error_object)?; + + let client_meta = voyager_client + .client_meta( + self.chain_id.clone(), + height.into(), + ClientId::new(raw_event.clientId), + ) + .await + .map_err(json_rpc_error_to_error_object)?; + + Ok(data(ChainEvent { + chain_id: self.chain_id.clone(), + client_info, + counterparty_chain_id: client_meta.chain_id, + tx_hash, + provable_height: height, + event: ConnectionOpenAck { + client_id: ClientId::new(raw_event.clientId), + connection_id: ConnectionId::new(raw_event.connectionId), + counterparty_client_id: ClientId::new( + raw_event.counterpartyClientId, + ), + counterparty_connection_id: ConnectionId::new( + raw_event.counterpartyConnectionId, + ), + } + .into(), + })) } + IbcEvents::ConnectionOpenConfirm(raw_event) => { + let client_info = voyager_client + .client_info(self.chain_id.clone(), ClientId::new(raw_event.clientId)) + .await + .map_err(json_rpc_error_to_error_object)?; + + let client_meta = voyager_client + .client_meta( + self.chain_id.clone(), + height.into(), + ClientId::new(raw_event.clientId), + ) + .await + .map_err(json_rpc_error_to_error_object)?; - IBCHandlerEvents::ChannelEvent( - IBCChannelHandshakeEvents::ChannelOpenInitFilter(raw_event), - ) => { + Ok(data(ChainEvent { + chain_id: self.chain_id.clone(), + client_info, + counterparty_chain_id: client_meta.chain_id, + tx_hash, + provable_height: height, + event: ConnectionOpenConfirm { + client_id: ClientId::new(raw_event.clientId), + connection_id: ConnectionId::new(raw_event.connectionId), + counterparty_client_id: ClientId::new( + raw_event.counterpartyClientId, + ), + counterparty_connection_id: ConnectionId::new( + raw_event.counterpartyConnectionId, + ), + } + .into(), + })) + } + IbcEvents::ChannelOpenInit(raw_event) => { let connection = voyager_client .query_ibc_state_typed( self.chain_id.clone(), height.into(), ConnectionPath { - connection_id: raw_event.connection_id.parse().unwrap(), + connection_id: ConnectionId::new(raw_event.connectionId), }, ) .await @@ -364,8 +556,7 @@ impl PluginServer for Module { self.chain_id.clone(), height.into(), ChannelEndPath { - port_id: raw_event.port_id.parse().unwrap(), - channel_id: raw_event.channel_id.parse().unwrap(), + channel_id: ChannelId::new(raw_event.channelId), }, ) .await @@ -380,27 +571,22 @@ impl PluginServer for Module { tx_hash, provable_height: height, event: ChannelOpenInit { - port_id: raw_event.port_id.parse().unwrap(), - channel_id: raw_event.channel_id.parse().unwrap(), - counterparty_port_id: raw_event - .counterparty_port_id - .parse() - .unwrap(), + port_id: PortId::new(raw_event.portId.to_string()).unwrap(), + channel_id: ChannelId::new(raw_event.channelId), + counterparty_port_id: raw_event, connection, version: channel.version, } .into(), })) } - IBCHandlerEvents::ChannelEvent( - IBCChannelHandshakeEvents::ChannelOpenTryFilter(raw_event), - ) => { + IbcEvents::ChannelOpenTry(raw_event) => { let connection = voyager_client .query_ibc_state_typed( self.chain_id.clone(), height.into(), ConnectionPath { - connection_id: raw_event.connection_id.parse().unwrap(), + connection_id: ConnectionId::new(raw_event.connectionId), }, ) .await @@ -427,8 +613,7 @@ impl PluginServer for Module { self.chain_id.clone(), height.into(), ChannelEndPath { - port_id: raw_event.port_id.parse().unwrap(), - channel_id: raw_event.channel_id.parse().unwrap(), + channel_id: ChannelId::new(raw_event.channelId), }, ) .await @@ -443,31 +628,25 @@ impl PluginServer for Module { tx_hash, provable_height: height, event: ChannelOpenTry { - port_id: raw_event.port_id.parse().unwrap(), - channel_id: raw_event.channel_id.parse().unwrap(), - counterparty_port_id: raw_event - .counterparty_port_id - .parse() - .unwrap(), - counterparty_channel_id: raw_event - .counterparty_channel_id - .parse() - .unwrap(), + port_id: PortId::new(raw_event.portId.to_string()).unwrap(), + channel_id: ChannelId::new(raw_event.channelId), + counterparty_port_id: raw_event.counterparty_port_id, + counterparty_channel_id: Channelid::new( + raw_event.counterpartyChannelId, + ), connection, version: channel.version, } .into(), })) } - IBCHandlerEvents::ChannelEvent( - IBCChannelHandshakeEvents::ChannelOpenAckFilter(raw_event), - ) => { + IbcEvents::ChannelOpenAck(raw_event) => { let connection = voyager_client .query_ibc_state_typed( self.chain_id.clone(), height.into(), ConnectionPath { - connection_id: raw_event.connection_id.parse().unwrap(), + connection_id: ConnectionId::new(raw_event.connectionId), }, ) .await @@ -494,8 +673,7 @@ impl PluginServer for Module { self.chain_id.clone(), height.into(), ChannelEndPath { - port_id: raw_event.port_id.parse().unwrap(), - channel_id: raw_event.channel_id.parse().unwrap(), + channel_id: ChannelId::new(raw_event.channelId), }, ) .await @@ -510,31 +688,25 @@ impl PluginServer for Module { tx_hash, provable_height: height, event: ChannelOpenAck { - port_id: raw_event.port_id.parse().unwrap(), - channel_id: raw_event.channel_id.parse().unwrap(), - counterparty_port_id: raw_event - .counterparty_port_id - .parse() - .unwrap(), - counterparty_channel_id: raw_event - .counterparty_channel_id - .parse() - .unwrap(), + port_id: PortId::new(raw_event.portId.to_string()).unwrap(), + channel_id: ChannelId::new(raw_event.channelId), + counterparty_port_id: todo!(), + counterparty_channel_id: ChannelId::new( + raw_event.counterpartyChannelId, + ), connection, version: channel.version, } .into(), })) } - IBCHandlerEvents::ChannelEvent( - IBCChannelHandshakeEvents::ChannelOpenConfirmFilter(raw_event), - ) => { + IbcEvents::ChannelOpenConfirm(raw_event) => { let connection = voyager_client .query_ibc_state_typed( self.chain_id.clone(), height.into(), ConnectionPath { - connection_id: raw_event.connection_id.parse().unwrap(), + connection_id: ConnectionId::new(raw_event.connectionId), }, ) .await @@ -561,8 +733,7 @@ impl PluginServer for Module { self.chain_id.clone(), height.into(), ChannelEndPath { - port_id: raw_event.port_id.parse().unwrap(), - channel_id: raw_event.channel_id.parse().unwrap(), + channel_id: ChannelId::new(raw_event.channelId), }, ) .await @@ -577,16 +748,10 @@ impl PluginServer for Module { tx_hash, provable_height: height, event: ChannelOpenConfirm { - port_id: raw_event.port_id.parse().unwrap(), - channel_id: raw_event.channel_id.parse().unwrap(), - counterparty_port_id: raw_event - .counterparty_port_id - .parse() - .unwrap(), - counterparty_channel_id: raw_event - .counterparty_channel_id - .parse() - .unwrap(), + port_id: PortId::new(raw_event.portId.to_string()).unwrap(), + channel_id: ChannelId::new(raw_event.channelId), + counterparty_port_id: channel.counterparty.port_id, + counterparty_channel_id: channel.counterparty.channel_id.unwrap(), connection, version: channel.version, } @@ -594,426 +759,246 @@ impl PluginServer for Module { })) } - IBCHandlerEvents::ConnectionEvent( - IBCConnectionEvents::ConnectionOpenInitFilter(raw_event), - ) => { - let client_info = voyager_client - .client_info( - self.chain_id.clone(), - raw_event.client_id.parse().unwrap(), - ) - .await - .map_err(json_rpc_error_to_error_object)?; + IbcEvents::ChannelCloseInit(_) | IbcEvents::ChannelCloseConfirm(_) => { + warn!("observed channel close message, these are not handled currently"); - let client_meta = voyager_client - .client_meta( - self.chain_id.clone(), - height.into(), - raw_event.client_id.parse().unwrap(), - ) - .await - .map_err(json_rpc_error_to_error_object)?; - - Ok(data(ChainEvent { - chain_id: self.chain_id.clone(), - client_info, - counterparty_chain_id: client_meta.chain_id, - tx_hash, - provable_height: height, - event: ConnectionOpenInit { - client_id: raw_event.client_id.parse().unwrap(), - connection_id: raw_event.connection_id.parse().unwrap(), - counterparty_client_id: raw_event - .counterparty_client_id - .parse() - .unwrap(), - } - .into(), - })) + Ok(noop()) } - IBCHandlerEvents::ConnectionEvent( - IBCConnectionEvents::ConnectionOpenTryFilter(raw_event), - ) => { - let client_info = voyager_client - .client_info( - self.chain_id.clone(), - raw_event.client_id.parse().unwrap(), - ) - .await - .map_err(json_rpc_error_to_error_object)?; - let client_meta = voyager_client - .client_meta( - self.chain_id.clone(), - height.into(), - raw_event.client_id.parse().unwrap(), + // packet origin is this chain + IbcEvents::SendPacket(event) => { + let self_port_id = PortId::new( + self.ibc_handler() + .channelOwner(event.packet.sourceChannel) + .await + .unwrap() + ._0 + .to_string(), + ) + .unwrap(); + + let ( + counterparty_chain_id, + client_info, + source_channel, + destination_channel, + channel_ordering, + ) = self + .make_packet_metadata( + height, + self_port_id, + ChannelId::new(event.packet.sourceChannel), + e.try_get()?, ) - .await - .map_err(json_rpc_error_to_error_object)?; + .await?; Ok(data(ChainEvent { chain_id: self.chain_id.clone(), client_info, - counterparty_chain_id: client_meta.chain_id, + counterparty_chain_id, tx_hash, provable_height: height, - event: ConnectionOpenTry { - client_id: raw_event.client_id.parse().unwrap(), - connection_id: raw_event.connection_id.parse().unwrap(), - counterparty_client_id: raw_event - .counterparty_client_id - .parse() - .unwrap(), - counterparty_connection_id: raw_event - .counterparty_connection_id - .parse() - .unwrap(), + event: voyager_message::data::SendPacket { + packet_data: event.packet.data.to_vec(), + packet: PacketMetadata { + sequence: event.packet.sequence.try_into().unwrap(), + source_channel, + destination_channel, + channel_ordering, + timeout_height: Height::new(event.packet.timeoutHeight), + timeout_timestamp: event.packet.timeoutTimestamp, + }, } .into(), })) } - IBCHandlerEvents::ConnectionEvent( - IBCConnectionEvents::ConnectionOpenAckFilter(raw_event), - ) => { - let client_info = voyager_client - .client_info( - self.chain_id.clone(), - raw_event.client_id.parse().unwrap(), - ) - .await - .map_err(json_rpc_error_to_error_object)?; + IbcEvents::TimeoutPacket(event) => { + let self_port_id = PortId::new( + self.ibc_handler() + .channelOwner(event.packet.sourceChannel) + .await + .unwrap() + ._0 + .to_string(), + ) + .unwrap(); - let client_meta = voyager_client - .client_meta( - self.chain_id.clone(), - height.into(), - raw_event.client_id.parse().unwrap(), + let ( + counterparty_chain_id, + client_info, + source_channel, + destination_channel, + channel_ordering, + ) = self + .make_packet_metadata( + height, + self_port_id, + ChannelId::new(event.packet.sourceChannel), + e.try_get()?, ) - .await - .map_err(json_rpc_error_to_error_object)?; + .await?; Ok(data(ChainEvent { chain_id: self.chain_id.clone(), client_info, - counterparty_chain_id: client_meta.chain_id, + counterparty_chain_id, tx_hash, provable_height: height, - event: ConnectionOpenAck { - client_id: raw_event.client_id.parse().unwrap(), - connection_id: raw_event.connection_id.parse().unwrap(), - counterparty_client_id: raw_event - .counterparty_client_id - .parse() - .unwrap(), - counterparty_connection_id: raw_event - .counterparty_connection_id - .parse() - .unwrap(), + event: voyager_message::data::TimeoutPacket { + packet: PacketMetadata { + sequence: event.packet.sequence.try_into().unwrap(), + source_channel, + destination_channel, + channel_ordering, + timeout_height: Height::new(event.packet.timeoutHeight), + timeout_timestamp: event.packet.timeoutTimestamp, + }, } .into(), })) } - IBCHandlerEvents::ConnectionEvent( - IBCConnectionEvents::ConnectionOpenConfirmFilter(raw_event), - ) => { - let client_info = voyager_client - .client_info( - self.chain_id.clone(), - raw_event.client_id.parse().unwrap(), - ) - .await - .map_err(json_rpc_error_to_error_object)?; + IbcEvents::AcknowledgePacket(event) => { + let self_port_id = PortId::new( + self.ibc_handler() + .channelOwner(event.packet.sourceChannel) + .await + .unwrap() + ._0 + .to_string(), + ) + .unwrap(); - let client_meta = voyager_client - .client_meta( - self.chain_id.clone(), - height.into(), - raw_event.client_id.parse().unwrap(), + let ( + counterparty_chain_id, + client_info, + source_channel, + destination_channel, + channel_ordering, + ) = self + .make_packet_metadata( + height, + self_port_id, + ChannelId::new(event.packet.sourceChannel), + e.try_get()?, ) - .await - .map_err(json_rpc_error_to_error_object)?; + .await?; Ok(data(ChainEvent { chain_id: self.chain_id.clone(), client_info, - counterparty_chain_id: client_meta.chain_id, + counterparty_chain_id, tx_hash, provable_height: height, - event: ConnectionOpenConfirm { - client_id: raw_event.client_id.parse().unwrap(), - connection_id: raw_event.connection_id.parse().unwrap(), - counterparty_client_id: raw_event - .counterparty_client_id - .parse() - .unwrap(), - counterparty_connection_id: raw_event - .counterparty_connection_id - .parse() - .unwrap(), + event: voyager_message::data::AcknowledgePacket { + packet: PacketMetadata { + sequence: event.packet.sequence.try_into().unwrap(), + source_channel, + destination_channel, + channel_ordering, + timeout_height: Height::new(event.packet.timeoutHeight), + timeout_timestamp: event.packet.timeoutTimestamp, + }, } .into(), })) } + // packet origin is the counterparty chain + IbcEvents::WriteAcknowledgement(event) => { + let self_port_id = PortId::new( + self.ibc_handler() + .channelOwner(event.packet.destinationChannel) + .await + .unwrap() + ._0 + .to_string(), + ) + .unwrap(); - IBCHandlerEvents::ClientEvent(IBCClientEvents::ClientCreatedFilter( - raw_event, - )) => { - let client_id = raw_event.client_id.parse::().unwrap(); - - let client_info = voyager_client - .client_info(self.chain_id.clone(), client_id.clone()) - .await - .map_err(json_rpc_error_to_error_object)?; - - let client_meta = voyager_client - .client_meta( - self.chain_id.clone(), - height.into(), - raw_event.client_id.parse().unwrap(), + let ( + counterparty_chain_id, + client_info, + destination_channel, + source_channel, + channel_ordering, + ) = self + .make_packet_metadata( + height, + self_port_id, + ChannelId::new(event.packet.destinationChannel), + e.try_get()?, ) - .await - .map_err(json_rpc_error_to_error_object)?; + .await?; Ok(data(ChainEvent { chain_id: self.chain_id.clone(), - client_info: client_info.clone(), - counterparty_chain_id: client_meta.chain_id, + client_info, + counterparty_chain_id, tx_hash, provable_height: height, - event: CreateClient { - client_id, - client_type: client_info.client_type, - consensus_height: client_meta.height, + event: voyager_message::data::WriteAcknowledgement { + packet_data: event.packet.data.to_vec(), + packet_ack: event.acknowledgement.to_vec(), + packet: PacketMetadata { + sequence: event.packet.sequence.try_into().unwrap(), + source_channel, + destination_channel, + channel_ordering, + timeout_height: Height::new(event.packet.timeoutHeight), + timeout_timestamp: event.packet.timeoutTimestamp, + }, } .into(), })) } - IBCHandlerEvents::ClientEvent(IBCClientEvents::ClientRegisteredFilter( - raw_event, - )) => { - info!(?raw_event, "observed ClientRegistered event"); - - Ok(noop()) - } - IBCHandlerEvents::ClientEvent(IBCClientEvents::ClientUpdatedFilter( - raw_event, - )) => { - let client_id = raw_event.client_id.parse::().unwrap(); - - let client_info = voyager_client - .client_info(self.chain_id.clone(), client_id.clone()) - .await - .map_err(json_rpc_error_to_error_object)?; + IbcEvents::RecvPacket(event) => { + let self_port_id = PortId::new( + self.ibc_handler() + .channelOwner(event.packet.destinationChannel) + .await + .unwrap() + ._0 + .to_string(), + ) + .unwrap(); - let client_meta = voyager_client - .client_meta( - self.chain_id.clone(), - height.into(), - raw_event.client_id.parse().unwrap(), + let ( + counterparty_chain_id, + client_info, + destination_channel, + source_channel, + channel_ordering, + ) = self + .make_packet_metadata( + height, + self_port_id, + ChannelId::new(event.packet.destinationChannel), + e.try_get()?, ) - .await - .map_err(json_rpc_error_to_error_object)?; + .await?; Ok(data(ChainEvent { chain_id: self.chain_id.clone(), - client_info: client_info.clone(), - counterparty_chain_id: client_meta.chain_id, + client_info, + counterparty_chain_id, tx_hash, provable_height: height, - event: UpdateClient { - client_id, - client_type: client_info.client_type, - consensus_heights: vec![raw_event.height.into()], - } - .into(), - })) - } - IBCHandlerEvents::PacketEvent(event) => { - match event { - // packet origin is this chain - IBCPacketEvents::SendPacketFilter(event) => { - let ( - counterparty_chain_id, - client_info, - source_channel, - destination_channel, - channel_ordering, - ) = self - .make_packet_metadata( - height, - event.source_port.parse().unwrap(), - event.source_channel.parse().unwrap(), - e.try_get()?, - ) - .await?; - - Ok(data(ChainEvent { - chain_id: self.chain_id.clone(), - client_info, - counterparty_chain_id, - tx_hash, - provable_height: height, - event: voyager_message::data::SendPacket { - packet_data: event.data.to_vec(), - packet: PacketMetadata { - sequence: event.sequence.try_into().unwrap(), - source_channel, - destination_channel, - channel_ordering, - timeout_height: event.timeout_height.into(), - timeout_timestamp: event.timeout_timestamp, - }, - } - .into(), - })) - } - IBCPacketEvents::TimeoutPacketFilter(event) => { - let ( - counterparty_chain_id, - client_info, - source_channel, - destination_channel, - channel_ordering, - ) = self - .make_packet_metadata( - height, - event.packet.source_port.parse().unwrap(), - event.packet.source_channel.parse().unwrap(), - e.try_get()?, - ) - .await?; - - Ok(data(ChainEvent { - chain_id: self.chain_id.clone(), - client_info, - counterparty_chain_id, - tx_hash, - provable_height: height, - event: voyager_message::data::TimeoutPacket { - packet: PacketMetadata { - sequence: event.packet.sequence.try_into().unwrap(), - source_channel, - destination_channel, - channel_ordering, - timeout_height: event.packet.timeout_height.into(), - timeout_timestamp: event.packet.timeout_timestamp, - }, - } - .into(), - })) - } - IBCPacketEvents::AcknowledgePacketFilter(event) => { - let ( - counterparty_chain_id, - client_info, + event: voyager_message::data::RecvPacket { + packet_data: event.packet.data.to_vec(), + packet: PacketMetadata { + sequence: event.packet.sequence.try_into().unwrap(), source_channel, destination_channel, channel_ordering, - ) = self - .make_packet_metadata( - height, - event.packet.source_port.parse().unwrap(), - event.packet.source_channel.parse().unwrap(), - e.try_get()?, - ) - .await?; - - Ok(data(ChainEvent { - chain_id: self.chain_id.clone(), - client_info, - counterparty_chain_id, - tx_hash, - provable_height: height, - event: voyager_message::data::AcknowledgePacket { - packet: PacketMetadata { - sequence: event.packet.sequence.try_into().unwrap(), - source_channel, - destination_channel, - channel_ordering, - timeout_height: event.packet.timeout_height.into(), - timeout_timestamp: event.packet.timeout_timestamp, - }, - } - .into(), - })) - } - // packet origin is the counterparty chain - IBCPacketEvents::WriteAcknowledgementFilter(event) => { - let ( - counterparty_chain_id, - client_info, - destination_channel, - source_channel, - channel_ordering, - ) = self - .make_packet_metadata( - height, - event.packet.destination_port.parse().unwrap(), - event.packet.destination_channel.parse().unwrap(), - e.try_get()?, - ) - .await?; - - Ok(data(ChainEvent { - chain_id: self.chain_id.clone(), - client_info, - counterparty_chain_id, - tx_hash, - provable_height: height, - event: voyager_message::data::WriteAcknowledgement { - packet_data: event.packet.data.to_vec(), - packet_ack: event.acknowledgement.to_vec(), - packet: PacketMetadata { - sequence: event.packet.sequence.try_into().unwrap(), - source_channel, - destination_channel, - channel_ordering, - timeout_height: event.packet.timeout_height.into(), - timeout_timestamp: event.packet.timeout_timestamp, - }, - } - .into(), - })) - } - IBCPacketEvents::RecvPacketFilter(event) => { - let ( - counterparty_chain_id, - client_info, - destination_channel, - source_channel, - channel_ordering, - ) = self - .make_packet_metadata( - height, - event.packet.destination_port.parse().unwrap(), - event.packet.destination_channel.parse().unwrap(), - e.try_get()?, - ) - .await?; - - Ok(data(ChainEvent { - chain_id: self.chain_id.clone(), - client_info, - counterparty_chain_id, - tx_hash, - provable_height: height, - event: voyager_message::data::RecvPacket { - packet_data: event.packet.data.to_vec(), - packet: PacketMetadata { - sequence: event.packet.sequence.try_into().unwrap(), - source_channel, - destination_channel, - channel_ordering, - timeout_height: event.packet.timeout_height.into(), - timeout_timestamp: event.packet.timeout_timestamp, - }, - } - .into(), - })) + timeout_height: Height::new(event.packet.timeoutHeight), + timeout_timestamp: event.packet.timeoutTimestamp, + }, } - } + .into(), + })) + } + IbcEvents::RecvIntentPacket(event) => { + todo!() } - IBCHandlerEvents::OwnableEvent(_) => Ok(noop()), } } ModuleCall::FetchBlock(FetchBlock { slot }) => { @@ -1118,7 +1103,7 @@ impl PluginServer for Module { .provider .get_logs( &Filter::new() - .address(ethers::types::H160::from(self.ibc_handler_address)) + .address(alloy::primitives::Address::from(self.ibc_handler_address)) .from_block(block_number) .to_block(block_number), ) @@ -1142,9 +1127,9 @@ impl PluginServer for Module { .expect("log should have transaction_hash") .into(); - match IBCHandlerEvents::decode_log(&log.clone().into()) { + match ibc::Ibc::IbcEvents::decode_log(&log, true) { Ok(event) => { - trace!(?event, "found IBCHandler event"); + trace!(?event, "found IbcHandler event"); Some(call(PluginMessage::new( self.plugin_name(), @@ -1158,7 +1143,7 @@ impl PluginServer for Module { Err(e) => { warn!( ?log, - "could not decode IBCHandler event: {}", + "could not decode IbcHandler event: {}", ErrorReporter(e) ); None diff --git a/voyager/plugins/event-source/movement/Cargo.toml b/voyager/plugins/event-source/movement/Cargo.toml index 430ac7971c..17e4c33db5 100644 --- a/voyager/plugins/event-source/movement/Cargo.toml +++ b/voyager/plugins/event-source/movement/Cargo.toml @@ -30,6 +30,6 @@ thiserror = { workspace = true } tokio = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } -unionlabs = { workspace = true } +unionlabs = { workspace = true, features = ["serde", "valuable", "proto"] } voyager-message = { workspace = true } voyager-vm = { workspace = true } diff --git a/voyager/plugins/event-source/movement/src/call.rs b/voyager/plugins/event-source/movement/src/call.rs index 636d9d3e34..ad3dbe0148 100644 --- a/voyager/plugins/event-source/movement/src/call.rs +++ b/voyager/plugins/event-source/movement/src/call.rs @@ -1,6 +1,6 @@ use enumorph::Enumorph; -use macros::model; use unionlabs::hash::H256; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/event-source/movement/src/callback.rs b/voyager/plugins/event-source/movement/src/callback.rs index a332e95f9a..b97db6946c 100644 --- a/voyager/plugins/event-source/movement/src/callback.rs +++ b/voyager/plugins/event-source/movement/src/callback.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/event-source/movement/src/data.rs b/voyager/plugins/event-source/movement/src/data.rs index 769c4844ec..3ac7804473 100644 --- a/voyager/plugins/event-source/movement/src/data.rs +++ b/voyager/plugins/event-source/movement/src/data.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/event-source/movement/src/events.rs b/voyager/plugins/event-source/movement/src/events.rs index 0cc9454b2d..ec9d0a90f0 100644 --- a/voyager/plugins/event-source/movement/src/events.rs +++ b/voyager/plugins/event-source/movement/src/events.rs @@ -1,6 +1,6 @@ use aptos_move_ibc::ibc; use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/event-source/movement/src/main.rs b/voyager/plugins/event-source/movement/src/main.rs index 63493feec6..a42284c947 100644 --- a/voyager/plugins/event-source/movement/src/main.rs +++ b/voyager/plugins/event-source/movement/src/main.rs @@ -22,7 +22,7 @@ use unionlabs::{ connection::{self, connection_end::ConnectionEnd}, }, ics24::{ChannelEndPath, ConnectionPath}, - id::{ChannelId, ClientId, PortId}, + id::{ChannelId, ClientId, ConnectionId, PortId}, ErrorReporter, QueryHeight, }; use voyager_message::{ @@ -141,11 +141,7 @@ impl Module { #[must_use] pub fn make_height(&self, height: u64) -> Height { - Height { - // TODO: Make this a constant - revision_number: 0, - revision_height: height, - } + Height::new(height) } pub async fn ledger_version_of_height(&self, height: u64) -> u64 { @@ -229,7 +225,7 @@ impl Module { QueryHeight::Latest, ChannelEndPath { port_id: self_channel.counterparty.port_id.clone(), - channel_id: self_channel.counterparty.channel_id.parse().unwrap(), + channel_id: self_channel.counterparty.channel_id.unwrap(), }, ) .await @@ -285,7 +281,7 @@ impl PluginServer for Module { call(PluginMessage::new( self.plugin_name(), ModuleCall::FetchBlocks(FetchBlocks { - height: fetch.start_height.revision_height, + height: fetch.start_height.height(), }), )) } @@ -472,401 +468,400 @@ impl PluginServer for Module { height, }) => { fn ibc_height(h: aptos_move_ibc::height::Height) -> Height { - Height { - revision_number: h.revision_number.0, - revision_height: h.revision_height.0, - } + Height::new_with_revision(h.revision_number.0, h.revision_height.0) } - let (full_event, client_id): (FullIbcEvent, ClientId) = match event { - events::IbcEvent::CreateClient(event) => ( - CreateClient { - client_id: event.client_id.parse().unwrap(), - client_type: ClientType::new(event.client_type), - consensus_height: ibc_height(event.consensus_height), - } - .into(), - event.client_id.parse().unwrap(), - ), - events::IbcEvent::UpdateClient(event) => ( - UpdateClient { - client_id: event.client_id.parse().unwrap(), - client_type: ClientType::new(event.client_type), - consensus_heights: vec![ibc_height(event.height)], - } - .into(), - event.client_id.parse().unwrap(), - ), - events::IbcEvent::ConnectionOpenInit(event) => ( - ConnectionOpenInit { - client_id: event.client_id.parse().unwrap(), - connection_id: event.connection_id.parse().unwrap(), - counterparty_client_id: event.counterparty_client_id.parse().unwrap(), - } - .into(), - event.client_id.parse().unwrap(), - ), - events::IbcEvent::ConnectionOpenTry(event) => ( - ConnectionOpenTry { - client_id: event.client_id.parse().unwrap(), - connection_id: event.connection_id.parse().unwrap(), - counterparty_client_id: event.counterparty_client_id.parse().unwrap(), - counterparty_connection_id: event - .counterparty_connection_id - .parse() - .unwrap(), - } - .into(), - event.client_id.parse().unwrap(), - ), - events::IbcEvent::ConnectionOpenAck(event) => ( - ConnectionOpenAck { - client_id: event.client_id.parse().unwrap(), - connection_id: event.connection_id.parse().unwrap(), - counterparty_client_id: event.counterparty_client_id.parse().unwrap(), - counterparty_connection_id: event - .counterparty_connection_id - .parse() - .unwrap(), - } - .into(), - event.client_id.parse().unwrap(), - ), - events::IbcEvent::ConnectionOpenConfirm(e) => ( - ConnectionOpenConfirm { - client_id: e.client_id.parse().unwrap(), - connection_id: e.connection_id.parse().unwrap(), - counterparty_client_id: e.counterparty_client_id.parse().unwrap(), - counterparty_connection_id: e - .counterparty_connection_id - .parse() - .unwrap(), - } - .into(), - e.client_id.parse().unwrap(), - ), - events::IbcEvent::ChannelOpenInit(event) => { - let ledger_version = self.ledger_version_of_height(height).await; - - let connection = self - .get_connection( - self.ibc_handler_address.into(), - (event.connection_id,), - Some(ledger_version), - ) - .await - .unwrap() - .into_option() - .unwrap(); - - let connection = convert_connection(connection); - - let client_id = connection.client_id.clone(); - - ( - ChannelOpenInit { - port_id: event.port_id.parse().unwrap(), - channel_id: event.channel_id.parse().unwrap(), - counterparty_port_id: event.counterparty_port_id.parse().unwrap(), - connection, - version: event.version, - } - .into(), - client_id, - ) - } - events::IbcEvent::ChannelOpenTry(event) => { - let ledger_version = self.ledger_version_of_height(height).await; - - let connection = self - .get_connection( - self.ibc_handler_address.into(), - (event.connection_id,), - Some(ledger_version), - ) - .await - .unwrap() - .into_option() - .unwrap(); - - let connection = convert_connection(connection); - - let client_id = connection.client_id.clone(); - - ( - ChannelOpenTry { - port_id: event.port_id.parse().unwrap(), - channel_id: event.channel_id.parse().unwrap(), - counterparty_port_id: event.counterparty_port_id.parse().unwrap(), - counterparty_channel_id: event - .counterparty_port_id - .parse() - .unwrap(), - connection, - version: event.version, - } - .into(), - client_id, - ) - } - events::IbcEvent::ChannelOpenAck(event) => { - let ledger_version = self.ledger_version_of_height(height).await; - - let connection = self - .get_connection( - self.ibc_handler_address.into(), - (event.connection_id,), - Some(ledger_version), - ) - .await - .unwrap() - .into_option() - .unwrap(); - - let channel = self - .get_channel( - self.ibc_handler_address.into(), - (event.port_id.clone(), event.channel_id.clone()), - Some(ledger_version), - ) - .await - .unwrap() - .into_option() - .unwrap(); - - let connection = convert_connection(connection); - - let channel = convert_channel(channel); - - let client_id = connection.client_id.clone(); - - ( - ChannelOpenAck { - port_id: event.port_id.parse().unwrap(), - channel_id: event.channel_id.parse().unwrap(), - counterparty_port_id: event.counterparty_port_id.parse().unwrap(), - counterparty_channel_id: event - .counterparty_channel_id - .parse() - .unwrap(), - connection, - version: channel.version, - } - .into(), - client_id, - ) - } - events::IbcEvent::ChannelOpenConfirm(event) => { - let ledger_version = self.ledger_version_of_height(height).await; - - let connection = self - .get_connection( - self.ibc_handler_address.into(), - (event.connection_id,), - Some(ledger_version), - ) - .await - .unwrap() - .into_option() - .unwrap(); - - let channel = self - .get_channel( - self.ibc_handler_address.into(), - (event.port_id.clone(), event.channel_id.clone()), - Some(ledger_version), - ) - .await - .unwrap() - .into_option() - .unwrap(); - - let connection = convert_connection(connection); - - let channel = convert_channel(channel); - - let client_id = connection.client_id.clone(); - - ( - ChannelOpenConfirm { - port_id: event.port_id.parse().unwrap(), - channel_id: event.channel_id.parse().unwrap(), - counterparty_port_id: event.counterparty_port_id.parse().unwrap(), - counterparty_channel_id: event - .counterparty_channel_id - .parse() - .unwrap(), - connection, - version: channel.version, - } - .into(), - client_id, - ) - } - events::IbcEvent::WriteAcknowledgement(event) => { - let ( - _counterparty_chain_id, - _client_info, - destination_channel, - source_channel, - channel_ordering, - ) = self - .make_packet_metadata( - self.make_height(height), - event.packet.destination_port.parse().unwrap(), - event.packet.destination_channel.parse().unwrap(), - e.try_get()?, - ) - .await?; - - let client_id = destination_channel.connection.client_id.clone(); - - ( - WriteAcknowledgement { - packet_data: event.packet.data.into(), - packet_ack: event.acknowledgement.into(), - packet: PacketMetadata { - sequence: (*event.packet.sequence.inner()).try_into().unwrap(), - source_channel, - destination_channel, - channel_ordering, - timeout_height: ibc_height(event.packet.timeout_height), - timeout_timestamp: *event.packet.timeout_timestamp.inner(), - }, - } - .into(), - client_id, - ) - } - events::IbcEvent::RecvPacket(event) => { - let ( - _counterparty_chain_id, - _client_info, - destination_channel, - source_channel, - channel_ordering, - ) = self - .make_packet_metadata( - self.make_height(height), - event.packet.destination_port.parse().unwrap(), - event.packet.destination_channel.parse().unwrap(), - e.try_get()?, - ) - .await?; - - let client_id = destination_channel.connection.client_id.clone(); - - ( - RecvPacket { - packet_data: event.packet.data.into(), - packet: PacketMetadata { - sequence: (*event.packet.sequence.inner()).try_into().unwrap(), - source_channel, - destination_channel, - channel_ordering, - timeout_height: ibc_height(event.packet.timeout_height), - timeout_timestamp: *event.packet.timeout_timestamp.inner(), - }, - } - .into(), - client_id, - ) - } - events::IbcEvent::SendPacket(event) => { - let ( - _counterparty_chain_id, - _client_info, - source_channel, - destination_channel, - channel_ordering, - ) = self - .make_packet_metadata( - self.make_height(height), - event.source_port.parse().unwrap(), - event.source_channel.parse().unwrap(), - e.try_get()?, - ) - .await?; - - let client_id = source_channel.connection.client_id.clone(); - - ( - SendPacket { - packet_data: event.data.into(), - packet: PacketMetadata { - sequence: (*event.sequence.inner()).try_into().unwrap(), - source_channel, - destination_channel, - channel_ordering, - timeout_height: ibc_height(event.timeout_height), - timeout_timestamp: *event.timeout_timestamp.inner(), - }, - } - .into(), - client_id, - ) - } - events::IbcEvent::AcknowledgePacket(event) => { - let ( - _counterparty_chain_id, - _client_info, - source_channel, - destination_channel, - channel_ordering, - ) = self - .make_packet_metadata( - self.make_height(height), - event.packet.source_port.parse().unwrap(), - event.packet.source_channel.parse().unwrap(), - e.try_get()?, - ) - .await?; - - let client_id = source_channel.connection.client_id.clone(); - - ( - AcknowledgePacket { - packet: PacketMetadata { - sequence: (*event.packet.sequence.inner()).try_into().unwrap(), - source_channel, - destination_channel, - channel_ordering, - timeout_height: ibc_height(event.packet.timeout_height), - timeout_timestamp: *event.packet.timeout_timestamp.inner(), - }, - } - .into(), - client_id, - ) - } - events::IbcEvent::TimeoutPacket(_) => todo!(), - }; - - let voyager_client = e.try_get::()?; - - let client_info = voyager_client - .client_info(self.chain_id.clone(), client_id.clone()) - .await - .map_err(json_rpc_error_to_error_object)?; - - let client_meta = voyager_client - .client_meta( - self.chain_id.clone(), - self.make_height(height).into(), - client_id.clone(), - ) - .await - .map_err(json_rpc_error_to_error_object)?; - - Ok(data(ChainEvent { - chain_id: self.chain_id.clone(), - client_info, - counterparty_chain_id: client_meta.chain_id, - tx_hash, - // TODO: Review this, does it need to be +1? - provable_height: self.make_height(height), - event: full_event, - })) + // let (full_event, client_id): (FullIbcEvent, ClientId) = match event { + // events::IbcEvent::CreateClient(event) => ( + // CreateClient { + // client_id: event.client_id.parse().unwrap(), + // client_type: ClientType::new(event.client_type), + // consensus_height: ibc_height(event.consensus_height), + // } + // .into(), + // event.client_id.parse().unwrap(), + // ), + // events::IbcEvent::UpdateClient(event) => ( + // UpdateClient { + // client_id: event.client_id.parse().unwrap(), + // client_type: ClientType::new(event.client_type), + // consensus_heights: vec![ibc_height(event.height)], + // } + // .into(), + // event.client_id.parse().unwrap(), + // ), + // events::IbcEvent::ConnectionOpenInit(event) => ( + // ConnectionOpenInit { + // client_id: event.client_id.parse().unwrap(), + // connection_id: event.connection_id.parse().unwrap(), + // counterparty_client_id: event.counterparty_client_id.parse().unwrap(), + // } + // .into(), + // event.client_id.parse().unwrap(), + // ), + // events::IbcEvent::ConnectionOpenTry(event) => ( + // ConnectionOpenTry { + // client_id: event.client_id.parse().unwrap(), + // connection_id: event.connection_id.parse().unwrap(), + // counterparty_client_id: event.counterparty_client_id.parse().unwrap(), + // counterparty_connection_id: event + // .counterparty_connection_id + // .parse() + // .unwrap(), + // } + // .into(), + // event.client_id.parse().unwrap(), + // ), + // events::IbcEvent::ConnectionOpenAck(event) => ( + // ConnectionOpenAck { + // client_id: event.client_id.parse().unwrap(), + // connection_id: event.connection_id.parse().unwrap(), + // counterparty_client_id: event.counterparty_client_id.parse().unwrap(), + // counterparty_connection_id: event + // .counterparty_connection_id + // .parse() + // .unwrap(), + // } + // .into(), + // event.client_id.parse().unwrap(), + // ), + // events::IbcEvent::ConnectionOpenConfirm(e) => ( + // ConnectionOpenConfirm { + // client_id: e.client_id.parse().unwrap(), + // connection_id: e.connection_id.parse().unwrap(), + // counterparty_client_id: e.counterparty_client_id.parse().unwrap(), + // counterparty_connection_id: e + // .counterparty_connection_id + // .parse() + // .unwrap(), + // } + // .into(), + // e.client_id.parse().unwrap(), + // ), + // events::IbcEvent::ChannelOpenInit(event) => { + // let ledger_version = self.ledger_version_of_height(height).await; + + // let connection = self + // .get_connection( + // self.ibc_handler_address.into(), + // (event.connection_id,), + // Some(ledger_version), + // ) + // .await + // .unwrap() + // .into_option() + // .unwrap(); + + // let connection = convert_connection(connection); + + // let client_id = connection.client_id.clone(); + + // ( + // ChannelOpenInit { + // port_id: event.port_id.parse().unwrap(), + // channel_id: event.channel_id.parse().unwrap(), + // counterparty_port_id: event.counterparty_port_id.parse().unwrap(), + // connection, + // version: event.version, + // } + // .into(), + // client_id, + // ) + // } + // events::IbcEvent::ChannelOpenTry(event) => { + // let ledger_version = self.ledger_version_of_height(height).await; + + // let connection = self + // .get_connection( + // self.ibc_handler_address.into(), + // (event.connection_id,), + // Some(ledger_version), + // ) + // .await + // .unwrap() + // .into_option() + // .unwrap(); + + // let connection = convert_connection(connection); + + // let client_id = connection.client_id.clone(); + + // ( + // ChannelOpenTry { + // port_id: event.port_id.parse().unwrap(), + // channel_id: event.channel_id.parse().unwrap(), + // counterparty_port_id: event.counterparty_port_id.parse().unwrap(), + // counterparty_channel_id: event + // .counterparty_port_id + // .parse() + // .unwrap(), + // connection, + // version: event.version, + // } + // .into(), + // client_id, + // ) + // } + // events::IbcEvent::ChannelOpenAck(event) => { + // let ledger_version = self.ledger_version_of_height(height).await; + + // let connection = self + // .get_connection( + // self.ibc_handler_address.into(), + // (event.connection_id,), + // Some(ledger_version), + // ) + // .await + // .unwrap() + // .into_option() + // .unwrap(); + + // let channel = self + // .get_channel( + // self.ibc_handler_address.into(), + // (event.port_id.clone(), event.channel_id.clone()), + // Some(ledger_version), + // ) + // .await + // .unwrap() + // .into_option() + // .unwrap(); + + // let connection = convert_connection(connection); + + // let channel = convert_channel(channel); + + // let client_id = connection.client_id.clone(); + + // ( + // ChannelOpenAck { + // port_id: event.port_id.parse().unwrap(), + // channel_id: event.channel_id.parse().unwrap(), + // counterparty_port_id: event.counterparty_port_id.parse().unwrap(), + // counterparty_channel_id: event + // .counterparty_channel_id + // .parse() + // .unwrap(), + // connection, + // version: channel.version, + // } + // .into(), + // client_id, + // ) + // } + // events::IbcEvent::ChannelOpenConfirm(event) => { + // let ledger_version = self.ledger_version_of_height(height).await; + + // let connection = self + // .get_connection( + // self.ibc_handler_address.into(), + // (event.connection_id,), + // Some(ledger_version), + // ) + // .await + // .unwrap() + // .into_option() + // .unwrap(); + + // let channel = self + // .get_channel( + // self.ibc_handler_address.into(), + // (event.port_id.clone(), event.channel_id.clone()), + // Some(ledger_version), + // ) + // .await + // .unwrap() + // .into_option() + // .unwrap(); + + // let connection = convert_connection(connection); + + // let channel = convert_channel(channel); + + // let client_id = connection.client_id.clone(); + + // ( + // ChannelOpenConfirm { + // port_id: event.port_id.parse().unwrap(), + // channel_id: event.channel_id.parse().unwrap(), + // counterparty_port_id: event.counterparty_port_id.parse().unwrap(), + // counterparty_channel_id: event + // .counterparty_channel_id + // .parse() + // .unwrap(), + // connection, + // version: channel.version, + // } + // .into(), + // client_id, + // ) + // } + // events::IbcEvent::WriteAcknowledgement(event) => { + // let ( + // _counterparty_chain_id, + // _client_info, + // destination_channel, + // source_channel, + // channel_ordering, + // ) = self + // .make_packet_metadata( + // self.make_height(height), + // event.packet.destination_port.parse().unwrap(), + // event.packet.destination_channel.parse().unwrap(), + // e.try_get()?, + // ) + // .await?; + + // let client_id = destination_channel.connection.client_id.clone(); + + // ( + // WriteAcknowledgement { + // packet_data: event.packet.data.into(), + // packet_ack: event.acknowledgement.into(), + // packet: PacketMetadata { + // sequence: (*event.packet.sequence.inner()).try_into().unwrap(), + // source_channel, + // destination_channel, + // channel_ordering, + // timeout_height: ibc_height(event.packet.timeout_height), + // timeout_timestamp: *event.packet.timeout_timestamp.inner(), + // }, + // } + // .into(), + // client_id, + // ) + // } + // events::IbcEvent::RecvPacket(event) => { + // let ( + // _counterparty_chain_id, + // _client_info, + // destination_channel, + // source_channel, + // channel_ordering, + // ) = self + // .make_packet_metadata( + // self.make_height(height), + // event.packet.destination_port.parse().unwrap(), + // event.packet.destination_channel.parse().unwrap(), + // e.try_get()?, + // ) + // .await?; + + // let client_id = destination_channel.connection.client_id.clone(); + + // ( + // RecvPacket { + // packet_data: event.packet.data.into(), + // packet: PacketMetadata { + // sequence: (*event.packet.sequence.inner()).try_into().unwrap(), + // source_channel, + // destination_channel, + // channel_ordering, + // timeout_height: ibc_height(event.packet.timeout_height), + // timeout_timestamp: *event.packet.timeout_timestamp.inner(), + // }, + // } + // .into(), + // client_id, + // ) + // } + // events::IbcEvent::SendPacket(event) => { + // let ( + // _counterparty_chain_id, + // _client_info, + // source_channel, + // destination_channel, + // channel_ordering, + // ) = self + // .make_packet_metadata( + // self.make_height(height), + // event.source_port.parse().unwrap(), + // event.source_channel.parse().unwrap(), + // e.try_get()?, + // ) + // .await?; + + // let client_id = source_channel.connection.client_id.clone(); + + // ( + // SendPacket { + // packet_data: event.data.into(), + // packet: PacketMetadata { + // sequence: (*event.sequence.inner()).try_into().unwrap(), + // source_channel, + // destination_channel, + // channel_ordering, + // timeout_height: ibc_height(event.timeout_height), + // timeout_timestamp: *event.timeout_timestamp.inner(), + // }, + // } + // .into(), + // client_id, + // ) + // } + // events::IbcEvent::AcknowledgePacket(event) => { + // let ( + // _counterparty_chain_id, + // _client_info, + // source_channel, + // destination_channel, + // channel_ordering, + // ) = self + // .make_packet_metadata( + // self.make_height(height), + // event.packet.source_port.parse().unwrap(), + // event.packet.source_channel.parse().unwrap(), + // e.try_get()?, + // ) + // .await?; + + // let client_id = source_channel.connection.client_id.clone(); + + // ( + // AcknowledgePacket { + // packet: PacketMetadata { + // sequence: (*event.packet.sequence.inner()).try_into().unwrap(), + // source_channel, + // destination_channel, + // channel_ordering, + // timeout_height: ibc_height(event.packet.timeout_height), + // timeout_timestamp: *event.packet.timeout_timestamp.inner(), + // }, + // } + // .into(), + // client_id, + // ) + // } + // events::IbcEvent::TimeoutPacket(_) => todo!(), + // }; + + // let voyager_client = e.try_get::()?; + + // let client_info = voyager_client + // .client_info(self.chain_id.clone(), client_id.clone()) + // .await + // .map_err(json_rpc_error_to_error_object)?; + + // let client_meta = voyager_client + // .client_meta( + // self.chain_id.clone(), + // self.make_height(height).into(), + // client_id.clone(), + // ) + // .await + // .map_err(json_rpc_error_to_error_object)?; + + // Ok(data(ChainEvent { + // chain_id: self.chain_id.clone(), + // client_info, + // counterparty_chain_id: client_meta.chain_id, + // tx_hash, + // // TODO: Review this, does it need to be +1? + // provable_height: self.make_height(height), + // event: full_event, + // })) + + todo!(); } } } @@ -880,7 +875,7 @@ pub fn convert_connection( connection: aptos_move_ibc::connection_end::ConnectionEnd, ) -> ConnectionEnd { ConnectionEnd { - client_id: connection.client_id.parse().unwrap(), + client_id: ClientId::parse_prefixed(&connection.client_id).unwrap().1, versions: connection .versions .into_iter() @@ -896,11 +891,13 @@ pub fn convert_connection( state: connection::state::State::try_from(u8::try_from(connection.state.0).unwrap()) .unwrap(), counterparty: connection::counterparty::Counterparty { - client_id: connection.counterparty.client_id.parse().unwrap(), + client_id: ClientId::parse_prefixed(&connection.counterparty.client_id) + .unwrap() + .1, connection_id: if connection.counterparty.connection_id.is_empty() { None } else { - Some(connection.counterparty.connection_id.parse().unwrap()) + Some(ConnectionId::parse_prefixed(&connection.counterparty.connection_id).unwrap()) }, prefix: MerklePrefix { key_prefix: connection.counterparty.prefix.key_prefix.into(), @@ -916,12 +913,12 @@ pub fn convert_channel(channel: aptos_move_ibc::channel::Channel) -> Channel { ordering: channel.ordering.try_into().unwrap(), counterparty: channel::counterparty::Counterparty { port_id: channel.counterparty.port_id.parse().unwrap(), - channel_id: channel.counterparty.channel_id.parse().unwrap(), + channel_id: Some(ChannelId::parse_prefixed(&channel.counterparty.channel_id).unwrap()), }, connection_hops: channel .connection_hops .into_iter() - .map(|hop| hop.parse().unwrap()) + .map(|hop| ConnectionId::parse_prefixed(&hop).unwrap()) .collect(), version: channel.version, } diff --git a/voyager/plugins/transaction-batch/src/call.rs b/voyager/plugins/transaction-batch/src/call.rs index ed4f778d10..35b48afb41 100644 --- a/voyager/plugins/transaction-batch/src/call.rs +++ b/voyager/plugins/transaction-batch/src/call.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use unionlabs::id::ClientId; use crate::data::BatchableEvent; diff --git a/voyager/plugins/transaction-batch/src/callback.rs b/voyager/plugins/transaction-batch/src/callback.rs index b45df5954e..8dffad1781 100644 --- a/voyager/plugins/transaction-batch/src/callback.rs +++ b/voyager/plugins/transaction-batch/src/callback.rs @@ -3,7 +3,7 @@ use std::collections::VecDeque; use enumorph::Enumorph; use itertools::Itertools; use jsonrpsee::{core::RpcResult, types::ErrorObject}; -use macros::model; +use voyager_message::macros::model; use tracing::warn; use unionlabs::{ibc::core::client::height::Height, id::ClientId, QueryHeight}; use voyager_message::{ diff --git a/voyager/plugins/transaction-batch/src/data.rs b/voyager/plugins/transaction-batch/src/data.rs index 6ed5b7677a..352a37e82b 100644 --- a/voyager/plugins/transaction-batch/src/data.rs +++ b/voyager/plugins/transaction-batch/src/data.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use subset_of::SubsetOf; use unionlabs::{ibc::core::client::height::Height, id::ClientId}; use voyager_message::data::{ diff --git a/voyager/plugins/transaction-batch/src/main.rs b/voyager/plugins/transaction-batch/src/main.rs index b8b50e0c8b..5def54ae84 100644 --- a/voyager/plugins/transaction-batch/src/main.rs +++ b/voyager/plugins/transaction-batch/src/main.rs @@ -352,7 +352,7 @@ impl Module { .counterparty_client_id() .expect("all batchable messages have a counterparty"); - trace!(%client_id, "batching event"); + trace!(client_id = client_id.as_value(), "batching event"); let first_seen_at: u64 = SystemTime::now() .duration_since(UNIX_EPOCH) @@ -524,7 +524,10 @@ impl Module { .max() .expect("batch has at least one event; qed;"); - debug!(%client_id, "querying client meta for client"); + debug!( + client_id = client_id.as_value(), + "querying client meta for client" + ); client .client_meta( diff --git a/voyager/plugins/transaction/aptos/src/call.rs b/voyager/plugins/transaction/aptos/src/call.rs index b0dcc7c072..eb1bebcf93 100644 --- a/voyager/plugins/transaction/aptos/src/call.rs +++ b/voyager/plugins/transaction/aptos/src/call.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use voyager_message::data::IbcMessage; #[model] diff --git a/voyager/plugins/transaction/aptos/src/callback.rs b/voyager/plugins/transaction/aptos/src/callback.rs index 72eabf90f7..706c7a064e 100644 --- a/voyager/plugins/transaction/aptos/src/callback.rs +++ b/voyager/plugins/transaction/aptos/src/callback.rs @@ -1,4 +1,4 @@ -use macros::model; +use voyager_message::macros::model; #[model] pub enum ModuleCallback {} diff --git a/voyager/plugins/transaction/aptos/src/data.rs b/voyager/plugins/transaction/aptos/src/data.rs index 769c4844ec..3ac7804473 100644 --- a/voyager/plugins/transaction/aptos/src/data.rs +++ b/voyager/plugins/transaction/aptos/src/data.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/transaction/aptos/src/main.rs b/voyager/plugins/transaction/aptos/src/main.rs index b2c420ff78..3998ef0a7c 100644 --- a/voyager/plugins/transaction/aptos/src/main.rs +++ b/voyager/plugins/transaction/aptos/src/main.rs @@ -16,11 +16,14 @@ use jsonrpsee::{ }; use serde::{Deserialize, Serialize}; use sha3::Digest; -use tracing::instrument; -use unionlabs::hash::H256; +use tracing::{info, instrument}; +use unionlabs::{ + hash::H256, + id::{ChannelId, ConnectionId}, +}; use voyager_message::{ core::ChainId, - data::{log_msg, Data, IbcMessage, WithChainId}, + data::{Data, IbcMessage, WithChainId}, module::{PluginInfo, PluginServer}, run_plugin_server, DefaultCmd, Plugin, PluginMessage, VoyagerMessage, }; @@ -220,7 +223,8 @@ impl PluginServer for Module { let mut txs = vec![]; for (i, (msg, entry_fn)) in msgs.into_iter().enumerate() { - log_msg(&self.chain_id.to_string(), &msg); + info!(chain_id = %self.chain_id, msg = msg.as_value()); + // log_msg(&self.chain_id.to_string(), &msg); // dbg!(msg); let raw = RawTransaction::new_entry_function( @@ -296,7 +300,10 @@ fn process_msgs( msg, client.update_client( ibc_handler_address, - (data.client_id.to_string(), data.client_message), + ( + data.client_id.to_string_prefixed("PREFIX"), + data.client_message, + ), ), ), IbcMessage::ConnectionOpenInit(data) => ( @@ -304,16 +311,16 @@ fn process_msgs( client.connection_open_init( ibc_handler_address, ( - data.client_id.to_string(), + data.client_id.to_string_prefixed("PREFIX"), data.version.identifier, data.version .features .into_iter() .map(|f| f.to_string()) .collect::>(), - data.counterparty.client_id.to_string(), + data.counterparty.client_id.to_string_prefixed("PREFIX"), if let Some(conn) = data.counterparty.connection_id { - conn.to_string() + conn.to_string_prefixed() } else { String::new() }, @@ -328,15 +335,17 @@ fn process_msgs( client.connection_open_try( ibc_handler_address, ( - data.counterparty.client_id.to_string(), + // TODO: Figure this out + data.counterparty.client_id.to_string_prefixed("PREFIX"), if let Some(conn) = data.counterparty.connection_id { - conn.to_string() + conn.to_string_prefixed() } else { String::new() }, data.counterparty.prefix.key_prefix, data.delay_period, - data.client_id.to_string(), + // TODO: Figure this out + data.client_id.to_string_prefixed("PREFIX"), data.client_state, data.counterparty_versions .iter() @@ -353,8 +362,8 @@ fn process_msgs( .collect::>>(), data.proof_init, data.proof_client, - data.proof_height.revision_number, - data.proof_height.revision_height, + data.proof_height.revision(), + data.proof_height.height(), ), ), ), @@ -363,7 +372,7 @@ fn process_msgs( client.connection_open_ack( ibc_handler_address, ( - data.connection_id.to_string(), + data.connection_id.to_string_prefixed(), data.client_state, data.version.identifier, data.version @@ -373,9 +382,9 @@ fn process_msgs( .collect::>(), data.proof_try, data.proof_client, - data.counterparty_connection_id.to_string(), - data.proof_height.revision_number, - data.proof_height.revision_height, + data.counterparty_connection_id.to_string_prefixed(), + data.proof_height.revision(), + data.proof_height.height(), ), ), ), @@ -384,10 +393,10 @@ fn process_msgs( client.connection_open_confirm( ibc_handler_address, ( - data.connection_id.to_string(), + data.connection_id.to_string_prefixed(), data.proof_ack, - data.proof_height.revision_number, - data.proof_height.revision_height, + data.proof_height.revision(), + data.proof_height.height(), ), ), ), @@ -399,11 +408,16 @@ fn process_msgs( data.channel .connection_hops .iter() - .map(ToString::to_string) + .map(ConnectionId::to_string_prefixed) .collect::>(), data.channel.ordering as u8, data.channel.counterparty.port_id.to_string(), - data.channel.counterparty.channel_id, + data.channel + .counterparty + .channel_id + .as_ref() + .map(ChannelId::to_string_prefixed) + .unwrap_or_default(), data.channel.version, ), ), @@ -416,16 +430,21 @@ fn process_msgs( data.channel .connection_hops .iter() - .map(ToString::to_string) + .map(ConnectionId::to_string_prefixed) .collect::>(), data.channel.ordering as u8, data.channel.counterparty.port_id.to_string(), - data.channel.counterparty.channel_id, + data.channel + .counterparty + .channel_id + .as_ref() + .map(ChannelId::to_string_prefixed) + .unwrap_or_default(), data.counterparty_version, data.channel.version, data.proof_init, - data.proof_height.revision_number, - data.proof_height.revision_height, + data.proof_height.revision(), + data.proof_height.height(), ), ), ), @@ -434,12 +453,12 @@ fn process_msgs( client.channel_open_ack( data.port_id.to_string().parse().unwrap(), ( - data.channel_id.to_string(), - data.counterparty_channel_id.to_string(), + data.channel_id.to_string_prefixed(), + data.counterparty_channel_id.to_string_prefixed(), data.counterparty_version, data.proof_try, - data.proof_height.revision_number, - data.proof_height.revision_height, + data.proof_height.revision(), + data.proof_height.height(), ), ), ), @@ -448,10 +467,10 @@ fn process_msgs( client.channel_open_confirm( data.port_id.to_string().parse().unwrap(), ( - data.channel_id.to_string(), + data.channel_id.to_string_prefixed(), data.proof_ack, - data.proof_height.revision_number, - data.proof_height.revision_height, + data.proof_height.revision(), + data.proof_height.height(), ), ), ), @@ -462,16 +481,16 @@ fn process_msgs( ( data.packet.sequence.get(), data.packet.source_port.to_string(), - data.packet.source_channel.to_string(), + data.packet.source_channel.to_string_prefixed(), data.packet.destination_port.to_string(), - data.packet.destination_channel.to_string(), + data.packet.destination_channel.to_string_prefixed(), data.packet.data, - data.packet.timeout_height.revision_number, - data.packet.timeout_height.revision_height, + data.packet.timeout_height.revision(), + data.packet.timeout_height.height(), data.packet.timeout_timestamp, data.proof_commitment, - data.proof_height.revision_number, - data.proof_height.revision_height, + data.proof_height.revision(), + data.proof_height.height(), ), ), ), @@ -482,17 +501,17 @@ fn process_msgs( ( data.packet.sequence.get(), data.packet.source_port.to_string(), - data.packet.source_channel.to_string(), + data.packet.source_channel.to_string_prefixed(), data.packet.destination_port.to_string(), - data.packet.destination_channel.to_string(), + data.packet.destination_channel.to_string_prefixed(), data.packet.data, - data.packet.timeout_height.revision_number, - data.packet.timeout_height.revision_height, + data.packet.timeout_height.revision(), + data.packet.timeout_height.height(), data.packet.timeout_timestamp, data.acknowledgement, data.proof_acked, - data.proof_height.revision_number, - data.proof_height.revision_height, + data.proof_height.revision(), + data.proof_height.height(), ), ), ), diff --git a/voyager/plugins/transaction/cosmos-sdk/src/call.rs b/voyager/plugins/transaction/cosmos-sdk/src/call.rs index b0dcc7c072..eb1bebcf93 100644 --- a/voyager/plugins/transaction/cosmos-sdk/src/call.rs +++ b/voyager/plugins/transaction/cosmos-sdk/src/call.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use voyager_message::data::IbcMessage; #[model] diff --git a/voyager/plugins/transaction/cosmos-sdk/src/callback.rs b/voyager/plugins/transaction/cosmos-sdk/src/callback.rs index a332e95f9a..b97db6946c 100644 --- a/voyager/plugins/transaction/cosmos-sdk/src/callback.rs +++ b/voyager/plugins/transaction/cosmos-sdk/src/callback.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/transaction/cosmos-sdk/src/data.rs b/voyager/plugins/transaction/cosmos-sdk/src/data.rs index 769c4844ec..3ac7804473 100644 --- a/voyager/plugins/transaction/cosmos-sdk/src/data.rs +++ b/voyager/plugins/transaction/cosmos-sdk/src/data.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/transaction/cosmos-sdk/src/main.rs b/voyager/plugins/transaction/cosmos-sdk/src/main.rs index 7f4c432cdf..a5eee6b379 100644 --- a/voyager/plugins/transaction/cosmos-sdk/src/main.rs +++ b/voyager/plugins/transaction/cosmos-sdk/src/main.rs @@ -782,9 +782,11 @@ fn process_msgs( IbcMessage::ChannelOpenAck(message) => { mk_any(&protos::ibc::core::channel::v1::MsgChannelOpenAck { port_id: message.port_id.to_string(), - channel_id: message.channel_id.to_string(), + channel_id: message.channel_id.to_string_prefixed(), counterparty_version: message.counterparty_version, - counterparty_channel_id: message.counterparty_channel_id.to_string(), + counterparty_channel_id: message + .counterparty_channel_id + .to_string_prefixed(), proof_try: message.proof_try, proof_height: Some(message.proof_height.into()), signer: signer.to_string(), @@ -793,7 +795,7 @@ fn process_msgs( IbcMessage::ChannelOpenConfirm(message) => { mk_any(&protos::ibc::core::channel::v1::MsgChannelOpenConfirm { port_id: message.port_id.to_string(), - channel_id: message.channel_id.to_string(), + channel_id: message.channel_id.to_string_prefixed(), proof_height: Some(message.proof_height.into()), signer: signer.to_string(), proof_ack: message.proof_ack, diff --git a/voyager/plugins/transaction/ethereum/Cargo.toml b/voyager/plugins/transaction/ethereum/Cargo.toml index c2ab605dae..1e0ebc1ce1 100644 --- a/voyager/plugins/transaction/ethereum/Cargo.toml +++ b/voyager/plugins/transaction/ethereum/Cargo.toml @@ -4,13 +4,14 @@ name = "voyager-transaction-plugin-ethereum" version = "0.1.0" [dependencies] +alloy = { workspace = true, features = ["contract", "network", "providers", "signers", "signer-local"] } beacon-api = { workspace = true } bip32 = { workspace = true } chain-utils = { workspace = true } -contracts = { workspace = true, features = ["providers"] } enumorph = { workspace = true } -ethers = { workspace = true, features = ["rustls", "ws"] } futures = { workspace = true } +ibc-solidity = { workspace = true } +itertools = "0.13.0" jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] } macros = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/voyager/plugins/transaction/ethereum/src/call.rs b/voyager/plugins/transaction/ethereum/src/call.rs index 4ed9c042bc..6017861f81 100644 --- a/voyager/plugins/transaction/ethereum/src/call.rs +++ b/voyager/plugins/transaction/ethereum/src/call.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; use voyager_message::data::IbcMessage; #[model] diff --git a/voyager/plugins/transaction/ethereum/src/callback.rs b/voyager/plugins/transaction/ethereum/src/callback.rs index 72eabf90f7..706c7a064e 100644 --- a/voyager/plugins/transaction/ethereum/src/callback.rs +++ b/voyager/plugins/transaction/ethereum/src/callback.rs @@ -1,4 +1,4 @@ -use macros::model; +use voyager_message::macros::model; #[model] pub enum ModuleCallback {} diff --git a/voyager/plugins/transaction/ethereum/src/data.rs b/voyager/plugins/transaction/ethereum/src/data.rs index 769c4844ec..3ac7804473 100644 --- a/voyager/plugins/transaction/ethereum/src/data.rs +++ b/voyager/plugins/transaction/ethereum/src/data.rs @@ -1,5 +1,5 @@ use enumorph::Enumorph; -use macros::model; +use voyager_message::macros::model; #[model] #[derive(Enumorph)] diff --git a/voyager/plugins/transaction/ethereum/src/main.rs b/voyager/plugins/transaction/ethereum/src/main.rs index 6f43e165a0..56da4d8f81 100644 --- a/voyager/plugins/transaction/ethereum/src/main.rs +++ b/voyager/plugins/transaction/ethereum/src/main.rs @@ -1,53 +1,51 @@ -use std::{collections::VecDeque, sync::Arc}; - +use std::collections::VecDeque; + +use alloy::{ + contract::{Error, RawCallBuilder}, + providers::{PendingTransactionError, Provider, ProviderBuilder, RootProvider}, + signers::local::LocalSigner, + sol_types::{SolEvent, SolInterface}, + transports::{BoxTransport, Transport, TransportError}, +}; +use bip32::secp256k1::ecdsa::{self, SigningKey}; use chain_utils::{ - ethereum::{EthereumSignerMiddleware, IbcHandlerErrors}, keyring::{ConcurrentKeyring, KeyringConfig, KeyringEntry}, BoxDynError, }; -use contracts::{ - ibc_handler::{ - AcknowledgePacketCall, ChannelOpenAckCall, ChannelOpenConfirmCall, ChannelOpenInitCall, - ChannelOpenTryCall, ConnectionOpenAckCall, ConnectionOpenConfirmCall, - ConnectionOpenInitCall, ConnectionOpenTryCall, CreateClientCall, IBCHandler, - RecvPacketCall, TimeoutPacketCall, UpdateClientCall, - }, - multicall::{Call3, Multicall, MulticallResultFilter}, -}; -use ethers::{ - abi::AbiDecode, - contract::{ContractError, EthCall, EthLogDecode, FunctionCall}, - core::k256::ecdsa, - middleware::{ - nonce_manager::NonceManagerError, signer::SignerMiddlewareError, NonceManagerMiddleware, - SignerMiddleware, - }, - providers::{Middleware, Provider, ProviderError, Ws}, - signers::{LocalWallet, Signer}, - types::TransactionReceipt, - utils::secret_key_to_address, +use ibc_solidity::ibc::{ + ChannelCounterparty, ChannelOrder, ChannelState, ConnectionCounterparty, + Ibc::{self, IbcErrors}, + MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelOpenInit, MsgChannelOpenTry, + MsgConnectionOpenAck, MsgConnectionOpenConfirm, MsgConnectionOpenInit, MsgConnectionOpenTry, + MsgCreateClient, MsgPacketAcknowledgement, MsgPacketRecv, MsgPacketTimeout, MsgUpdateClient, }; +use itertools::Itertools; use jsonrpsee::{ core::{async_trait, RpcResult}, - types::ErrorObject, + types::{ErrorObject, ErrorObjectOwned}, Extensions, }; use serde::{Deserialize, Serialize}; -use tracing::{debug, error, error_span, info, info_span, instrument, warn, Instrument}; +use tracing::{error, error_span, info, info_span, instrument, warn, Instrument}; use unionlabs::{ + ethereum::keccak256, hash::{H160, H256}, - uint::U256, + ibc::core::channel::{channel::Channel, order::Order, packet::Packet, state::State}, ErrorReporter, }; use voyager_message::{ core::ChainId, - data::{log_msg, Data, IbcMessage, MsgCreateClientData, WithChainId}, + data::{Data, IbcMessage, MsgCreateClientData, WithChainId}, module::{PluginInfo, PluginServer}, - run_plugin_server, DefaultCmd, Plugin, PluginMessage, VoyagerMessage, + run_plugin_server, DefaultCmd, Plugin, PluginMessage, VoyagerMessage, FATAL_JSONRPC_ERROR_CODE, }; use voyager_vm::{call, defer, now, pass::PassResult, seq, Op}; -use crate::{call::ModuleCall, callback::ModuleCallback}; +use crate::{ + call::ModuleCall, + callback::ModuleCallback, + multicall::{Call3, Multicall, MulticallResult}, +}; pub mod call; pub mod callback; @@ -66,11 +64,11 @@ pub struct Module { pub ibc_handler_address: H160, pub multicall_address: H160, - pub provider: Provider, + pub provider: RootProvider, - pub keyring: ConcurrentKeyring, + pub keyring: ConcurrentKeyring>, - pub max_gas_price: Option, + pub max_gas_price: Option, pub legacy: bool, } @@ -89,7 +87,7 @@ pub struct Config { pub keyring: KeyringConfig, #[serde(default)] - pub max_gas_price: Option, + pub max_gas_price: Option, #[serde(default)] pub legacy: bool, @@ -103,10 +101,12 @@ impl Plugin for Module { type Cmd = DefaultCmd; async fn new(config: Self::Config) -> Result { - let provider = Provider::new(Ws::connect(config.eth_rpc_api).await?); + let provider = ProviderBuilder::new() + .on_builtin(&config.eth_rpc_api) + .await?; - let raw_chain_id = provider.get_chainid().await?; - let chain_id = ChainId::new(U256(raw_chain_id).to_string()); + let raw_chain_id = provider.get_chain_id().await?; + let chain_id = ChainId::new(raw_chain_id.to_string()); if chain_id != config.chain_id { return Err(format!( @@ -129,15 +129,12 @@ impl Plugin for Module { ) .unwrap(); - let address = secret_key_to_address(&signing_key); - - let wallet = - LocalWallet::new_with_signer(signing_key, address, raw_chain_id.as_u64()); + let signer = LocalSigner::from_signing_key(signing_key); KeyringEntry { name: config.name(), - address: address.into(), - signer: wallet, + address: signer.address(), + signer, } }), ), @@ -186,19 +183,17 @@ impl Module { #[derive(Debug, thiserror::Error)] pub enum TxSubmitError { #[error(transparent)] - Contract(#[from] ContractError), - #[error(transparent)] - Provider(#[from] ProviderError), - #[error("no tx receipt from tx")] - NoTxReceipt, - #[error("invalid revert code: {0}")] - InvalidRevert(ethers::types::Bytes), + Error(#[from] Error), + #[error("error waiting for transaction")] + PendingTransactionError(#[from] PendingTransactionError), #[error("out of gas")] OutOfGas, #[error("0x revert")] EmptyRevert(Vec), #[error("gas price is too high: max {max}, price {price}")] - GasPriceTooHigh { max: U256, price: U256 }, + GasPriceTooHigh { max: u128, price: u128 }, + #[error("rpc error (this is jsut the IbcMessage conversion functions but i need to make those errors better)")] + RpcError(#[from] ErrorObjectOwned), } #[async_trait] @@ -251,232 +246,16 @@ impl PluginServer for Module { async fn call(&self, _: &Extensions, msg: ModuleCall) -> RpcResult> { match msg { ModuleCall::SubmitMulticall(msgs) => { - let res = self.keyring - .with({ - let msgs = msgs.clone(); - move |wallet| -> _ { - let signer = Arc::new(SignerMiddleware::new( - NonceManagerMiddleware::new(self.provider.clone(), wallet.address()), - wallet.clone(), - )); - - async move { - if let Some(max_gas_price) = self.max_gas_price { - let gas_price = U256::from(self.provider - .get_gas_price() - .await - .expect("unable to fetch gas price")); - - if gas_price > max_gas_price { - warn!(%max_gas_price, %gas_price, "gas price is too high"); - return Err(TxSubmitError::GasPriceTooHigh { - max: max_gas_price, - price: gas_price - }) + let res = self + .keyring + .with({ + let msgs = msgs.clone(); + move |wallet| -> _ { + // let call = if self.legacy { call.legacy() } else { call }; + self.submit_transaction(wallet, msgs) } - } - - let multicall = Multicall::new(ethers::types::H160::from(self.multicall_address), signer.clone()); - - let msgs = process_msgs( - msgs, - &IBCHandler::new(self.ibc_handler_address, signer), - wallet.address().into(), - ); - - let msg_names = msgs - .iter() - .map(|x| (x.0.clone(), x.1.function.name.clone())) - .collect::>(); - - let call = multicall.multicall( - msgs.into_iter() - .map(|(_, x): (_, FunctionCall<_, _, _>)| Call3 { - target: self.ibc_handler_address.into(), - allow_failure: true, - call_data: x.calldata().expect("is a contract call"), - }) - .collect(), - ); - - let call = if self.legacy { call.legacy() } else { call }; - - let msg_name = call.function.name.clone(); - - info!("submitting evm tx"); - - match call.estimate_gas().await { - Ok(estimated_gas) => { - debug!( - %estimated_gas, - "gas estimation" - ); - - // TODO: config - match call.gas(estimated_gas + (estimated_gas / 10)).send().await { - Ok(ok) => { - let tx_hash = ok.tx_hash(); - async move { - let tx_rcp: TransactionReceipt = ok.await?.ok_or(TxSubmitError::NoTxReceipt)?; - - let result = MulticallResultFilter::decode_log( - ðers::abi::RawLog::from( - tx_rcp - .logs - .last() - .expect("multicall event should be last log") - .clone(), - ), - ) - .expect("unable to decode multicall result log"); - - info!( - gas_used = %tx_rcp.gas_used.unwrap_or_default(), - batch.size = msg_names.len(), - "submitted batched evm messages" - ); - - let mut retry_msgs = vec![]; - - for (idx, (result, (msg, msg_name))) in result.0.into_iter().zip(msg_names).enumerate() { - if result.success { - info_span!( - "evm tx", - msg = msg_name, - %idx, - ) - .in_scope(|| log_msg(&self.chain_id.to_string(), &msg)); - } else if let Ok(known_revert) = - IbcHandlerErrors::decode(&*result.return_data.clone()) - { - error_span!( - "evm message failed", - msg = %msg_name, - %idx, - revert = ?known_revert, - well_known = true, - ) - .in_scope(|| log_msg(&self.chain_id.to_string(), &msg)); - } else if result.return_data.is_empty() { - error_span!( - "evm message failed", - msg = %msg_name, - %idx, - revert = %serde_utils::to_hex(result.return_data), - well_known = false, - ) - .in_scope(|| log_msg(&self.chain_id.to_string(), &msg)); - - retry_msgs.push((true, msg)); - // return Err(TxSubmitError::EmptyRevert) - } else { - error_span!( - "evm message failed", - msg = %msg_name, - %idx, - revert = %serde_utils::to_hex(result.return_data), - well_known = false, - ) - .in_scope(|| log_msg(&self.chain_id.to_string(), &msg)); - - retry_msgs.push((false, msg)); - } - } - - // empty iterator returns false - if retry_msgs.iter().any(|(is_empty_revert, _)| *is_empty_revert) { - Err(TxSubmitError::EmptyRevert(retry_msgs.into_iter().map(|(_, msg)| msg).collect())) - } else { - Ok(()) - } - } - .instrument(info_span!( - "evm tx", - tx_hash = %H256::from(tx_hash), - )).await - } - // Err(ContractError::Revert(revert)) => { - // error!(?revert, "evm transaction failed"); - // let err = ::decode( - // revert.clone(), - // ) - // .map_err(|_| TxSubmitError::InvalidRevert(revert.clone()))?; - // error!( - // msg = %msg_name, - // ?revert, - // ?err, - // "evm transaction failed" - // ); - - // Ok(()) - // } - Err(ContractError::ProviderError { - e: ProviderError::JsonRpcClientError(e), - }) - | Err(ContractError::MiddlewareError { - e: - SignerMiddlewareError::MiddlewareError(NonceManagerError::MiddlewareError( - ProviderError::JsonRpcClientError(e), - )), - }) if e.as_error_response().is_some_and(|e| { - e.message - .contains("insufficient funds for gas * price + value") - }) => - { - error!("out of gas"); - Err(TxSubmitError::OutOfGas) - } - err => { - panic!("evm transaction non-recoverable failure: {err:?}") - } - } - } - Err(err) => { - let _span = error_span!( - "tx error", - msg = %msg_name, - err = %ErrorReporter(&err) - ); - - match err { - ContractError::Revert(revert) => { - error!(?revert, "evm gas estimation failed"); - - match ::decode( - &revert, - ) { - Ok(known_err) => { - // REVIEW: Are any of these recoverable? - // match known_err { - // IbcHandlerErrors::PacketErrors(_) => todo!(), - // IbcHandlerErrors::ConnectionErrors(_) => todo!(), - // IbcHandlerErrors::ChannelErrors(_) => todo!(), - // IbcHandlerErrors::ClientErrors(_) => todo!(), - // IbcHandlerErrors::CometblsClientErrors(_) => todo!(), - // } - - error!(?revert, ?known_err, "evm estimation failed"); - } - Err(_) => { - error!( - "evm estimation failed with unknown revert code" - ); - } - } - - Ok(()) - } - _ => { - error!("evm tx recoverable error"); - panic!(); - } - } - } - } - } - } - }) - .await; + }) + .await; let rewrap_msg = || PluginMessage::new(self.plugin_name(), ModuleCall::SubmitMulticall(msgs)); @@ -518,207 +297,477 @@ impl PluginServer for Module { } } +impl Module { + async fn submit_transaction( + &self, + wallet: &LocalSigner, + ibc_messages: Vec, + ) -> Result<(), TxSubmitError> { + let signer = ProviderBuilder::new() + .with_recommended_fillers() + .on_provider(self.provider.clone()); + + if let Some(max_gas_price) = self.max_gas_price { + let gas_price = self + .provider + .get_gas_price() + .await + .expect("unable to fetch gas price"); + + if gas_price > max_gas_price { + warn!(%max_gas_price, %gas_price, "gas price is too high"); + + return Err(TxSubmitError::GasPriceTooHigh { + max: max_gas_price, + price: gas_price, + }); + } + } + + let multicall = Multicall::new(self.multicall_address.into(), signer.clone()); + + let ibc = Ibc::new(self.ibc_handler_address.into(), &self.provider); + + let msgs = process_msgs(&ibc, ibc_messages, wallet.address().into())?; + + let msg_names = msgs + .iter() + // .map(|x| (x.0.clone(), x.1.function.name.clone())) + .map(|x| (x.0.clone(), "todo".to_owned())) + .collect::>(); + + let call = multicall.multicall( + msgs.into_iter() + .map(|(_, x)| Call3 { + target: self.ibc_handler_address.into(), + allowFailure: true, + callData: x.calldata().clone(), + }) + .collect(), + ); + + info!("submitting evm tx"); + + match call.send().await { + Ok(ok) => { + let tx_hash = ::from(*ok.tx_hash()); + async move { + let receipt = ok.get_receipt().await?; + + info!(%tx_hash, "tx included"); + + let result = MulticallResult::decode_log_data( + receipt + .inner + .logs() + .last() + .expect("multicall event should be last log") + .data(), + true, + ) + .expect("unable to decode multicall result log"); + + info!( + gas_used = %receipt.gas_used, + batch.size = msg_names.len(), + "submitted batched evm messages" + ); + + let mut retry_msgs = vec![]; + + for (idx, (result, (msg, msg_name))) in + result._0.into_iter().zip(msg_names).enumerate() + { + if result.success { + info_span!( + "evm tx", + msg = msg_name, + %idx, + data = msg.as_value(), + ); + } else if let Ok(known_revert) = + IbcErrors::abi_decode(&result.returnData, true) + { + error_span!( + "evm message failed", + msg = %msg_name, + %idx, + revert = ?known_revert, + well_known = true, + data = msg.as_value(), + ); + } else if result.returnData.is_empty() { + error_span!( + "evm message failed", + msg = %msg_name, + %idx, + revert = %result.returnData, + well_known = false, + data = msg.as_value(), + ); + + retry_msgs.push((true, msg)); + } else { + error_span!( + "evm message failed", + msg = %msg_name, + %idx, + revert = %result.returnData, + well_known = false, + data = msg.as_value(), + ); + + retry_msgs.push((false, msg)); + } + } + + // NOTE: An empty iterator returns false + if retry_msgs + .iter() + .any(|(is_empty_revert, _)| *is_empty_revert) + { + Err(TxSubmitError::EmptyRevert( + retry_msgs.into_iter().map(|(_, msg)| msg).collect(), + )) + } else { + Ok(()) + } + } + .instrument(info_span!( + "evm tx", + %tx_hash, + )) + .await + } + Err( + Error::PendingTransactionError(PendingTransactionError::TransportError( + TransportError::ErrorResp(e), + )) + | Error::TransportError(TransportError::ErrorResp(e)), + ) if e + .message + .contains("insufficient funds for gas * price + value") => + { + error!("out of gas"); + Err(TxSubmitError::OutOfGas) + } + Err(err) => Err(TxSubmitError::Error(err)), + } + } +} + #[allow(clippy::type_complexity)] -fn process_msgs( +fn process_msgs>( + ibc_handler: &ibc_solidity::ibc::Ibc::IbcInstance, msgs: Vec, - ibc_handler: &IBCHandler, relayer: H160, -) -> Vec<(IbcMessage, FunctionCall, M, ()>)> { - pub fn mk_function_call( - ibc_handler: &IBCHandler, - data: Call, - ) -> ethers::contract::FunctionCall, M, ()> { - ibc_handler - .method_hash(::selector(), data) - .expect("method selector is generated; qed;") - } - +) -> RpcResult)>> { msgs.clone() .into_iter() - .map(|msg| match msg.clone() { - IbcMessage::ConnectionOpenInit(data) => ( - msg, - mk_function_call( - ibc_handler, - ConnectionOpenInitCall(contracts::ibc_handler::MsgConnectionOpenInit { - client_id: data.client_id.to_string(), - version: data.version.into(), - counterparty: data.counterparty.into(), - delay_period: data.delay_period, - relayer: relayer.into(), - }), + .map(|msg| { + Ok(match msg.clone() { + IbcMessage::ConnectionOpenInit(data) => ( + msg, + ibc_handler + .connectionOpenInit(MsgConnectionOpenInit { + clientId: parse_numeric_identifier(&*data.client_id)?, + counterparty: ConnectionCounterparty { + clientId: parse_numeric_identifier(&*data.counterparty.client_id)?, + connectionId: data + .counterparty + .connection_id + .as_deref() + .map(parse_numeric_identifier) + .transpose()? + .unwrap_or_default(), + }, + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::ConnectionOpenTry(data) => ( - msg, - mk_function_call( - ibc_handler, - ConnectionOpenTryCall(contracts::ibc_handler::MsgConnectionOpenTry { - counterparty: data.counterparty.into(), - delay_period: data.delay_period, - client_id: data.client_id.to_string(), - client_state_bytes: data.client_state.into(), - counterparty_versions: data - .counterparty_versions - .into_iter() - .map(Into::into) - .collect(), - proof_init: data.proof_init.into(), - proof_client: data.proof_client.into(), - proof_consensus: data.proof_consensus.into(), - proof_height: data.proof_height.into(), - consensus_height: data.consensus_height.into(), - relayer: relayer.into(), - }), + IbcMessage::ConnectionOpenTry(data) => ( + msg, + ibc_handler + .connectionOpenTry(MsgConnectionOpenTry { + counterparty: ConnectionCounterparty { + clientId: parse_numeric_identifier(&*data.counterparty.client_id)?, + connectionId: data + .counterparty + .connection_id + .as_deref() + .map(parse_numeric_identifier) + .transpose()? + .unwrap_or_default(), + }, + clientId: parse_numeric_identifier(&*data.client_id)?, + proofInit: data.proof_init.into(), + proofHeight: data.proof_height.height(), + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::ConnectionOpenAck(data) => ( - msg, - mk_function_call( - ibc_handler, - ConnectionOpenAckCall(contracts::ibc_handler::MsgConnectionOpenAck { - connection_id: data.connection_id.to_string(), - counterparty_connection_id: data.counterparty_connection_id.to_string(), - version: data.version.into(), - client_state_bytes: data.client_state.into(), - proof_height: data.proof_height.into(), - proof_try: data.proof_try.into(), - proof_client: data.proof_client.into(), - proof_consensus: data.proof_consensus.into(), - consensus_height: data.consensus_height.into(), - relayer: relayer.into(), - }), + IbcMessage::ConnectionOpenAck(data) => ( + msg, + ibc_handler + .connectionOpenAck(MsgConnectionOpenAck { + connectionId: parse_numeric_identifier(&*data.connection_id)?, + counterpartyConnectionId: parse_numeric_identifier( + &*data.counterparty_connection_id, + )?, + proofHeight: data.proof_height.height(), + proofTry: data.proof_try.into(), + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::ConnectionOpenConfirm(data) => ( - msg, - mk_function_call( - ibc_handler, - ConnectionOpenConfirmCall(contracts::ibc_handler::MsgConnectionOpenConfirm { - connection_id: data.connection_id.to_string(), - proof_ack: data.proof_ack.into(), - proof_height: data.proof_height.into(), - relayer: relayer.into(), - }), + IbcMessage::ConnectionOpenConfirm(data) => ( + msg, + ibc_handler + .connectionOpenConfirm(MsgConnectionOpenConfirm { + connectionId: parse_numeric_identifier(&*data.connection_id)?, + proofAck: data.proof_ack.into(), + proofHeight: data.proof_height.height(), + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::ChannelOpenInit(data) => ( - msg, - mk_function_call( - ibc_handler, - ChannelOpenInitCall(contracts::ibc_handler::MsgChannelOpenInit { - port_id: data.port_id.to_string(), - channel: data.channel.into(), - relayer: relayer.into(), - }), + IbcMessage::ChannelOpenInit(data) => ( + msg, + ibc_handler + .channelOpenInit(MsgChannelOpenInit { + portId: parse_port_id(&*data.port_id)?, + channel: convert_channel(data.channel)?, + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::ChannelOpenTry(data) => ( - msg, - mk_function_call( - ibc_handler, - ChannelOpenTryCall(contracts::ibc_handler::MsgChannelOpenTry { - port_id: data.port_id.to_string(), - channel: data.channel.into(), - counterparty_version: data.counterparty_version, - proof_init: data.proof_init.into(), - proof_height: data.proof_height.into(), - relayer: relayer.into(), - }), + IbcMessage::ChannelOpenTry(data) => ( + msg, + ibc_handler + .channelOpenTry(MsgChannelOpenTry { + portId: parse_port_id(&*data.port_id)?, + channel: convert_channel(data.channel)?, + counterpartyVersion: string_to_bytes32(&data.counterparty_version)?, + proofInit: data.proof_init.into(), + proofHeight: data.proof_height.height(), + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::ChannelOpenAck(data) => ( - msg, - mk_function_call( - ibc_handler, - ChannelOpenAckCall(contracts::ibc_handler::MsgChannelOpenAck { - port_id: data.port_id.to_string(), - channel_id: data.channel_id.to_string(), - counterparty_version: data.counterparty_version, - counterparty_channel_id: data.counterparty_channel_id.to_string(), - proof_try: data.proof_try.into(), - proof_height: data.proof_height.into(), - relayer: relayer.into(), - }), + IbcMessage::ChannelOpenAck(data) => ( + msg, + ibc_handler + .channelOpenAck(MsgChannelOpenAck { + portId: parse_port_id(&*data.port_id)?, + channelId: parse_numeric_identifier(&*data.channel_id)?, + counterpartyVersion: keccak256(&data.counterparty_version).into(), + counterpartyChannelId: parse_numeric_identifier( + &*data.counterparty_channel_id, + )?, + proofTry: data.proof_try.into(), + proofHeight: data.proof_height.height(), + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::ChannelOpenConfirm(data) => ( - msg, - mk_function_call( - ibc_handler, - ChannelOpenConfirmCall(contracts::ibc_handler::MsgChannelOpenConfirm { - port_id: data.port_id.to_string(), - channel_id: data.channel_id.to_string(), - proof_ack: data.proof_ack.into(), - proof_height: data.proof_height.into(), - relayer: relayer.into(), - }), + IbcMessage::ChannelOpenConfirm(data) => ( + msg, + ibc_handler + .channelOpenConfirm(MsgChannelOpenConfirm { + portId: parse_port_id(&*data.port_id)?, + channelId: parse_numeric_identifier(&*data.channel_id)?, + proofAck: data.proof_ack.into(), + proofHeight: data.proof_height.height(), + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::RecvPacket(data) => ( - msg, - mk_function_call( - ibc_handler, - RecvPacketCall(contracts::ibc_handler::MsgPacketRecv { - packet: data.packet.into(), - proof: data.proof_commitment.into(), - proof_height: data.proof_height.into(), - relayer: relayer.into(), - }), + IbcMessage::RecvPacket(data) => ( + msg, + ibc_handler + .recvPacket(MsgPacketRecv { + packets: vec![convert_packet(data.packet)?], + proof: data.proof_commitment.into(), + proofHeight: data.proof_height.height(), + relayer: relayer.into(), + relayerMsgs: vec![], + }) + .clear_decoder(), ), - ), - IbcMessage::AcknowledgePacket(data) => ( - msg, - mk_function_call( - ibc_handler, - AcknowledgePacketCall(contracts::ibc_handler::MsgPacketAcknowledgement { - packet: data.packet.into(), - acknowledgement: data.acknowledgement.into(), - proof: data.proof_acked.into(), - proof_height: data.proof_height.into(), - relayer: relayer.into(), - }), + IbcMessage::AcknowledgePacket(data) => ( + msg, + ibc_handler + .acknowledgePacket(MsgPacketAcknowledgement { + packets: vec![convert_packet(data.packet)?], + acknowledgements: vec![data.acknowledgement.into()], + proof: data.proof_acked.into(), + proofHeight: data.proof_height.height(), + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::TimeoutPacket(data) => ( - msg, - mk_function_call( - ibc_handler, - TimeoutPacketCall(contracts::ibc_handler::MsgPacketTimeout { - packet: data.packet.into(), - proof: data.proof_unreceived.into(), - proof_height: data.proof_height.into(), - next_sequence_recv: data.next_sequence_recv.get(), - relayer: relayer.into(), - }), + IbcMessage::TimeoutPacket(data) => ( + msg, + ibc_handler + .timeoutPacket(MsgPacketTimeout { + packet: convert_packet(data.packet)?, + proof: data.proof_unreceived.into(), + proofHeight: data.proof_height.height(), + nextSequenceRecv: data.next_sequence_recv.get(), + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::CreateClient(MsgCreateClientData { - msg: data, - client_type, - }) => ( - msg, - mk_function_call( - ibc_handler, - CreateClientCall(contracts::shared_types::MsgCreateClient { - client_type: client_type.to_string(), - client_state_bytes: data.client_state.into(), - consensus_state_bytes: data.consensus_state.into(), - relayer: relayer.into(), - }), + IbcMessage::CreateClient(MsgCreateClientData { + msg: data, + client_type, + }) => ( + msg, + ibc_handler + .createClient(MsgCreateClient { + clientType: keccak256(client_type.as_str()).into(), + clientStateBytes: data.client_state.into(), + consensusStateBytes: data.consensus_state.into(), + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), - IbcMessage::UpdateClient(data) => ( - msg, - mk_function_call( - ibc_handler, - UpdateClientCall(contracts::shared_types::MsgUpdateClient { - client_id: data.client_id.to_string(), - client_message: data.client_message.into(), - relayer: relayer.into(), - }), + IbcMessage::UpdateClient(data) => ( + msg, + ibc_handler + .updateClient(MsgUpdateClient { + clientId: parse_numeric_identifier(&*data.client_id)?, + clientMessage: data.client_message.into(), + relayer: relayer.into(), + }) + .clear_decoder(), ), - ), + }) }) .collect() } + +fn parse_numeric_identifier(s: impl AsRef) -> RpcResult { + let s = s.as_ref(); + + s.split_once('-') + .and_then(|(_, id)| id.parse().ok()) + .ok_or(ErrorObject::owned( + FATAL_JSONRPC_ERROR_CODE, + format!("identifier is not in required format (found `{s}`)"), + None::<()>, + )) +} + +fn parse_port_id(s: impl AsRef) -> RpcResult { + let s = s.as_ref(); + + s.parse().map_err(|e| { + ErrorObject::owned( + FATAL_JSONRPC_ERROR_CODE, + format!( + "port id is not an address (found `{s}`): {}", + ErrorReporter(e) + ), + None::<()>, + ) + }) +} + +fn convert_packet(packet: Packet) -> RpcResult { + Ok(ibc_solidity::ibc::Packet { + sequence: packet.sequence.get(), + sourceChannel: parse_numeric_identifier(&*packet.source_channel)?, + destinationChannel: parse_numeric_identifier(&*packet.destination_channel)?, + data: packet.data.into(), + timeoutHeight: packet.timeout_height.height(), + timeoutTimestamp: packet.timeout_timestamp, + }) +} + +fn convert_channel(channel: Channel) -> RpcResult { + Ok(ibc_solidity::ibc::Channel { + state: match channel.state { + State::UninitializedUnspecified => { + return Err(ErrorObject::owned( + FATAL_JSONRPC_ERROR_CODE, + "channel is in an invalid state", + None::<()>, + )) + } + State::Init => ChannelState::Init, + State::Tryopen => ChannelState::TryOpen, + State::Open => ChannelState::Open, + State::Closed => ChannelState::Closed, + }, + ordering: match channel.ordering { + Order::NoneUnspecified => { + return Err(ErrorObject::owned( + FATAL_JSONRPC_ERROR_CODE, + "channel order is invalid", + None::<()>, + )) + } + Order::Unordered => ChannelOrder::Unordered, + Order::Ordered => ChannelOrder::Ordered, + }, + connectionId: channel + .connection_hops + .into_iter() + .exactly_one() + .as_deref() + .map_err(|e| { + ErrorObject::owned( + FATAL_JSONRPC_ERROR_CODE, + format!("channel connection hops are invalid: {}", ErrorReporter(e)), + None::<()>, + ) + }) + .and_then(parse_numeric_identifier)?, + counterparty: ChannelCounterparty { + channelId: parse_numeric_identifier(&*channel.counterparty.channel_id)?, + }, + version: string_to_bytes32(&*channel.version)?, + }) +} + +fn string_to_bytes32(s: impl AsRef) -> RpcResult> { + let s = s.as_ref(); + + if s.len() > 32 { + return Err(ErrorObject::owned( + FATAL_JSONRPC_ERROR_CODE, + format!("string value `{s}` does not fit in a bytes32 value"), + None::<()>, + )); + } + + Ok(alloy::primitives::FixedBytes::right_padding_from( + s.as_bytes(), + )) +} + +pub mod multicall { + alloy::sol! { + #![sol(rpc)] + + struct Call3 { + address target; + bool allowFailure; + bytes callData; + } + + struct Result { + bool success; + bytes returnData; + } + + event MulticallResult(Result[]); + + contract Multicall { + function multicall( + Call3[] calldata calls + ) public payable returns (Result[] memory returnData); + } + } +} diff --git a/voyager/src/cli.rs b/voyager/src/cli.rs index cf7c1ea66c..b6a10407ce 100644 --- a/voyager/src/cli.rs +++ b/voyager/src/cli.rs @@ -1,11 +1,15 @@ -use std::ffi::OsString; +use std::{ffi::OsString, num::NonZeroU64}; -use chain_utils::BoxDynError; -use clap::{self, Parser, Subcommand}; +use clap::{self, builder::TypedValueParser, value_parser, Parser, Subcommand}; use unionlabs::{ self, bounded::BoundedI64, - ics24::{self, Path}, + ibc::core::client::height::Height, + ics24::{ + self, AcknowledgementPath, ChannelEndPath, ClientConsensusStatePath, ClientStatePath, + CommitmentPath, ConnectionPath, ReceiptPath, + }, + id::{ChannelId, ClientId, ConnectionId}, result_unwrap, uint::U256, QueryHeight, @@ -15,11 +19,11 @@ use voyager_message::{ module::{ChainModuleInfo, ClientModuleInfo, ConsensusModuleInfo}, VoyagerMessage, }; -use voyager_vm::Op; +use voyager_vm::{BoxDynError, Op}; -use crate::cli::handshake::HandshakeCmd; +// use crate::cli::handshake::HandshakeCmd; -pub mod handshake; +// pub mod handshake; #[derive(Debug, Parser)] #[command(arg_required_else_help = true)] @@ -56,9 +60,9 @@ pub struct AppArgs { #[derive(Debug, Clone, PartialEq, Default, clap::ValueEnum, derive_more::Display)] pub enum LogFormat { #[default] - #[display(fmt = "text")] + #[display("text")] Text, - #[display(fmt = "json")] + #[display("json")] Json, } @@ -68,7 +72,7 @@ pub enum Command { /// Config related subcommands. #[command(subcommand)] Config(ConfigCmd), - Handshake(HandshakeCmd), + // Handshake(HandshakeCmd), /// Construct a `FetchBlocks` op to send to the specified chain. InitFetch { #[arg(value_parser(|s: &str| Ok::<_, BoxDynError>(ChainId::new(s.to_owned()))))] @@ -97,7 +101,7 @@ pub enum Command { #[arg(long, short = 'H', default_value_t = QueryHeight::Latest)] height: QueryHeight, #[command(subcommand)] - path: ics24::Path, + path: CommitmentsPath, }, } @@ -128,9 +132,9 @@ pub enum QueueCmd { // }, /// Query all failed messages. QueryFailed { - #[arg(long, default_value_t = result_unwrap!(Pg64::new(1)))] + #[arg(long, default_value_t = result_unwrap!(Pg64::new_const(1)))] page: Pg64, - #[arg(long, default_value_t = result_unwrap!(Pg64::new(1)))] + #[arg(long, default_value_t = result_unwrap!(Pg64::new_const(1)))] per_page: Pg64, /// SQL filters for the item. /// @@ -161,12 +165,98 @@ pub enum UtilCmd { /// Compute the EVM IBC commitment key for the given IBC commitment path. IbcCommitmentKey { #[command(subcommand)] - path: Path, + path: CommitmentsPath, #[arg(long, default_value_t = U256::ZERO)] commitment_slot: U256, }, } +macro_rules! id_value_parser { + ($T:ident) => { + value_parser!(u32).map($T::new) + }; +} + +#[derive(Debug, Subcommand)] +pub enum CommitmentsPath { + ClientState { + #[arg(value_parser = id_value_parser!(ClientId))] + client_id: ClientId, + }, + ClientConsensusState { + #[arg(value_parser = id_value_parser!(ClientId))] + client_id: ClientId, + height: Height, + }, + Connection { + #[arg(value_parser = id_value_parser!(ConnectionId))] + connection_id: ConnectionId, + }, + ChannelEnd { + #[arg(value_parser = id_value_parser!(ChannelId))] + channel_id: ChannelId, + }, + Commitment { + #[arg(value_parser = id_value_parser!(ChannelId))] + channel_id: ChannelId, + sequence: NonZeroU64, + }, + Acknowledgement { + #[arg(value_parser = id_value_parser!(ChannelId))] + channel_id: ChannelId, + sequence: NonZeroU64, + }, + Receipt { + #[arg(value_parser = id_value_parser!(ChannelId))] + channel_id: ChannelId, + sequence: NonZeroU64, + }, + // NextSequenceSend(NextSequenceSendPath), + // NextSequenceRecv(NextSequenceRecvPath), + // NextSequenceAck(NextSequenceAckPath), + // NextConnectionSequence(NextConnectionSequencePath), + // NextClientSequence(NextClientSequencePath), +} + +impl From for ics24::Path { + fn from(value: CommitmentsPath) -> Self { + match value { + CommitmentsPath::ClientState { client_id } => ClientStatePath { client_id }.into(), + CommitmentsPath::ClientConsensusState { client_id, height } => { + ClientConsensusStatePath { client_id, height }.into() + } + CommitmentsPath::Connection { connection_id } => { + ConnectionPath { connection_id }.into() + } + CommitmentsPath::ChannelEnd { channel_id } => ChannelEndPath { channel_id }.into(), + CommitmentsPath::Commitment { + channel_id, + sequence, + } => CommitmentPath { + channel_id, + sequence, + } + .into(), + CommitmentsPath::Acknowledgement { + channel_id, + sequence, + } => AcknowledgementPath { + channel_id, + sequence, + } + .into(), + CommitmentsPath::Receipt { + channel_id, + sequence, + } => ReceiptPath { + channel_id, + sequence, + } + .into(), + } + } +} + #[derive(Debug, Subcommand)] pub enum PluginCmd { /// Run the interest filter for the specified plugin on the provided JSON object. diff --git a/voyager/src/main.rs b/voyager/src/main.rs index fa7da3d34b..733294e428 100644 --- a/voyager/src/main.rs +++ b/voyager/src/main.rs @@ -18,7 +18,6 @@ use std::{ process::ExitCode, }; -use chain_utils::BoxDynError; use clap::Parser; use pg_queue::PgQueueConfig; use schemars::gen::{SchemaGenerator, SchemaSettings}; @@ -28,20 +27,27 @@ use serde_utils::Hex; use tikv_jemallocator::Jemalloc; use tracing::info; use tracing_subscriber::EnvFilter; -use unionlabs::{ethereum::ibc_commitment_key, ics24, QueryHeight}; +use unionlabs::{ + ethereum::ibc_commitment_key, + ics24::{ + self, AcknowledgementPath, ChannelEndPath, ClientConsensusStatePath, ClientStatePath, + CommitmentPath, ConnectionPath, ReceiptPath, + }, + QueryHeight, +}; use voyager_message::{ call::FetchBlocks, context::{get_plugin_info, Context, ModulesConfig}, filter::{make_filter, run_filter}, VoyagerMessage, }; -use voyager_vm::{call, filter::FilterResult, Op, Queue}; +use voyager_vm::{call, filter::FilterResult, BoxDynError, Op, Queue}; #[global_allocator] static GLOBAL: Jemalloc = Jemalloc; use crate::{ - cli::{AppArgs, Command, ConfigCmd, ModuleCmd, PluginCmd, QueueCmd, UtilCmd}, + cli::{AppArgs, Command, CommitmentsPath, ConfigCmd, ModuleCmd, PluginCmd, QueueCmd, UtilCmd}, config::{default_rest_laddr, default_rpc_laddr, Config, VoyagerConfig}, queue::{QueueConfig, Voyager, VoyagerInitError}, }; @@ -256,6 +262,8 @@ async fn do_main(args: cli::AppArgs) -> Result<(), BoxDynError> { ModuleCmd::Client(_) => todo!(), }, Command::Query { on, height, path } => { + let path = ics24::Path::from(path); + let voyager = Voyager::new(get_voyager_config()?).await?; let height = voyager.context.rpc_server.query_height(&on, height).await?; @@ -263,7 +271,7 @@ async fn do_main(args: cli::AppArgs) -> Result<(), BoxDynError> { let state = voyager .context .rpc_server - .query_ibc_state(&on, height, path.clone()) + .query_state(&on, height, path.clone()) .await? .state; @@ -308,7 +316,7 @@ async fn do_main(args: cli::AppArgs) -> Result<(), BoxDynError> { voyager.shutdown().await; print_json(&json!({ - "path": path.to_string(), + "path": path, "state": state, })); } @@ -362,7 +370,6 @@ async fn do_main(args: cli::AppArgs) -> Result<(), BoxDynError> { } } } - Command::Handshake(_) => todo!(), // Command::Handshake(HandshakeCmd { // chain_a, // chain_b, @@ -480,7 +487,50 @@ async fn do_main(args: cli::AppArgs) -> Result<(), BoxDynError> { UtilCmd::IbcCommitmentKey { path, commitment_slot, - } => print_json(&ibc_commitment_key(&path.to_string(), commitment_slot).to_be_hex()), + } => print_json( + &ibc_commitment_key( + match path { + CommitmentsPath::ClientState { client_id } => { + ClientStatePath { client_id }.commitments_key() + } + CommitmentsPath::ClientConsensusState { client_id, height } => { + ClientConsensusStatePath { client_id, height }.commitments_key() + } + CommitmentsPath::Connection { connection_id } => { + ConnectionPath { connection_id }.commitments_key() + } + CommitmentsPath::ChannelEnd { channel_id } => { + ChannelEndPath { channel_id }.commitments_key() + } + CommitmentsPath::Commitment { + channel_id, + sequence, + } => CommitmentPath { + channel_id, + sequence, + } + .commitments_key(), + CommitmentsPath::Acknowledgement { + channel_id, + sequence, + } => AcknowledgementPath { + channel_id, + sequence, + } + .commitments_key(), + CommitmentsPath::Receipt { + channel_id, + sequence, + } => ReceiptPath { + channel_id, + sequence, + } + .commitments_key(), + }, + commitment_slot, + ) + .to_be_hex(), + ), }, } diff --git a/voyager/src/queue.rs b/voyager/src/queue.rs index 2fd6ed5440..abe1f6f879 100644 --- a/voyager/src/queue.rs +++ b/voyager/src/queue.rs @@ -2,7 +2,6 @@ use std::{fmt::Debug, net::SocketAddr, panic::AssertUnwindSafe}; -use frame_support_procedural::{CloneNoBound, DebugNoBound}; use futures::{future::BoxFuture, stream::FuturesUnordered, Future, FutureExt, StreamExt}; use pg_queue::{PgQueue, PgQueueConfig}; use schemars::JsonSchema; @@ -38,13 +37,13 @@ pub enum QueueConfig { PgQueue(PgQueueConfig), } -#[derive(DebugNoBound, CloneNoBound)] +#[derive(Debug, Clone)] pub enum QueueImpl { InMemory(InMemoryQueue), PgQueue(PgQueue), } -#[derive(DebugNoBound, thiserror::Error)] +#[derive(Debug, thiserror::Error)] #[error(transparent)] pub enum AnyQueueError { InMemory(std::convert::Infallible),