diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..15aedc7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +target/ +.idea diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6476f48 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + +## [1.1.1] - 2024-10-02 + +### Added + +- Added a staking denom to the mocks + +## [1.1.0] - 2024-08-23 + +### Changed + +- Updated `lib.rs` so that the re-organisation is adhered to + +## [1.0.0] - 2024-08-23 + +### Changed + +- Restructure of architecture to improve organisation of helper functions and also to enable re-use with multiple projects diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..719f7d2 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,3884 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "ark-bls12-381" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "educe", + "fnv", + "hashbrown 0.15.5", + "itertools 0.13.0", + "num-bigint", + "num-integer", + "num-traits", + "rayon", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "arrayvec", + "digest 0.10.7", + "educe", + "itertools 0.13.0", + "num-bigint", + "num-traits", + "paste", + "rayon", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash", + "ark-ff", + "ark-serialize", + "ark-std", + "educe", + "fnv", + "hashbrown 0.15.5", +] + +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "arrayvec", + "digest 0.10.7", + "num-bigint", + "rayon", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand 0.8.5", + "rayon", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" + +[[package]] +name = "bech32" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" + +[[package]] +name = "bindgen" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "clap", + "env_logger", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "which", +] + +[[package]] +name = "bip32" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db40d3dfbeab4e031d78c844642fa0caa0b0db11ce1607ac9d2986dff1405c69" +dependencies = [ + "bs58", + "hmac", + "k256", + "rand_core 0.6.4", + "ripemd", + "secp256k1 0.27.0", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bnum" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e31ea183f6ee62ac8b8a8cf7feddd766317adfb13ff469de57ce033efd6a790" + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2 0.10.9", +] + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +dependencies = [ + "serde", +] + +[[package]] +name = "cc" +version = "1.2.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37521ac7aabe3d13122dc382493e20c9416f299d2ccd5b3a5340a2570cdeb0f3" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +dependencies = [ + "num-traits", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_lex", + "indexmap 1.9.3", + "strsim 0.10.0", + "termcolor", + "textwrap", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cosmos-sdk-proto" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95ac39be7373404accccaede7cc1ec942ccef14f0ca18d209967a756bf1dbb1f" +dependencies = [ + "prost 0.13.5", + "tendermint-proto", +] + +[[package]] +name = "cosmrs" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34e74fa7a22930fe0579bef560f2d64b78415d4c47b9dd976c0635136809471d" +dependencies = [ + "bip32", + "cosmos-sdk-proto", + "ecdsa", + "eyre", + "k256", + "rand_core 0.6.4", + "serde", + "serde_json", + "signature", + "subtle-encoding", + "tendermint", + "tendermint-rpc", + "thiserror 1.0.69", +] + +[[package]] +name = "cosmwasm-core" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b0a718b13ffe224e32a8c1f68527354868f47d6cc84afe8c66cb05fbb3ced6e" + +[[package]] +name = "cosmwasm-crypto" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c08dd7585b5c48fbcb947ada7a3fb49465fb735481ed295b54ca98add6dc17f" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "cosmwasm-core", + "curve25519-dalek", + "digest 0.10.7", + "ecdsa", + "ed25519-zebra", + "k256", + "num-bigint", + "num-traits", + "p256", + "rand_core 0.6.4", + "rayon", + "sha2 0.10.9", + "thiserror 1.0.69", +] + +[[package]] +name = "cosmwasm-derive" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5677eed823a61eeb615b1ad4915a42336b70b0fe3f87bf3da4b59f3dcf9034af" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "cosmwasm-schema" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52d8808bf9fb8f4d5ee62e808b3e1dcdf6a116e9e1fe934507a4e0a4135ae941" +dependencies = [ + "cosmwasm-schema-derive", + "cw-schema", + "schemars 0.8.22", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "cosmwasm-schema-derive" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9718a856ff5edb6537ac889ff695abc576304bc25cb7b16ef4c762e10a0149ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "cosmwasm-std" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4881104f54871bcea6f30757bee13b7f09c0998d1b0de133cce5a52336a2ada" +dependencies = [ + "base64 0.22.1", + "bech32", + "bnum", + "cosmwasm-core", + "cosmwasm-crypto", + "cosmwasm-derive", + "cw-schema", + "derive_more", + "hex", + "rand_core 0.6.4", + "rmp-serde", + "schemars 0.8.22", + "serde", + "serde_json", + "sha2 0.10.9", + "static_assertions 1.1.0", + "thiserror 1.0.69", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", +] + +[[package]] +name = "cw-multi-test" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9875e88f5b67dbaf729da99a7de4acd593d18d6d8ee83c8006e09dd865745e" +dependencies = [ + "bech32", + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "cw-utils", + "itertools 0.14.0", + "prost 0.14.1", + "schemars 0.8.22", + "serde", + "sha2 0.10.9", +] + +[[package]] +name = "cw-schema" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f335d3f51e10260f4dfb0840f0526c1d25c6b42a9489c04ce41ed9aa54dd6d" +dependencies = [ + "cw-schema-derive", + "indexmap 2.12.0", + "schemars 1.1.0", + "serde", + "serde_with", + "siphasher", + "typeid", +] + +[[package]] +name = "cw-schema-derive" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aba2eb93f854caeacc5eda13d15663b7605395514fd378bfba8e7532f1fc5865" +dependencies = [ + "heck", + "itertools 0.13.0", + "owo-colors", + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "cw-storage-plus" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75d840d773b4ffd60ff005375e5e15e4be4fda54620574e861bfbb61a074f353" +dependencies = [ + "cosmwasm-std", + "schemars 0.8.22", + "serde", +] + +[[package]] +name = "cw-utils" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8667e96f2c65cf7f4c6c66bfd6ee46909c40827bc1caea0409234e34f03cf061" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "schemars 0.8.22", + "serde", + "thiserror 2.0.17", +] + +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-consensus" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" +dependencies = [ + "curve25519-dalek-ng", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "hashbrown 0.14.5", + "hex", + "rand_core 0.6.4", + "sha2 0.10.9", + "zeroize", +] + +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-ordinalize" +version = "4.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a1091a7bb1f8f2c4b28f1fe2cef4980ca2d410a3d727d67ecc3178c9b0800f0" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "ethbloom" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3932e82d64d347a045208924002930dc105a138995ccdc1479d0f05f0359f17c" +dependencies = [ + "crunchy", + "fixed-hash 0.3.2", + "impl-rlp", + "impl-serde", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b054df51e53f253837ea422681215b42823c02824bde982699d0dceecf6165a1" +dependencies = [ + "crunchy", + "ethbloom", + "ethereum-types-serialize", + "fixed-hash 0.3.2", + "serde", + "uint 0.5.0", +] + +[[package]] +name = "ethereum-types-serialize" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1873d77b32bc1891a79dad925f2acbc318ee942b38b9110f9dbc5fbeffcea350" +dependencies = [ + "serde", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "find-msvc-tools" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" + +[[package]] +name = "fixed-hash" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1a683d1234507e4f3bf2736eeddf0de1dc65996dc0164d57eba0a74bcf29489" +dependencies = [ + "byteorder", + "heapsize", + "rand 0.5.6", + "rustc-hex", + "static_assertions 0.2.5", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "static_assertions 1.1.0", +] + +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "eyre", + "paste", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-sink", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "generic-array" +version = "0.14.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.12.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" + +[[package]] +name = "heapsize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" +dependencies = [ + "winapi", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-rlp" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8" +dependencies = [ + "serde", +] + +[[package]] +name = "indenter" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" +dependencies = [ + "equivalent", + "hashbrown 0.16.0", +] + +[[package]] +name = "injective-cosmwasm" +version = "0.3.5-1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31826fd53ec0974040d31a31d54e78e1295aa36a20a429619df58ce48dee1d5e" +dependencies = [ + "cosmwasm-std", + "cw-storage-plus", + "ethereum-types", + "hex", + "injective-math", + "schemars 0.8.22", + "serde", + "serde_repr", + "subtle-encoding", + "tiny-keccak", +] + +[[package]] +name = "injective-math" +version = "0.3.5-1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e94be76fc9b92dcfa765455810052d1e6107fa07c218b7a3a9795cae45c4c7" +dependencies = [ + "cosmwasm-std", + "primitive-types", + "schemars 0.8.22", + "serde", +] + +[[package]] +name = "injective-std" +version = "1.16.4-1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2707e97f51cbaabcf8e61dd0e03e327e30aa7b541ad90b3669a9f19b424f1eb9" +dependencies = [ + "chrono", + "cosmwasm-std", + "injective-std-derive", + "prost 0.13.5", + "prost-types", + "schemars 1.1.0", + "serde", + "serde-cw-value", +] + +[[package]] +name = "injective-std-derive" +version = "1.16.4-1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d641a3aac0c25e166670df2a94293a508293639711e8ac29a7b48223eaf0af2e" +dependencies = [ + "cosmwasm-std", + "itertools 0.14.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "injective-test-tube" +version = "1.16.4-1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2303b02e4dc924c7ce9aedacb4b3ce295c6475f61afebc4db63d28418e8862a4" +dependencies = [ + "bindgen", + "cosmrs", + "cosmwasm-std", + "injective-cosmwasm", + "injective-std", + "prost 0.13.5", + "serde", + "serde_json", + "test-tube-inj", +] + +[[package]] +name = "injective-testing" +version = "1.2.0" +dependencies = [ + "anyhow", + "cosmwasm-std", + "cw-multi-test", + "injective-cosmwasm", + "injective-math", + "injective-std", + "injective-test-tube", + "prost 0.13.5", + "rand 0.4.6", + "regex", + "secp256k1 0.30.0", + "serde", + "tiny-keccak", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "is-terminal" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" +dependencies = [ + "hermit-abi 0.5.2", + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "is_ci" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "sha2 0.10.9", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "mio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "owo-colors" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52" +dependencies = [ + "supports-color 2.1.0", + "supports-color 3.0.2", +] + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.9", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "peg" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9928cfca101b36ec5163e70049ee5368a8a1c3c6efc9ca9c5f9cc2f816152477" +dependencies = [ + "peg-macros", + "peg-runtime", +] + +[[package]] +name = "peg-macros" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6298ab04c202fa5b5d52ba03269fb7b74550b150323038878fe6c372d8280f71" +dependencies = [ + "peg-runtime", + "proc-macro2", + "quote", +] + +[[package]] +name = "peg-runtime" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "132dca9b868d927b35b5dd728167b2dee150eb1ad686008fc71ccb298b776fca" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash 0.8.0", + "uint 0.9.5", +] + +[[package]] +name = "proc-macro2" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +dependencies = [ + "bytes", + "prost-derive 0.13.5", +] + +[[package]] +name = "prost" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" +dependencies = [ + "bytes", + "prost-derive 0.14.1", +] + +[[package]] +name = "prost-derive" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +dependencies = [ + "anyhow", + "itertools 0.14.0", + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "prost-derive" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" +dependencies = [ + "anyhow", + "itertools 0.14.0", + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "prost-types" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +dependencies = [ + "prost 0.13.5", +] + +[[package]] +name = "quote" +version = "1.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +dependencies = [ + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "rdrand", + "winapi", +] + +[[package]] +name = "rand" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "winapi", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "regex" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rlp" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1190dcc8c3a512f1eef5d09bb8c84c7f39e1054e174d1795482e18f5272f2e73" +dependencies = [ + "rustc-hex", +] + +[[package]] +name = "rmp" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "schemars_derive 0.8.22", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9558e172d4e8533736ba97870c4b2cd63f84b382a3d6eb063da41b91cce17289" +dependencies = [ + "dyn-clone", + "ref-cast", + "schemars_derive 1.1.0", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.109", +] + +[[package]] +name = "schemars_derive" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301858a4023d78debd2353c7426dc486001bddc91ae31a76fb1f55132f7e2633" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.109", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +dependencies = [ + "secp256k1-sys 0.8.2", +] + +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "secp256k1-sys 0.10.1", +] + +[[package]] +name = "secp256k1-sys" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4473013577ec77b4ee3668179ef1186df3146e2cf2d927bd200974c6fe60fd99" +dependencies = [ + "cc", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.10.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-cw-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75d32da6b8ed758b7d850b6c3c08f1d7df51a4df3cb201296e63e34a78e99d4" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa66c845eee442168b2c8134fec70ac50dc20e760769c8ba0ad1319ca1959b04" +dependencies = [ + "serde_core", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "3.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91a903660542fced4e99881aa481bdbaec1634568ee02e0b8bd57c64cb38955" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "supports-color" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" +dependencies = [ + "is-terminal", + "is_ci", +] + +[[package]] +name = "supports-color" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6" +dependencies = [ + "is_ci", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f17c7e013e88258aa9543dcbe81aca68a667a9ac37cd69c9fbc07858bfe0e2f" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tendermint" +version = "0.40.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc997743ecfd4864bbca8170d68d9b2bee24653b034210752c2d883ef4b838b1" +dependencies = [ + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", + "k256", + "num-traits", + "once_cell", + "prost 0.13.5", + "ripemd", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.10.9", + "signature", + "subtle", + "subtle-encoding", + "tendermint-proto", + "time", + "zeroize", +] + +[[package]] +name = "tendermint-config" +version = "0.40.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069d1791f9b02a596abcd26eb72003b2e9906c6169a60fa82ffc080dd3a43fda" +dependencies = [ + "flex-error", + "serde", + "serde_json", + "tendermint", + "toml", + "url", +] + +[[package]] +name = "tendermint-proto" +version = "0.40.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c40e13d39ca19082d8a7ed22de7595979350319833698f8b1080f29620a094" +dependencies = [ + "bytes", + "flex-error", + "prost 0.13.5", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + +[[package]] +name = "tendermint-rpc" +version = "0.40.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e0569a4b4cc42ff00df5a665be2858a39ff79df4790b176f1cd0e169bc0fc2" +dependencies = [ + "async-trait", + "bytes", + "flex-error", + "futures", + "getrandom", + "peg", + "pin-project", + "rand 0.8.5", + "reqwest", + "semver", + "serde", + "serde_bytes", + "serde_json", + "subtle", + "subtle-encoding", + "tendermint", + "tendermint-config", + "tendermint-proto", + "thiserror 1.0.69", + "time", + "tokio", + "tracing", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "test-tube-inj" +version = "2.0.9-1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dae6ff129d55b258b043dd6131aca68b458904892fac2cecd7bfa0f369304663" +dependencies = [ + "base64 0.21.7", + "cosmrs", + "cosmwasm-std", + "prost 0.13.5", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "textwrap" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +dependencies = [ + "thiserror-impl 2.0.17", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "time" +version = "0.3.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" + +[[package]] +name = "time-macros" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2 0.6.1", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap 2.12.0", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "uint" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "082df6964410f6aa929a61ddfafc997e4f32c62c22490e439ac351cec827f436" +dependencies = [ + "byteorder", + "crunchy", + "heapsize", + "rustc-hex", +] + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions 1.1.0", +] + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.109", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.109", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..28017fe --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,23 @@ +[package] +authors = ["Markus Waas ", "Jose Luis Bernal Castillo ", "Michele Meloni " ] +description = "Testing utils for Injective Cosmwasm and core modules" +edition = "2021" +license = "Apache-2.0" +name = "injective-testing" +repository = "https://github.com/InjectiveLabs/injective-testing" +version = "1.2.0" + +[dependencies] +anyhow = { version = "1.0.66" } +cosmwasm-std = { version = "3.0.2", features = ["cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "cosmwasm_2_0", "iterator", "stargate" ] } +cw-multi-test = { version = "3.0.1" } +injective-test-tube = { version = "1.16.4-1"} +injective-cosmwasm = { version = "0.3.5-1"} +injective-math = { version = "0.3.5-1"} +injective-std = { version = "1.16.4-1"} +prost = { version = "0.13.5", features = [ "prost-derive" ] } +rand = { version = "0.4.6" } +regex = { version = "1.11.1" } +secp256k1 = { version = "0.30.0", features = [ "rand" ] } +serde = { version = "1.0.196", default-features = false, features = [ "derive" ] } +tiny-keccak = { version = "1.2.1" } diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..a7a1340 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,4 @@ +pub mod mocks; +pub mod multi_test; +pub mod test_tube; +pub mod utils; diff --git a/src/mocks.rs b/src/mocks.rs new file mode 100644 index 0000000..b2bb7c7 --- /dev/null +++ b/src/mocks.rs @@ -0,0 +1,66 @@ +use crate::utils::human_to_dec; + +use injective_cosmwasm::{DerivativeMarket, MarketId, MarketMidPriceAndTOBResponse, MarketStatus, OracleType, SpotMarket}; +use injective_math::FPDecimal; + +pub const MOCKED_MARKET_ID: &str = "0x01edfab47f124748dc89998eb33144af734484ba07099014594321729a0ca16b"; +pub const MOCKED_SUBACCOUNT_ID: &str = "0x427aee334987c52fa7b567b2662bdbb68614e48c000000000000000000000001"; +pub const MOCKED_FEE_RECIPIENT: &str = "0x01edfab47f124748dc89998eb33144af734484ba07099014594321729a0ca16b"; + +pub const MOCK_EXCHANGE_DECIMALS: i32 = 18i32; +pub const MOCK_BASE_DECIMALS: i32 = 18i32; +pub const MOCK_STAKE_DECIMALS: i32 = 18i32; +pub const MOCK_ATOM_DECIMALS: i32 = 8i32; +pub const MOCK_QUOTE_DECIMALS: i32 = 6i32; + +pub const MOCK_ATOM_DENOM: &str = "atom"; +pub const MOCK_BASE_DENOM: &str = "inj"; +pub const MOCK_STAKE_DENOM: &str = "hinj"; +pub const MOCK_QUOTE_DENOM: &str = "usdt"; +pub const MOCK_USDC_DENOM: &str = "usdc"; + +// Mock INJ Market +pub fn mock_spot_market(market_id: &str) -> SpotMarket { + SpotMarket { + ticker: String::from("INJ:USDT"), + base_denom: String::from("inj"), + quote_denom: String::from("usdt"), + market_id: MarketId::unchecked(market_id), + maker_fee_rate: FPDecimal::ZERO, + taker_fee_rate: FPDecimal::ZERO, + status: MarketStatus::Active, + min_price_tick_size: FPDecimal::must_from_str("0.000000000000001000"), + min_quantity_tick_size: FPDecimal::must_from_str("10000000000000.0"), // 0.00001 @ 18dp + relayer_fee_share_rate: FPDecimal::must_from_str("0.4"), + min_notional: FPDecimal::ZERO, + } +} + +// Mock INJ Market +pub fn mock_derivative_market(market_id: &str) -> DerivativeMarket { + DerivativeMarket { + ticker: String::from("INJ:USDT"), + oracle_base: String::from("inj"), + oracle_quote: String::from("usdt"), + oracle_type: OracleType::PriceFeed, + oracle_scale_factor: 0u32, + quote_denom: String::from("usdt"), + market_id: MarketId::unchecked(market_id), + initial_margin_ratio: FPDecimal::must_from_str("0.195"), + maintenance_margin_ratio: FPDecimal::must_from_str("0.05"), + maker_fee_rate: FPDecimal::ZERO, + taker_fee_rate: FPDecimal::ZERO, + isPerpetual: true, + status: MarketStatus::Active, + min_price_tick_size: FPDecimal::must_from_str("1000.0"), // 0.001 + min_quantity_tick_size: FPDecimal::must_from_str("0.001"), // 0.001 + } +} + +pub fn mock_mid_price_tob() -> MarketMidPriceAndTOBResponse { + MarketMidPriceAndTOBResponse { + mid_price: Some(human_to_dec("10.0", MOCK_QUOTE_DECIMALS - MOCK_BASE_DECIMALS)), + best_buy_price: Some(human_to_dec("9.95", MOCK_QUOTE_DECIMALS - MOCK_BASE_DECIMALS)), + best_sell_price: Some(human_to_dec("10.05", MOCK_QUOTE_DECIMALS - MOCK_BASE_DECIMALS)), + } +} diff --git a/src/multi_test/address_generator.rs b/src/multi_test/address_generator.rs new file mode 100644 index 0000000..ba7bd08 --- /dev/null +++ b/src/multi_test/address_generator.rs @@ -0,0 +1,141 @@ +use cosmwasm_std::{Addr, Storage}; +use cw_multi_test::AddressGenerator; +use injective_cosmwasm::addr_to_bech32; +use secp256k1::{rand, PublicKey, Secp256k1, SecretKey}; +use std::fmt::Write; + +const ADDRESS_LENGTH: usize = 40; +const ADDRESS_BYTES: usize = ADDRESS_LENGTH / 2; +const KECCAK_OUTPUT_BYTES: usize = 32; +const ADDRESS_BYTE_INDEX: usize = KECCAK_OUTPUT_BYTES - ADDRESS_BYTES; + +#[derive(Default)] +pub struct InjectiveAddressGenerator(); + +impl AddressGenerator for InjectiveAddressGenerator { + fn contract_address( + &self, + _api: &dyn cosmwasm_std::Api, + _storage: &mut dyn Storage, + _code_id: u64, + _instance_id: u64, + ) -> Result { + Ok(generate_inj_address()) + } + + fn predictable_contract_address( + &self, + api: &dyn cosmwasm_std::Api, + _storage: &mut dyn Storage, + _code_id: u64, + _instance_id: u64, + checksum: &[u8], + creator: &cosmwasm_std::CanonicalAddr, + salt: &[u8], + ) -> Result { + let canonical_addr = cosmwasm_std::instantiate2_address(checksum, creator, salt)?; + api.addr_humanize(&canonical_addr) + } +} + +pub struct StorageAwareInjectiveAddressGenerator { + key: String, +} + +impl Default for StorageAwareInjectiveAddressGenerator { + fn default() -> Self { + Self { + key: "generated_addresses".to_string(), + } + } +} + +impl AddressGenerator for StorageAwareInjectiveAddressGenerator { + fn contract_address( + &self, + _api: &dyn cosmwasm_std::Api, + storage: &mut dyn Storage, + _code_id: u64, + _instance_id: u64, + ) -> Result { + let generated_address = generate_inj_address(); + let key = self.key.as_bytes(); + let stored = storage.get(key); + + match stored { + Some(value) => { + let as_string = String::from_utf8_lossy(&value); + let mut split = as_string.split(',').collect::>(); + split.push(generated_address.as_str()); + let joined_as_string = split.join(","); + storage.set(key, joined_as_string.as_bytes()) + } + None => { + let value = generated_address.as_str().as_bytes(); + storage.set(key, value); + } + } + + Ok(generated_address) + } +} + +pub fn generate_inj_address() -> Addr { + let secp256k1 = Secp256k1::new(); + + let secret_key = SecretKey::new(&mut rand::thread_rng()); + + let public_key = PublicKey::from_secret_key(&secp256k1, &secret_key); + + let public_key_array = &public_key.serialize()[1..]; + + let keccak = tiny_keccak::keccak256(public_key_array); + + let address_short = to_hex_string(&keccak[ADDRESS_BYTE_INDEX..], 40); // get rid of the constant 0x04 byte + let full_address = format!("0x{address_short}"); + + let inj_address = addr_to_bech32(full_address); + + Addr::unchecked(inj_address) +} + +fn to_hex_string(slice: &[u8], expected_string_size: usize) -> String { + let mut result = String::with_capacity(expected_string_size); + + for &byte in slice { + write!(&mut result, "{byte:02x}").expect("Unable to format the public key."); + } + + result +} + +#[cfg(test)] +mod tests { + use super::*; + use regex::Regex; + + #[test] + fn test_generate_inj_address() { + // Generate an Injective address + let generated_address = generate_inj_address(); + + // Ensure the generated address is not empty + assert!(!generated_address.to_string().is_empty(), "Generated address should not be empty"); + + // Ensure the generated address starts with the Injective prefix (e.g., "inj") + assert!(generated_address.as_str().starts_with("inj"), "Generated address should start with 'inj'"); + + println!("generated address: {:?}", generated_address); + + // Ensure the address matches a valid bech32 format + let bech32_regex = Regex::new(r"^inj[0-9a-z]{39}$").unwrap(); + assert!( + bech32_regex.is_match(generated_address.as_str()), + "Generated address does not match valid bech32 format" + ); + + // Ensure each generated address is unique (you can extend this for more iterations) + let another_generated_address = generate_inj_address(); + assert_ne!(generated_address, another_generated_address, "Generated addresses should be unique"); + } +} diff --git a/src/multi_test/chain_mock.rs b/src/multi_test/chain_mock.rs new file mode 100644 index 0000000..98ae298 --- /dev/null +++ b/src/multi_test/chain_mock.rs @@ -0,0 +1,345 @@ +use crate::multi_test::address_generator::InjectiveAddressGenerator; +use cosmwasm_std::{ + testing::{MockApi, MockStorage}, + to_json_binary, Addr, Api, Binary, BlockInfo, Coin, CustomQuery, Empty, Querier, StdError, Storage, +}; +use cw_multi_test::{ + no_init, AddressGenerator, App, AppResponse, BankKeeper, BasicAppBuilder, CosmosRouter, Module, StargateAccepting, StargateFailing, WasmKeeper, +}; +use injective_cosmwasm::{InjectiveMsgWrapper, InjectiveQueryWrapper}; +use std::{ + cell::{Ref, RefCell}, + marker::PhantomData, + ops::Deref, + rc::Rc, +}; + +pub enum StargateT { + Accepting(StargateAccepting), + Failing(StargateFailing), +} + +pub type MockedInjectiveApp = App>; + +#[derive(Clone)] +pub struct InitialBalance { + pub amounts: Vec, + pub address: Addr, +} + +pub struct CachingCustomHandlerState { + pub execs: Rc>>, + pub queries: Rc>>, + _p: PhantomData, +} + +impl CachingCustomHandlerState +where + CustomModule: Module, + CustomModule::ExecT: Clone + 'static, + CustomModule::QueryT: CustomQuery + 'static, +{ + pub fn execs(&self) -> impl Deref + '_ { + Ref::map(self.execs.borrow(), Vec::as_slice) + } + + pub fn queries(&self) -> impl Deref + '_ { + Ref::map(self.queries.borrow(), Vec::as_slice) + } + + pub fn reset(&self) { + self.execs.borrow_mut().clear(); + self.queries.borrow_mut().clear(); + } +} + +impl Default for CachingCustomHandlerState { + fn default() -> Self { + Self { + execs: Rc::new(RefCell::new(vec![])), + queries: Rc::new(RefCell::new(vec![])), + _p: PhantomData, + } + } +} + +pub type ExecuteResponse = Result, anyhow::Error>; +pub type QueryResponse = Result; + +pub struct ExecuteResponseContainer { + response: Option, +} + +impl ExecuteResponseContainer { + pub fn with_ok_response(payload: &T) -> Self { + ExecuteResponseContainer { + response: Some(Ok(Some(to_json_binary(payload).unwrap()))), + } + } + + pub fn with_error(error: anyhow::Error) -> Self { + ExecuteResponseContainer { response: Some(Err(error)) } + } + + pub fn empty() -> Self { + ExecuteResponseContainer { response: None } + } + + pub fn is_empty(&self) -> bool { + self.response.is_none() + } +} + +pub struct QueryResponseContainer { + response: Option, +} + +impl QueryResponseContainer { + pub fn with_ok_response(payload: &T) -> Self { + QueryResponseContainer { + response: Some(Ok(to_json_binary(payload).unwrap())), + } + } + + pub fn with_error(error: anyhow::Error) -> Self { + QueryResponseContainer { response: Some(Err(error)) } + } + + pub fn empty() -> Self { + QueryResponseContainer { response: None } + } + + pub fn is_empty(&self) -> bool { + self.response.is_none() + } +} + +pub type ExecuteAssertion = fn(message: &Msg); +pub type QueryAssertion = fn(query: &Query); + +pub struct ExecuteAssertionContainer { + pub assertion: Option>, +} + +impl ExecuteAssertionContainer { + pub fn new(assertion: ExecuteAssertion) -> Self { + ExecuteAssertionContainer { assertion: Some(assertion) } + } + + pub fn empty() -> Self { + ExecuteAssertionContainer { assertion: None } + } + + pub fn is_empty(&self) -> bool { + self.assertion.is_none() + } +} + +pub struct QueryAssertionContainer { + pub assertion: Option>, +} + +impl QueryAssertionContainer { + pub fn new(assertion: QueryAssertion) -> Self { + QueryAssertionContainer { assertion: Some(assertion) } + } + + pub fn empty() -> Self { + QueryAssertionContainer { assertion: None } + } + + pub fn is_empty(&self) -> bool { + self.assertion.is_none() + } +} + +pub struct CustomInjectiveHandlerAssertions { + pub executes: Vec>, + pub queries: Vec>, +} + +impl Default for CustomInjectiveHandlerAssertions { + fn default() -> Self { + Self { + executes: vec![], + queries: vec![], + } + } +} + +#[derive(Default)] +pub struct CustomInjectiveHandlerResponses { + pub executes: Vec, + pub queries: Vec, +} + +#[derive(Default)] +pub struct CustomInjectiveHandler { + pub state: CachingCustomHandlerState, + pub responses: CustomInjectiveHandlerResponses, + pub assertions: CustomInjectiveHandlerAssertions, + pub enable_debug: bool, +} + +impl Module for CustomInjectiveHandler { + type ExecT = InjectiveMsgWrapper; + type QueryT = InjectiveQueryWrapper; + type SudoT = Empty; + + fn execute( + &self, + _api: &dyn Api, + _storage: &mut dyn Storage, + _router: &dyn CosmosRouter, + _block: &BlockInfo, + _sender: Addr, + msg: Self::ExecT, + ) -> Result { + let mut exec_calls_count = self.state.execs.borrow().len(); + + if !self.assertions.executes.is_empty() + && exec_calls_count < self.assertions.executes.len() + && !self.assertions.executes[exec_calls_count].is_empty() + { + self.assertions.executes[exec_calls_count].assertion.unwrap()(&msg); + } + + self.state.execs.borrow_mut().push(msg.clone()); + exec_calls_count += 1; + + if self.enable_debug { + println!("[{exec_calls_count}] Execute message: {msg:?}"); + } + + if self.responses.executes.is_empty() + || exec_calls_count > self.responses.executes.len() + || self.responses.executes[exec_calls_count - 1].is_empty() + { + return Ok(AppResponse::default()); + } + + let stored_result = self.responses.executes.get(exec_calls_count - 1).unwrap().response.as_ref().unwrap(); + + // In order to implement the trait that method has to receive &self and neither Result nor Binary implements Copy + // and that's the reason why I'm manually copying the underlying [u8] in order to return owned data + match &stored_result { + Ok(optional_data) => match &optional_data { + Some(binary) => Ok(AppResponse { + events: vec![], + data: Some(copy_binary(binary)), + }), + &None => Ok(AppResponse::default()), + }, + Err(e) => Err(StdError::msg(e.to_string())), + } + } + + fn query( + &self, + _api: &dyn Api, + _storage: &dyn Storage, + _querier: &dyn Querier, + _block: &BlockInfo, + request: Self::QueryT, + ) -> Result { + let mut query_calls_count = self.state.queries.borrow().len(); + + if !self.assertions.queries.is_empty() + && query_calls_count < self.assertions.queries.len() + && !self.assertions.queries[query_calls_count].is_empty() + { + self.assertions.queries[query_calls_count].assertion.unwrap()(&request); + } + + self.state.queries.borrow_mut().push(request.clone()); + query_calls_count += 1; + + if self.enable_debug { + println!("[{query_calls_count}] Query request: {request:?}"); + } + + if self.responses.queries.is_empty() + || query_calls_count > self.responses.queries.len() + || self.responses.queries[query_calls_count - 1].is_empty() + { + Ok(Binary::default()) + } else { + let stored_result = self.responses.queries.get(query_calls_count - 1).unwrap().response.as_ref().unwrap(); + + // In order to implement the trait that method has to receive &self and neither Result nor Binary implements Copy + // and that's the reason why I'm manually copying the underlying [u8] in order to return owned data + match &stored_result { + Ok(optional_data) => Ok(copy_binary(optional_data)), + Err(e) => Err(StdError::msg(e.to_string())), + } + } + } + + fn sudo( + &self, + _api: &dyn Api, + _storage: &mut dyn Storage, + _router: &dyn CosmosRouter, + _block: &BlockInfo, + msg: Self::SudoT, + ) -> Result { + Err(StdError::msg(format!("Unexpected sudo msg {:?}", msg))) + } +} + +pub fn mock_custom_injective_chain_app( + initial_balances: Vec, + execute_responses: Vec, + query_responses: Vec, + execute_assertions: Vec>, + query_assertions: Vec>, + address_generator: Option, + enable_debug: bool, +) -> MockedInjectiveApp { + let inj_handler = CustomInjectiveHandler { + responses: CustomInjectiveHandlerResponses { + executes: execute_responses, + queries: query_responses, + }, + assertions: CustomInjectiveHandlerAssertions { + executes: execute_assertions, + queries: query_assertions, + }, + enable_debug, + ..Default::default() + }; + + let inj_wasm_keeper = match address_generator { + Some(generator) => WasmKeeper::::new().with_address_generator(generator), + None => WasmKeeper::::new().with_address_generator(InjectiveAddressGenerator()), + }; + + BasicAppBuilder::new_custom() + .with_custom(inj_handler) + .with_wasm::>(inj_wasm_keeper) + .build(|router, _, storage| { + initial_balances.into_iter().for_each(|balance| { + router + .bank + .init_balance(storage, &balance.address, balance.amounts) + .expect("balances added") + }) + }) +} + +pub fn mock_default_injective_chain_app() -> MockedInjectiveApp { + let inj_wasm_keeper = WasmKeeper::::new().with_address_generator(InjectiveAddressGenerator()); + + let inj_handler = CustomInjectiveHandler::default(); + + BasicAppBuilder::new_custom() + .with_custom(inj_handler) + .with_wasm::>(inj_wasm_keeper) + .build(no_init) +} + +fn copy_binary(binary: &Binary) -> Binary { + let mut c: Vec = vec![0; binary.to_vec().len()]; + c.clone_from_slice(binary); + Binary::new(c) +} diff --git a/src/multi_test/mod.rs b/src/multi_test/mod.rs new file mode 100644 index 0000000..d670f99 --- /dev/null +++ b/src/multi_test/mod.rs @@ -0,0 +1,2 @@ +pub mod address_generator; +pub mod chain_mock; diff --git a/src/test_tube/authz.rs b/src/test_tube/authz.rs new file mode 100644 index 0000000..2ce68ce --- /dev/null +++ b/src/test_tube/authz.rs @@ -0,0 +1,89 @@ +use injective_test_tube::{ + injective_std::{ + shim::{Any, Timestamp}, + types::cosmos::{ + authz::v1beta1::{GenericAuthorization, Grant, MsgGrant, MsgRevoke, MsgRevokeResponse}, + bank::v1beta1::SendAuthorization, + base::v1beta1::Coin as BaseCoin, + }, + }, + Account, Authz, ExecuteResponse, InjectiveTestApp, Module, Runner, SigningAccount, +}; +use prost::Message; + +pub fn create_generic_authorization(app: &InjectiveTestApp, granter: &SigningAccount, grantee: String, msg: String, expiration: Option) { + let authz = Authz::new(app); + + let mut buf = vec![]; + GenericAuthorization::encode(&GenericAuthorization { msg }, &mut buf).unwrap(); + + authz + .grant( + MsgGrant { + granter: granter.address(), + grantee, + grant: Some(Grant { + authorization: Some(Any { + type_url: GenericAuthorization::TYPE_URL.to_string(), + value: buf.clone(), + }), + expiration, + }), + }, + granter, + ) + .unwrap(); +} + +pub fn revoke_authorization(app: &InjectiveTestApp, granter: &SigningAccount, grantee: String, msg_type_url: String) { + let _res: ExecuteResponse = app + .execute_multiple( + &[( + MsgRevoke { + granter: granter.address(), + grantee, + msg_type_url, + }, + MsgRevoke::TYPE_URL, + )], + granter, + ) + .unwrap(); +} + +pub fn create_send_authorization(app: &InjectiveTestApp, granter: &SigningAccount, grantee: String, amount: BaseCoin, expiration: Option) { + let authz = Authz::new(app); + + let mut buf = vec![]; + SendAuthorization::encode( + &SendAuthorization { + spend_limit: vec![amount], + allow_list: vec![], + }, + &mut buf, + ) + .unwrap(); + + authz + .grant( + MsgGrant { + granter: granter.address(), + grantee, + grant: Some(Grant { + authorization: Some(Any { + type_url: SendAuthorization::TYPE_URL.to_string(), + value: buf.clone(), + }), + expiration, + }), + }, + granter, + ) + .unwrap(); +} + +pub fn execute_generic_authorizations(app: &InjectiveTestApp, granter: &SigningAccount, grantee: String, msgs: Vec) { + for msg in msgs { + create_generic_authorization(app, granter, grantee.clone(), msg, None); + } +} diff --git a/src/test_tube/bank.rs b/src/test_tube/bank.rs new file mode 100644 index 0000000..91e08db --- /dev/null +++ b/src/test_tube/bank.rs @@ -0,0 +1,33 @@ +use cosmwasm_std::Uint128; +use injective_test_tube::{ + injective_std::types::cosmos::{ + bank::v1beta1::{MsgSend, QueryBalanceRequest}, + base::v1beta1::Coin, + }, + Account, Bank, InjectiveTestApp, SigningAccount, +}; +use std::str::FromStr; + +pub fn send(bank: &Bank, amount: &str, denom: &str, from: &SigningAccount, to: &SigningAccount) { + bank.send( + MsgSend { + from_address: from.address(), + to_address: to.address(), + amount: vec![Coin { + amount: amount.to_string(), + denom: denom.to_string(), + }], + }, + from, + ) + .unwrap(); +} + +pub fn query_balance(bank: &Bank, address: String, denom: String) -> Uint128 { + let response = bank.query_balance(&QueryBalanceRequest { address, denom }).unwrap(); + + match response.balance { + Some(balance) => Uint128::from_str(&balance.amount).unwrap(), + None => Uint128::zero(), + } +} diff --git a/src/test_tube/exchange.rs b/src/test_tube/exchange.rs new file mode 100644 index 0000000..84b3475 --- /dev/null +++ b/src/test_tube/exchange.rs @@ -0,0 +1,901 @@ +use crate::{ + mocks::{ + MOCK_ATOM_DECIMALS, MOCK_ATOM_DENOM, MOCK_BASE_DECIMALS, MOCK_BASE_DENOM, MOCK_QUOTE_DECIMALS, MOCK_QUOTE_DENOM, MOCK_STAKE_DECIMALS, + MOCK_STAKE_DENOM, MOCK_USDC_DENOM, + }, + utils::{dec_to_proto, scale_price_quantity_perp_market, scale_price_quantity_spot_market, str_coin}, +}; + +use cosmwasm_std::{Addr, Uint128}; +use injective_cosmwasm::{get_default_subaccount_id_for_checked_address, SubaccountId}; +use injective_math::FPDecimal; +use injective_std::types::cosmos::gov; +use injective_test_tube::{ + injective_std::{ + shim::Any, + types::{ + cosmos::{ + base::v1beta1::Coin as BaseCoin, + gov::v1::{MsgSubmitProposal, MsgVote}, + }, + injective::exchange::v1beta1::{ + BatchExchangeModificationProposal, DenomDecimals, DenomMinNotional, DenomMinNotionalProposal, DerivativeOrder, MsgBatchUpdateOrders, + MsgBatchUpdateOrdersResponse, MsgCancelDerivativeOrder, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeLimitOrderResponse, + MsgCreateSpotLimitOrder, MsgInstantSpotMarketLaunch, MsgUpdateParams, OrderInfo, OrderType, PerpetualMarketFunding, Position, + QueryDerivativeMarketsRequest, QueryExchangeParamsRequest, QueryExchangeParamsResponse, QuerySpotMarketsRequest, + QuerySubaccountDepositsRequest, QuerySubaccountEffectivePositionInMarketRequest, SpotOrder, UpdateDenomDecimalsProposal, + }, + injective::exchange::v2, + }, + }, + Account, Exchange, Gov, InjectiveTestApp, Module, Runner, SigningAccount, +}; +use prost::Message; +use std::str::FromStr; + +pub fn add_exchange_admin(app: &InjectiveTestApp, validator: &SigningAccount, admin_address: String) { + let gov = Gov::new(app); + + let res: QueryExchangeParamsResponse = app + .query("/injective.exchange.v1beta1.Query/QueryExchangeParams", &QueryExchangeParamsRequest {}) + .unwrap(); + + let mut exchange_params = res.params.unwrap(); + exchange_params.exchange_admins.push(admin_address); + exchange_params.max_derivative_order_side_count = 300u32; + + // NOTE: this could change in the future + let governance_module_address = "inj10d07y265gmmuvt4z0w9aw880jnsr700jstypyt"; + + let mut buf = vec![]; + MsgUpdateParams::encode( + &MsgUpdateParams { + authority: governance_module_address.to_string(), + params: Some(exchange_params), + }, + &mut buf, + ) + .unwrap(); + + let res = gov + .submit_proposal( + MsgSubmitProposal { + messages: vec![Any { + type_url: MsgUpdateParams::TYPE_URL.to_string(), + value: buf, + }], + initial_deposit: vec![BaseCoin { + amount: "100000000000000000000".to_string(), + denom: "inj".to_string(), + }], + proposer: validator.address(), + metadata: "".to_string(), + title: "Update params".to_string(), + summary: "Basically updating the params".to_string(), + expedited: false, + }, + validator, + ) + .unwrap(); + + let proposal_id = res.events.iter().find(|e| e.ty == "submit_proposal").unwrap().attributes[0].value.clone(); + + gov.vote( + MsgVote { + proposal_id: u64::from_str(&proposal_id).unwrap(), + voter: validator.address(), + option: 1i32, + metadata: "".to_string(), + }, + validator, + ) + .unwrap(); + + // Increase time to pass the proposal + app.increase_time(20u64); +} + +pub fn add_denom_notional_and_decimal(app: &InjectiveTestApp, validator: &SigningAccount, denom: String, min_notional: String, decimals: u64) { + let gov = Gov::new(app); + + let proposal = BatchExchangeModificationProposal { + title: "Update params".to_string(), + description: "Basically updating the params".to_string(), + spot_market_param_update_proposals: vec![], + derivative_market_param_update_proposals: vec![], + spot_market_launch_proposals: vec![], + perpetual_market_launch_proposals: vec![], + expiry_futures_market_launch_proposals: vec![], + trading_reward_campaign_update_proposal: None, + binary_options_market_launch_proposals: vec![], + binary_options_param_update_proposals: vec![], + denom_decimals_update_proposal: Some(UpdateDenomDecimalsProposal { + title: "Update denom decimals".to_string(), + description: "Love it!".to_string(), + denom_decimals: vec![DenomDecimals { + denom: denom.clone(), + decimals, + }], + }), + fee_discount_proposal: None, + market_forced_settlement_proposals: vec![], + denom_min_notional_proposal: Some(DenomMinNotionalProposal { + title: "Update min notional".to_string(), + description: "Love it!".to_string(), + denom_min_notionals: vec![DenomMinNotional { denom, min_notional }], + }), + }; + + let mut buf = vec![]; + proposal.encode(&mut buf).unwrap(); + + let content_any = Any { + type_url: "/injective.exchange.v2.BatchExchangeModificationProposal".to_string(), + value: buf, + }; + + let msg_submit_proposal = gov::v1beta1::MsgSubmitProposal { + content: Some(content_any), + initial_deposit: vec![BaseCoin { + amount: "100000000000000000000".to_string(), + denom: "inj".to_string(), + }], + proposer: validator.address(), + }; + + let res = gov.submit_proposal_v1beta1(msg_submit_proposal, validator).unwrap(); + + let proposal_id = res.events.iter().find(|e| e.ty == "submit_proposal").unwrap().attributes[0].value.clone(); + + gov.vote( + MsgVote { + proposal_id: u64::from_str(&proposal_id).unwrap(), + voter: validator.address(), + option: 1i32, + metadata: "".to_string(), + }, + validator, + ) + .unwrap(); + + // Increase time to pass the proposal + app.increase_time(20u64); +} + +pub fn create_perp_mid_price(app: &InjectiveTestApp, market_id: &str, base_price: &str, base_quantity: &str, base_margin: &str, spread: f64) { + // Calculate adjusted prices for buy and sell based on the spread + let sell_price = format!("{:.1}", base_price.parse::().unwrap() + spread); + let buy_price = format!("{:.1}", base_price.parse::().unwrap() - spread); + + // Scaling and executing the sell order + let (price, quantity, margin) = scale_price_quantity_perp_market(&sell_price, base_quantity, base_margin, &MOCK_QUOTE_DECIMALS); + execute_derivative_limit_order(app, market_id.to_string(), price, quantity, margin, OrderType::Sell); + + // Scaling and executing the buy order + let (price, quantity, margin) = scale_price_quantity_perp_market(&buy_price, base_quantity, base_margin, &MOCK_QUOTE_DECIMALS); + execute_derivative_limit_order(app, market_id.to_string(), price, quantity, margin, OrderType::Buy); +} + +pub fn create_perp_mid_price_as( + app: &InjectiveTestApp, + market_id: &str, + base_price: &str, + base_quantity: &str, + base_margin: &str, + spread: f64, + trader: &SigningAccount, + subaccount_id: &SubaccountId, +) { + // Calculate adjusted prices for buy and sell based on the spread + let sell_price = format!("{}", base_price.parse::().unwrap() + spread); + let buy_price = format!("{}", base_price.parse::().unwrap() - spread); + + // Scaling and executing the sell order + let (price, quantity, margin) = scale_price_quantity_perp_market(&sell_price, base_quantity, base_margin, &MOCK_QUOTE_DECIMALS); + execute_derivative_limit_order_as( + app, + market_id.to_string(), + price, + quantity, + margin, + OrderType::Sell, + trader, + subaccount_id, + ); + + // Scaling and executing the buy order + let (price, quantity, margin) = scale_price_quantity_perp_market(&buy_price, base_quantity, base_margin, &MOCK_QUOTE_DECIMALS); + execute_derivative_limit_order_as(app, market_id.to_string(), price, quantity, margin, OrderType::Buy, trader, subaccount_id); +} + +pub fn create_spot_mid_price( + app: &InjectiveTestApp, + market_id: &str, + base_price: &str, + base_quantity: &str, + base_decimals: &i32, + quote_decimals: &i32, + spread: f64, +) { + // Calculate adjusted prices for buy and sell based on the spread + let sell_price = format!("{}", base_price.parse::().unwrap() + spread); + let buy_price = format!("{}", base_price.parse::().unwrap() - spread); + + // Scaling and executing the sell order + let (price, quantity) = scale_price_quantity_spot_market(&sell_price, base_quantity, base_decimals, quote_decimals); + execute_spot_limit_order(app, market_id.to_string(), price, quantity, OrderType::Sell); + + // Scaling and executing the buy order + let (price, quantity) = scale_price_quantity_spot_market(&buy_price, base_quantity, base_decimals, quote_decimals); + execute_spot_limit_order(app, market_id.to_string(), price, quantity, OrderType::Buy); +} + +pub fn create_spot_mid_price_as( + app: &InjectiveTestApp, + market_id: &str, + base_price: &str, + base_quantity: &str, + base_decimals: &i32, + quote_decimals: &i32, + spread: f64, + trader: &SigningAccount, + subaccount_id: &SubaccountId, +) { + // Calculate adjusted prices for buy and sell based on the spread + let sell_price = format!("{:.1}", base_price.parse::().unwrap() + spread); + let buy_price = format!("{:.1}", base_price.parse::().unwrap() - spread); + + // Scaling and executing the sell order + let (price, quantity) = scale_price_quantity_spot_market(&sell_price, base_quantity, base_decimals, quote_decimals); + execute_spot_limit_order_as(app, market_id.to_string(), price, quantity, OrderType::Sell, trader, subaccount_id); + + // Scaling and executing the buy order + let (price, quantity) = scale_price_quantity_spot_market(&buy_price, base_quantity, base_decimals, quote_decimals); + execute_spot_limit_order_as(app, market_id.to_string(), price, quantity, OrderType::Buy, trader, subaccount_id); +} + +pub fn create_price_perp( + app: &InjectiveTestApp, + market_id: &str, + base_price: &str, + base_quantity: &str, + base_margin: &str, + spread: f64, + trader: &SigningAccount, + subaccount_id: &SubaccountId, +) -> MsgBatchUpdateOrdersResponse { + let exchange = Exchange::new(app); + + // Calculate adjusted prices for buy and sell based on the spread + let sell_price = format!("{}", base_price.parse::().unwrap() + spread); + let buy_price = format!("{}", base_price.parse::().unwrap() - spread); + + // Scaling and executing the sell order + let (sell_price, sell_quantity, sell_margin) = scale_price_quantity_perp_market(&sell_price, base_quantity, base_margin, &MOCK_QUOTE_DECIMALS); + + // Scaling and executing the buy order + let (buy_price, buy_quantity, buy_margin) = scale_price_quantity_perp_market(&buy_price, base_quantity, base_margin, &MOCK_QUOTE_DECIMALS); + + exchange + .batch_update_orders( + MsgBatchUpdateOrders { + sender: trader.address(), + subaccount_id: subaccount_id.as_str().to_string(), + derivative_market_ids_to_cancel_all: vec![market_id.to_string()], + derivative_orders_to_create: vec![ + DerivativeOrder { + market_id: market_id.to_string(), + order_info: Some(OrderInfo { + subaccount_id: subaccount_id.as_str().to_string(), + fee_recipient: trader.address(), + price: buy_price.clone(), + quantity: buy_quantity.clone(), + cid: "".to_string(), + }), + margin: buy_margin.clone(), + order_type: OrderType::Buy.into(), + trigger_price: "".to_string(), + }, + DerivativeOrder { + market_id: market_id.to_string(), + order_info: Some(OrderInfo { + subaccount_id: subaccount_id.as_str().to_string(), + fee_recipient: trader.address(), + price: sell_price.clone(), + quantity: sell_quantity.clone(), + cid: "".to_string(), + }), + margin: sell_margin.clone(), + order_type: OrderType::Sell.into(), + trigger_price: "".to_string(), + }, + ], + ..Default::default() + }, + trader, + ) + .unwrap() + .data +} + +pub fn create_price_spot( + app: &InjectiveTestApp, + market_id: &str, + base_price: &str, + base_quantity: &str, + spread: f64, + trader: &SigningAccount, + subaccount_id: &SubaccountId, +) -> MsgBatchUpdateOrdersResponse { + let exchange = Exchange::new(app); + + // Calculate adjusted prices for buy and sell based on the spread + let sell_price = format!("{}", base_price.parse::().unwrap() + spread); + let buy_price = format!("{}", base_price.parse::().unwrap() - spread); + + // Scaling and executing the sell order + let (sell_price, sell_quantity) = scale_price_quantity_spot_market(&sell_price, base_quantity, &MOCK_BASE_DECIMALS, &MOCK_QUOTE_DECIMALS); + + // Scaling and executing the buy order + let (buy_price, buy_quantity) = scale_price_quantity_spot_market(&buy_price, base_quantity, &MOCK_BASE_DECIMALS, &MOCK_QUOTE_DECIMALS); + + exchange + .batch_update_orders( + MsgBatchUpdateOrders { + sender: trader.address(), + subaccount_id: subaccount_id.as_str().to_string(), + spot_market_ids_to_cancel_all: vec![market_id.to_string()], + spot_orders_to_create: vec![ + SpotOrder { + market_id: market_id.to_string(), + order_info: Some(OrderInfo { + subaccount_id: subaccount_id.as_str().to_string(), + fee_recipient: trader.address(), + price: buy_price.clone(), + quantity: buy_quantity.clone(), + cid: "".to_string(), + }), + order_type: OrderType::Buy.into(), + trigger_price: "".to_string(), + }, + SpotOrder { + market_id: market_id.to_string(), + order_info: Some(OrderInfo { + subaccount_id: subaccount_id.as_str().to_string(), + fee_recipient: trader.address(), + price: sell_price.clone(), + quantity: sell_quantity.clone(), + cid: "".to_string(), + }), + order_type: OrderType::Sell.into(), + trigger_price: "".to_string(), + }, + ], + ..Default::default() + }, + trader, + ) + .unwrap() + .data +} + +pub fn create_price_spot_and_perp_market( + app: &InjectiveTestApp, + perp_market_id: &str, + spot_market_id: &str, + base_price: &str, + base_quantity: &str, + base_margin: &str, + spread: f64, + trader: &SigningAccount, + subaccount_id: &SubaccountId, +) -> MsgBatchUpdateOrdersResponse { + let exchange = Exchange::new(app); + + // Calculate adjusted prices for buy and sell based on the spread + let sell_price = format!("{}", base_price.parse::().unwrap() + spread); + let buy_price = format!("{}", base_price.parse::().unwrap() - spread); + + // Scaling and executing the sell order + let (perp_sell_price, perp_sell_quantity, perp_sell_margin) = + scale_price_quantity_perp_market(&sell_price, base_quantity, base_margin, &MOCK_QUOTE_DECIMALS); + + // Scaling and executing the buy order + let (perp_buy_price, perp_buy_quantity, perp_buy_margin) = + scale_price_quantity_perp_market(&buy_price, base_quantity, base_margin, &MOCK_QUOTE_DECIMALS); + + // Scaling and executing the sell order + let (spot_sell_price, spot_sell_quantity) = + scale_price_quantity_spot_market(&sell_price, base_quantity, &MOCK_BASE_DECIMALS, &MOCK_QUOTE_DECIMALS); + + // Scaling and executing the buy order + let (spot_buy_price, spot_buy_quantity) = scale_price_quantity_spot_market(&buy_price, base_quantity, &MOCK_BASE_DECIMALS, &MOCK_QUOTE_DECIMALS); + + exchange + .batch_update_orders( + MsgBatchUpdateOrders { + sender: trader.address(), + subaccount_id: subaccount_id.as_str().to_string(), + derivative_market_ids_to_cancel_all: vec![perp_market_id.to_string()], + spot_market_ids_to_cancel_all: vec![spot_market_id.to_string()], + derivative_orders_to_create: vec![ + DerivativeOrder { + market_id: perp_market_id.to_string(), + order_info: Some(OrderInfo { + subaccount_id: subaccount_id.as_str().to_string(), + fee_recipient: trader.address(), + price: perp_buy_price.clone(), + quantity: perp_buy_quantity.clone(), + cid: "".to_string(), + }), + margin: perp_buy_margin.clone(), + order_type: OrderType::Buy.into(), + trigger_price: "".to_string(), + }, + DerivativeOrder { + market_id: perp_market_id.to_string(), + order_info: Some(OrderInfo { + subaccount_id: subaccount_id.as_str().to_string(), + fee_recipient: trader.address(), + price: perp_sell_price.clone(), + quantity: perp_sell_quantity.clone(), + cid: "".to_string(), + }), + margin: perp_sell_margin.clone(), + order_type: OrderType::Sell.into(), + trigger_price: "".to_string(), + }, + ], + spot_orders_to_create: vec![ + SpotOrder { + market_id: spot_market_id.to_string(), + order_info: Some(OrderInfo { + subaccount_id: subaccount_id.as_str().to_string(), + fee_recipient: trader.address(), + price: spot_buy_price.clone(), + quantity: spot_buy_quantity.clone(), + cid: "".to_string(), + }), + order_type: OrderType::Buy.into(), + trigger_price: "".to_string(), + }, + SpotOrder { + market_id: spot_market_id.to_string(), + order_info: Some(OrderInfo { + subaccount_id: subaccount_id.as_str().to_string(), + fee_recipient: trader.address(), + price: spot_sell_price.clone(), + quantity: spot_sell_quantity.clone(), + cid: "".to_string(), + }), + order_type: OrderType::Sell.into(), + trigger_price: "".to_string(), + }, + ], + ..Default::default() + }, + trader, + ) + .unwrap() + .data +} + +pub fn cancel_derivative_order_as( + app: &InjectiveTestApp, + market_id: String, + order_hash: String, + trader: &SigningAccount, + subaccount_id: &SubaccountId, +) { + let exchange = Exchange::new(app); + + exchange + .cancel_derivative_order( + MsgCancelDerivativeOrder { + sender: trader.address(), + market_id, + subaccount_id: subaccount_id.as_str().to_string(), + order_hash, + order_mask: 0i32, + cid: "".to_string(), + }, + trader, + ) + .unwrap(); +} + +pub fn launch_spot_market(exchange: &Exchange, signer: &SigningAccount, ticker: String) -> String { + exchange + .instant_spot_market_launch( + MsgInstantSpotMarketLaunch { + sender: signer.address(), + ticker: ticker.clone(), + base_denom: MOCK_BASE_DENOM.to_string(), + quote_denom: MOCK_QUOTE_DENOM.to_string(), + min_price_tick_size: dec_to_proto(FPDecimal::must_from_str("0.000000000000001")), + min_quantity_tick_size: dec_to_proto(FPDecimal::must_from_str("1000000000000000")), + min_notional: dec_to_proto(FPDecimal::must_from_str("1")), + base_decimals: MOCK_BASE_DECIMALS as u32, + quote_decimals: MOCK_QUOTE_DECIMALS as u32, + }, + signer, + ) + .unwrap(); + + get_spot_market_id(exchange, ticker) +} + +pub fn launch_spot_market_atom(exchange: &Exchange, signer: &SigningAccount, ticker: String) -> String { + exchange + .instant_spot_market_launch_v2( + v2::MsgInstantSpotMarketLaunch { + sender: signer.address(), + ticker: "ATOM/USDT".to_owned(), + base_denom: MOCK_ATOM_DENOM.to_owned(), + quote_denom: MOCK_QUOTE_DENOM.to_owned(), + min_price_tick_size: dec_to_proto(FPDecimal::must_from_str("0.000010000000000000")), + min_quantity_tick_size: dec_to_proto(FPDecimal::must_from_str("100000")), + min_notional: dec_to_proto(FPDecimal::must_from_str("1")), + base_decimals: MOCK_ATOM_DECIMALS as u32, + quote_decimals: MOCK_QUOTE_DECIMALS as u32, + }, + signer, + ) + .unwrap(); + + get_spot_market_id(exchange, ticker) +} + +pub fn launch_spot_market_custom( + exchange: &Exchange, + signer: &SigningAccount, + ticker: String, + base_denom: String, + quote_denom: String, + min_price_tick_size: String, + min_quantity_tick_size: String, +) -> String { + exchange + .instant_spot_market_launch( + MsgInstantSpotMarketLaunch { + sender: signer.address(), + ticker: ticker.clone(), + base_denom, + quote_denom, + min_price_tick_size: dec_to_proto(FPDecimal::must_from_str(&min_price_tick_size)), + min_quantity_tick_size: dec_to_proto(FPDecimal::must_from_str(&min_quantity_tick_size)), + min_notional: dec_to_proto(FPDecimal::must_from_str("1")), + base_decimals: MOCK_BASE_DECIMALS as u32, + quote_decimals: MOCK_QUOTE_DECIMALS as u32, + }, + signer, + ) + .unwrap(); + + get_spot_market_id(exchange, ticker) +} + +pub fn launch_spot_market_custom_v2( + exchange: &Exchange, + signer: &SigningAccount, + ticker: String, + base_denom: String, + quote_denom: String, + min_price_tick_size: String, + min_quantity_tick_size: String, + base_decimals: u32, + quote_decimals: u32, +) -> String { + exchange + .instant_spot_market_launch_v2( + v2::MsgInstantSpotMarketLaunch { + sender: signer.address(), + ticker: ticker.clone(), + base_denom, + quote_denom, + min_price_tick_size: dec_to_proto(FPDecimal::must_from_str(&min_price_tick_size)), + min_quantity_tick_size: dec_to_proto(FPDecimal::must_from_str(&min_quantity_tick_size)), + min_notional: dec_to_proto(FPDecimal::must_from_str("1")), + base_decimals, + quote_decimals, + }, + signer, + ) + .unwrap(); + + get_spot_market_id(exchange, ticker) +} + +pub fn launch_perp_market(exchange: &Exchange, signer: &SigningAccount, ticker: String) -> String { + exchange + .instant_perpetual_market_launch_v2( + v2::MsgInstantPerpetualMarketLaunch { + sender: signer.address(), + ticker: ticker.to_owned(), + quote_denom: "usdt".to_string(), + oracle_base: "inj".to_string(), + oracle_quote: "usdt".to_string(), + oracle_scale_factor: 6u32, + oracle_type: 2i32, + maker_fee_rate: "-000100000000000000".to_owned(), + taker_fee_rate: "0005000000000000000".to_owned(), + initial_margin_ratio: "195000000000000000".to_owned(), + maintenance_margin_ratio: "50000000000000000".to_owned(), + min_price_tick_size: "1000000000000000000000".to_owned(), + min_quantity_tick_size: "1000000000000000".to_owned(), + min_notional: dec_to_proto(FPDecimal::must_from_str("1")), + reduce_margin_ratio: "150000000000000000".to_string(), + }, + signer, + ) + .unwrap(); + + get_perpetual_market_id(exchange, ticker) +} + +pub fn launch_perp_market_atom(exchange: &Exchange, signer: &SigningAccount, ticker: String) -> String { + exchange + .instant_perpetual_market_launch_v2( + v2::MsgInstantPerpetualMarketLaunch { + sender: signer.address(), + ticker: ticker.to_owned(), + quote_denom: MOCK_QUOTE_DENOM.to_owned(), + oracle_base: MOCK_ATOM_DENOM.to_owned(), + oracle_quote: MOCK_QUOTE_DENOM.to_owned(), + oracle_scale_factor: 6u32, + oracle_type: 2i32, + maker_fee_rate: "-000100000000000000".to_owned(), + taker_fee_rate: "0005000000000000000".to_owned(), + initial_margin_ratio: "195000000000000000".to_owned(), + maintenance_margin_ratio: "50000000000000000".to_owned(), + min_price_tick_size: "1000000000000000000000".to_owned(), + min_quantity_tick_size: "10000000000000000".to_owned(), + min_notional: dec_to_proto(FPDecimal::must_from_str("1")), + reduce_margin_ratio: "150000000000000000".to_string(), + }, + signer, + ) + .unwrap(); + + get_perpetual_market_id(exchange, ticker) +} + +pub fn execute_spot_limit_order(app: &InjectiveTestApp, market_id: String, price: String, quantity: String, order_type: OrderType) { + let trader = app + .init_account(&[ + str_coin("1000000", MOCK_ATOM_DENOM, MOCK_ATOM_DECIMALS), + str_coin("1000000", MOCK_BASE_DENOM, MOCK_BASE_DECIMALS), + str_coin("1000000", MOCK_STAKE_DENOM, MOCK_STAKE_DECIMALS), + str_coin("1000000", MOCK_QUOTE_DENOM, MOCK_QUOTE_DECIMALS), + str_coin("1000000", MOCK_USDC_DENOM, MOCK_QUOTE_DECIMALS), + ]) + .unwrap(); + + let exchange = Exchange::new(app); + + exchange + .create_spot_limit_order( + MsgCreateSpotLimitOrder { + sender: trader.address(), + order: Some(SpotOrder { + market_id, + order_info: Some(OrderInfo { + subaccount_id: get_default_subaccount_id_for_checked_address(&Addr::unchecked(trader.address())) + .as_str() + .to_string(), + fee_recipient: trader.address(), + price, + quantity, + cid: "".to_string(), + }), + order_type: order_type.into(), + trigger_price: "".to_string(), + }), + }, + &trader, + ) + .unwrap(); +} + +pub fn execute_spot_limit_order_as( + app: &InjectiveTestApp, + market_id: String, + price: String, + quantity: String, + order_type: OrderType, + trader: &SigningAccount, + subaccount_id: &SubaccountId, +) { + let exchange = Exchange::new(app); + + exchange + .create_spot_limit_order( + MsgCreateSpotLimitOrder { + sender: trader.address(), + order: Some(SpotOrder { + market_id, + order_info: Some(OrderInfo { + subaccount_id: subaccount_id.as_str().to_string(), + fee_recipient: trader.address(), + price, + quantity, + cid: "".to_string(), + }), + order_type: order_type.into(), + trigger_price: "".to_string(), + }), + }, + trader, + ) + .unwrap(); +} + +pub fn estimate_funding_apy(funding_info: &PerpetualMarketFunding, position: &Position) -> FPDecimal { + let cumulative_funding = FPDecimal::from_str(&funding_info.cumulative_funding).unwrap(); + let cumulative_funding_entry = FPDecimal::from_str(&position.cumulative_funding_entry).unwrap(); + + cumulative_funding - cumulative_funding_entry +} + +pub fn execute_derivative_limit_order( + app: &InjectiveTestApp, + market_id: String, + price: String, + quantity: String, + margin: String, + order_type: OrderType, +) { + let trader = app + .init_account(&[ + str_coin("1000000", MOCK_ATOM_DENOM, MOCK_ATOM_DECIMALS), + str_coin("1000000", MOCK_BASE_DENOM, MOCK_BASE_DECIMALS), + str_coin("1000000", MOCK_STAKE_DENOM, MOCK_STAKE_DECIMALS), + str_coin("1000000", MOCK_QUOTE_DENOM, MOCK_QUOTE_DECIMALS), + ]) + .unwrap(); + + let exchange = Exchange::new(app); + + exchange + .create_derivative_limit_order( + MsgCreateDerivativeLimitOrder { + sender: trader.address(), + order: Some(DerivativeOrder { + market_id, + order_info: Some(OrderInfo { + subaccount_id: get_default_subaccount_id_for_checked_address(&Addr::unchecked(trader.address())) + .as_str() + .to_string(), + fee_recipient: trader.address(), + price, + quantity, + cid: "".to_string(), + }), + margin, + order_type: order_type.into(), + trigger_price: "".to_string(), + }), + }, + &trader, + ) + .unwrap(); +} + +pub fn execute_derivative_limit_order_as( + app: &InjectiveTestApp, + market_id: String, + price: String, + quantity: String, + margin: String, + order_type: OrderType, + trader: &SigningAccount, + subaccount_id: &SubaccountId, +) -> MsgCreateDerivativeLimitOrderResponse { + let exchange = Exchange::new(app); + + exchange + .create_derivative_limit_order( + MsgCreateDerivativeLimitOrder { + sender: trader.address(), + order: Some(DerivativeOrder { + market_id, + order_info: Some(OrderInfo { + subaccount_id: subaccount_id.as_str().to_string(), + fee_recipient: trader.address(), + price, + quantity, + cid: "".to_string(), + }), + margin, + order_type: order_type.into(), + trigger_price: "".to_string(), + }), + }, + trader, + ) + .unwrap() + .data +} + +pub fn remove_orders( + app: &InjectiveTestApp, + perp_market_id: &str, + spot_market_id: &str, + trader: &SigningAccount, + subaccount_id: &SubaccountId, +) -> MsgBatchUpdateOrdersResponse { + let exchange = Exchange::new(app); + + exchange + .batch_update_orders( + MsgBatchUpdateOrders { + sender: trader.address(), + subaccount_id: subaccount_id.as_str().to_string(), + derivative_market_ids_to_cancel_all: vec![perp_market_id.to_string()], + spot_market_ids_to_cancel_all: vec![spot_market_id.to_string()], + ..Default::default() + }, + trader, + ) + .unwrap() + .data +} + +pub fn get_perpetual_market_id(exchange: &Exchange, ticker: String) -> String { + let perpetual_markets = exchange + .query_derivative_markets(&QueryDerivativeMarketsRequest { + status: "Active".to_string(), + market_ids: vec![], + with_mid_price_and_tob: false, + }) + .unwrap() + .markets; + + let market = perpetual_markets + .iter() + .filter(|m| m.market.is_some()) + .find(|m| m.market.as_ref().unwrap().ticker == ticker) + .unwrap() + .market + .as_ref() + .unwrap(); + + market.market_id.to_string() +} + +pub fn get_subaccount_total_value(exchange: &Exchange, market_id: String, subaccount_id: String, denom: String) -> Uint128 { + let trade_deposits_during = exchange + .query_subaccount_deposits(&QuerySubaccountDepositsRequest { + subaccount_id: subaccount_id.clone(), + subaccount: None, + }) + .unwrap(); + + let total_balance = Uint128::from_str(&trade_deposits_during.deposits[&denom].total_balance) + .unwrap_or(Uint128::zero()) // Use zero if the result is an Err + / Uint128::one(); + + let effective_position = exchange + .query_subaccount_effective_position_in_market(&QuerySubaccountEffectivePositionInMarketRequest { market_id, subaccount_id }) + .unwrap(); + + let effective_margin = effective_position.state.as_ref().map_or(Uint128::zero(), |state| { + Uint128::from_str(&state.effective_margin).unwrap_or(Uint128::zero()) + }) / Uint128::one(); + + total_balance + effective_margin +} + +pub fn get_spot_market_id(exchange: &Exchange, ticker: String) -> String { + let spot_markets = exchange + .query_spot_markets(&QuerySpotMarketsRequest { + status: "Active".to_string(), + market_ids: vec![], + }) + .unwrap() + .markets; + + let market = spot_markets.iter().find(|m| m.ticker == ticker).unwrap(); + + market.market_id.to_string() +} diff --git a/src/test_tube/insurance.rs b/src/test_tube/insurance.rs new file mode 100644 index 0000000..69369c6 --- /dev/null +++ b/src/test_tube/insurance.rs @@ -0,0 +1,40 @@ +use crate::{mocks::MOCK_QUOTE_DECIMALS, utils::human_to_dec}; + +use injective_test_tube::{ + injective_std::types::{ + cosmos::base::v1beta1::Coin as BaseCoin, + injective::{insurance::v1beta1::MsgCreateInsuranceFund, oracle::v1beta1::OracleType}, + }, + Account, InjectiveTestApp, Insurance, Module, SigningAccount, +}; + +pub fn launch_insurance_fund( + app: &InjectiveTestApp, + signer: &SigningAccount, + ticker: &str, + quote: &str, + oracle_base: &str, + oracle_quote: &str, + oracle_type: OracleType, +) { + let insurance = Insurance::new(app); + + insurance + .create_insurance_fund( + MsgCreateInsuranceFund { + sender: signer.address(), + ticker: ticker.to_string(), + quote_denom: quote.to_string(), + oracle_base: oracle_base.to_string(), + oracle_quote: oracle_quote.to_string(), + oracle_type: oracle_type as i32, + expiry: -1i64, + initial_deposit: Some(BaseCoin { + amount: human_to_dec("1_000", MOCK_QUOTE_DECIMALS).to_string(), + denom: quote.to_string(), + }), + }, + signer, + ) + .unwrap(); +} diff --git a/src/test_tube/mod.rs b/src/test_tube/mod.rs new file mode 100644 index 0000000..9dfe427 --- /dev/null +++ b/src/test_tube/mod.rs @@ -0,0 +1,6 @@ +pub mod authz; +pub mod bank; +pub mod exchange; +pub mod insurance; +pub mod oracle; +pub mod utils; diff --git a/src/test_tube/oracle.rs b/src/test_tube/oracle.rs new file mode 100644 index 0000000..21fd52b --- /dev/null +++ b/src/test_tube/oracle.rs @@ -0,0 +1,116 @@ +use injective_test_tube::{ + injective_std::{ + shim::Any, + types::{ + cosmos::{ + base::v1beta1::Coin as BaseCoin, + gov::{v1::MsgVote, v1beta1::MsgSubmitProposal as MsgSubmitProposalV1Beta1}, + }, + injective::oracle::v1beta1::{ + GrantPriceFeederPrivilegeProposal, MsgRelayPriceFeedPrice, QueryOraclePriceRequest, QueryOraclePriceResponse, + }, + }, + }, + Account, Gov, InjectiveTestApp, Module, Oracle, SigningAccount, +}; +use prost::Message; +use std::str::FromStr; + +pub fn launch_price_feed_oracle( + app: &InjectiveTestApp, + signer: &SigningAccount, + validator: &SigningAccount, + base: &str, + quote: &str, + dec_price: String, +) { + let gov = Gov::new(app); + let oracle = Oracle::new(app); + + let mut buf = vec![]; + GrantPriceFeederPrivilegeProposal::encode( + &GrantPriceFeederPrivilegeProposal { + title: "test-proposal".to_string(), + description: "test-proposal".to_string(), + base: base.to_string(), + quote: quote.to_string(), + relayers: vec![signer.address()], + }, + &mut buf, + ) + .unwrap(); + + let res = gov + .submit_proposal_v1beta1( + MsgSubmitProposalV1Beta1 { + content: Some(Any { + type_url: "/injective.oracle.v1beta1.GrantPriceFeederPrivilegeProposal".to_string(), + value: buf, + }), + initial_deposit: vec![BaseCoin { + amount: "100000000000000000000".to_string(), + denom: "inj".to_string(), + }], + proposer: validator.address(), + }, + validator, + ) + .unwrap(); + + let proposal_id = res.events.iter().find(|e| e.ty == "submit_proposal").unwrap().attributes[0] + .value + .to_owned(); + + gov.vote( + MsgVote { + proposal_id: u64::from_str(&proposal_id).unwrap(), + voter: validator.address(), + option: 1i32, + metadata: "".to_string(), + }, + validator, + ) + .unwrap(); + + // NOTE: increase the block time in order to move past the voting period + app.increase_time(10u64); + + oracle + .relay_price_feed( + MsgRelayPriceFeedPrice { + sender: signer.address(), + base: vec![base.to_string()], + quote: vec![quote.to_string()], + price: vec![dec_price], // 1.2@18dp + }, + signer, + ) + .unwrap(); +} + +pub fn relay_price_feed_price(oracle: &Oracle, relayer: &SigningAccount, base_denom: &str, quote_denom: &str, price: &str) { + oracle + .relay_price_feed( + MsgRelayPriceFeedPrice { + sender: relayer.address(), + base: vec![base_denom.to_string()], + quote: vec![quote_denom.to_string()], + price: vec![price.to_string()], + }, + relayer, + ) + .unwrap(); +} + +pub fn query_oracle_mark_price(app: &InjectiveTestApp, base_denom: &str, quote_denom: &str) -> QueryOraclePriceResponse { + let oracle = Oracle::new(app); + + oracle + .query_oracle_price(&QueryOraclePriceRequest { + oracle_type: 2, + base: base_denom.to_string(), + quote: quote_denom.to_string(), + scaling_options: None, + }) + .unwrap() +} diff --git a/src/test_tube/utils.rs b/src/test_tube/utils.rs new file mode 100644 index 0000000..e28ba6a --- /dev/null +++ b/src/test_tube/utils.rs @@ -0,0 +1,24 @@ +use injective_test_tube::{InjectiveTestApp, SigningAccount, Wasm}; + +pub fn wasm_file(contract_name: String) -> String { + let snaked_name = contract_name.replace('-', "_"); + let arch = std::env::consts::ARCH; + + let target = format!("../../target/wasm32-unknown-unknown/release/{snaked_name}.wasm"); + + let artifacts_dir = std::env::var("ARTIFACTS_DIR_PATH").unwrap_or_else(|_| "artifacts".to_string()); + let arch_target = format!("../../{artifacts_dir}/{snaked_name}-{arch}.wasm"); + + if std::path::Path::new(&target).exists() { + target + } else if std::path::Path::new(&arch_target).exists() { + arch_target + } else { + format!("../../{artifacts_dir}/{snaked_name}.wasm") + } +} + +pub fn store_code(wasm: &Wasm, owner: &SigningAccount, contract_name: String) -> u64 { + let wasm_byte_code = std::fs::read(wasm_file(contract_name)).unwrap(); + wasm.store_code(&wasm_byte_code, None, owner).unwrap().data.code_id +} diff --git a/src/utils.rs b/src/utils.rs new file mode 100644 index 0000000..bc654ef --- /dev/null +++ b/src/utils.rs @@ -0,0 +1,75 @@ +use cosmwasm_std::{coin, Coin}; +use injective_math::{scale::Scaled, FPDecimal}; + +pub fn assert_execute_error(message: &str) -> String { + format!( + "execute error: failed to execute message; message index: 0: {}: execute wasm contract failed", + message + ) +} + +pub fn assert_instantiate_error(message: &str) -> String { + format!( + "execute error: failed to execute message; message index: 0: {}: instantiate wasm contract failed", + message + ) +} + +pub fn proto_to_dec(val: &str) -> FPDecimal { + FPDecimal::must_from_str(val).scaled(-18) +} + +pub fn dec_to_human(val: FPDecimal, exponent: i32) -> String { + val.scaled(-exponent).to_string() +} + +pub fn dec_to_proto(val: FPDecimal) -> String { + val.scaled(18).to_string() +} + +pub fn human_to_dec(raw_number: &str, decimals: i32) -> FPDecimal { + FPDecimal::must_from_str(&raw_number.replace('_', "")).scaled(decimals) +} + +pub fn human_to_dec_vector(values: Vec<&str>, decimals: i32) -> Vec { + values.iter().map(|v| human_to_dec(v, decimals)).collect::>() +} + +pub fn human_to_i64(raw_number: &str, exponent: i32) -> i64 { + let scaled_amount = FPDecimal::must_from_str(&raw_number.replace('_', "")).scaled(exponent); + let as_int: i64 = scaled_amount.to_string().parse().unwrap(); + as_int +} + +pub fn human_to_proto(raw_number: &str, decimals: i32) -> String { + FPDecimal::must_from_str(&raw_number.replace('_', "")).scaled(18 + decimals).to_string() +} + +pub fn str_coin(human_amount: &str, denom: &str, decimals: i32) -> Coin { + let scaled_amount = human_to_dec(human_amount, decimals); + let as_int: u128 = scaled_amount.into(); + coin(as_int, denom) +} + +pub fn scale_price_quantity_spot_market(price: &str, quantity: &str, base_decimals: &i32, quote_decimals: &i32) -> (String, String) { + let price_dec = FPDecimal::must_from_str(price.replace('_', "").as_str()); + let quantity_dec = FPDecimal::must_from_str(quantity.replace('_', "").as_str()); + + let scaled_price = price_dec.scaled(quote_decimals - base_decimals); + let scaled_quantity = quantity_dec.scaled(*base_decimals); + + (dec_to_proto(scaled_price), dec_to_proto(scaled_quantity)) +} + +pub fn scale_price_quantity_perp_market(price: &str, quantity: &str, margin_ratio: &str, quote_decimals: &i32) -> (String, String, String) { + let price_dec = FPDecimal::must_from_str(price.replace('_', "").as_str()); + let quantity_dec = FPDecimal::must_from_str(quantity.replace('_', "").as_str()); + let margin_ratio_dec = FPDecimal::must_from_str(margin_ratio.replace('_', "").as_str()); + + let scaled_price = price_dec.scaled(*quote_decimals); + let scaled_quantity = quantity_dec; + + let scaled_margin = (price_dec * quantity_dec * margin_ratio_dec).scaled(*quote_decimals); + + (dec_to_proto(scaled_price), dec_to_proto(scaled_quantity), dec_to_proto(scaled_margin)) +}