From 77b482e8c451fe98ada8f008092a0b9f4438646d Mon Sep 17 00:00:00 2001 From: malik672 Date: Sun, 25 Feb 2024 07:02:21 +0100 Subject: [PATCH 01/17] new version --- Cargo.lock | 1522 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 2 +- 2 files changed, 1523 insertions(+), 1 deletion(-) create mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..573d152 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1522 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloy-primitives" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef197eb250c64962003cb08b90b17f0882c192f4a6f2f544809d424fd7cb0e7d" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "arrayvec", + "bytes", +] + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "auto_impl" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bigdecimal" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06619be423ea5bb86c95f087d5707942791a08a85530df0db2209a3ecfb8bc9" +dependencies = [ + "autocfg", + "libm", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[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 = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "cc" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3286b845d0fccbdd15af433f61c5970e711987036cb468f437ff6badd70f4e24" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "const-hex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efbd12d49ab0eaf8193ba9175e45f56bbc2e4b27d57b8cfe62aa47942a46b9a9" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[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 = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 1.0.109", +] + +[[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", + "const-oid", + "crypto-common", + "subtle", +] + +[[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 = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[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 = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "eth_checksum" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0451da8f79bc717a33d8edd5f11b8fc7d510fd0a3b14f78361ff647f677da0d0" +dependencies = [ + "rust-crypto", +] + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[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 = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[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 = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indexmap" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "keccak-asm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "parity-scale-codec" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pest" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" +dependencies = [ + "libc", + "rand 0.4.6", +] + +[[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.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 = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + +[[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 = "regex" +version = "1.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "ruint" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" + +[[package]] +name = "rust-crypto" +version = "0.2.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" +dependencies = [ + "gcc", + "libc", + "rand 0.3.23", + "rustc-serialize", + "time", +] + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc-serialize" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.22", +] + +[[package]] +name = "rustix" +version = "0.38.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[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 = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3-asm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" +dependencies = [ + "cc", + "cfg-if", +] + +[[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 = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[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.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys", +] + +[[package]] +name = "thiserror" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "time" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[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", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "uniswap-sdk-core" +version = "0.16.0" +dependencies = [ + "alloy-primitives", + "bigdecimal", + "eth_checksum", + "lazy_static", + "num-bigint", + "num-integer", + "num-rational", + "num-traits", + "regex", + "syn 2.0.50", + "thiserror", +] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[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-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +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.50", +] diff --git a/Cargo.toml b/Cargo.toml index 238dd28..f7ccf41 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uniswap-sdk-core" -version = "0.15.0" +version = "0.16.0" edition = "2021" authors = ["malik ", "Shuhui Luo "] description = "The Uniswap SDK Core in Rust provides essential functionality for interacting with the Uniswap decentralized exchange" From 5f2d4eaeb45227a9fe58cfc11c63f5a5d4ce50cc Mon Sep 17 00:00:00 2001 From: malik672 Date: Sun, 25 Feb 2024 13:00:23 +0100 Subject: [PATCH 02/17] changes --- Cargo.toml | 2 +- src/entities/base_currency.rs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 11e1366..463be7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uniswap-sdk-core" -version = "0.15.1" +version = "0.16" edition = "2021" authors = ["malik ", "Shuhui Luo "] description = "The Uniswap SDK Core in Rust provides essential functionality for interacting with the Uniswap decentralized exchange" diff --git a/src/entities/base_currency.rs b/src/entities/base_currency.rs index b948241..0e76867 100644 --- a/src/entities/base_currency.rs +++ b/src/entities/base_currency.rs @@ -1,3 +1,5 @@ +use std::ops::Deref; + use alloy_primitives::ChainId; #[derive(Clone, PartialEq, Debug)] @@ -42,3 +44,11 @@ impl BaseCurrency for CurrencyLike { self.name.clone() } } + +impl Deref for CurrencyLike { + type Target = M; + + fn deref(&self) -> &Self::Target { + &self.meta + } +} From 876621cd8c2bedfe22f9d91d224e13c1837dda7f Mon Sep 17 00:00:00 2001 From: malik672 Date: Sun, 25 Feb 2024 13:02:03 +0100 Subject: [PATCH 03/17] new version --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d8df70e..573d152 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1347,7 +1347,7 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "uniswap-sdk-core" -version = "0.15.1" +version = "0.16.0" dependencies = [ "alloy-primitives", "bigdecimal", diff --git a/Cargo.toml b/Cargo.toml index 463be7b..dfef203 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uniswap-sdk-core" -version = "0.16" +version = "0.16.0" edition = "2021" authors = ["malik ", "Shuhui Luo "] description = "The Uniswap SDK Core in Rust provides essential functionality for interacting with the Uniswap decentralized exchange" From be18fb1a28713103cd779d1337c662e30ac421f7 Mon Sep 17 00:00:00 2001 From: malik672 Date: Sun, 25 Feb 2024 13:14:37 +0100 Subject: [PATCH 04/17] solve issue 45 --- src/addresses.rs | 19 ++++++++++++++++++- src/chains.rs | 4 +++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/addresses.rs b/src/addresses.rs index 88f463a..594c57b 100644 --- a/src/addresses.rs +++ b/src/addresses.rs @@ -174,6 +174,23 @@ pub fn optimism_goerli_addresses() -> ChainAddresses { } } +/// Optimism Sepolia addresses +pub fn optimism_sepolia_addresses() -> ChainAddresses { + ChainAddresses { + v3_core_factory_address: address!("8CE191193D15ea94e11d327b4c7ad8bbE520f6aF"), + multicall_address: address!("80e4e06841bb76AA9735E0448cB8d003C0EF009a"), + quoter_address: address!("0FBEa6cf957d95ee9313490050F6A0DA68039404"), + v3_migrator_address: Some(address!("E7EcbAAaA54D007A00dbb6c1d2f150066D69dA07")), + nonfungible_position_manager_address: Some(address!( + "dA75cEf1C93078e8b736FCA5D5a30adb97C8957d" + )), + tick_lens_address: Some(address!("0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5")), + swap_router02_address: None, + v1_mixed_route_quoter_address: None, + } +} + + /// Arbitrum Goerli v3 addresses pub fn arbitrum_goerli_addresses() -> ChainAddresses { ChainAddresses { @@ -272,7 +289,7 @@ lazy_static! { new_map.insert(ChainId::POLYGONMUMBAI as u64, polygon_addresses()); new_map.insert(ChainId::OPTIMISM as u64, optimism_addresses()); new_map.insert(ChainId::OPTIMISMGOERLI as u64, optimism_goerli_addresses()); - + new_map.insert(ChainId::OPTIMISMSEPOLIA as u64, optimism_sepolia_addresses()); new_map.insert(ChainId::BASEGOERLI as u64, base_goerli_addresses()); new_map.insert(ChainId::BASE as u64, base_addresses()); new_map diff --git a/src/chains.rs b/src/chains.rs index 642e372..1f18b14 100644 --- a/src/chains.rs +++ b/src/chains.rs @@ -5,6 +5,7 @@ pub enum ChainId { SEPOLIA = 11155111, OPTIMISM = 10, OPTIMISMGOERLI = 420, + OPTIMISMSEPOLIA = 11155420, ARBITRUMONE = 42161, ARBITRUMGOERLI = 421613, POLYGON = 137, @@ -19,10 +20,11 @@ pub enum ChainId { BASE = 8453, } -pub const SUPPORTED_CHAINS: [ChainId; 15] = [ +pub const SUPPORTED_CHAINS: [ChainId; 16] = [ ChainId::MAINNET, ChainId::OPTIMISM, ChainId::OPTIMISMGOERLI, + ChainId::OPTIMISMSEPOLIA, ChainId::ARBITRUMONE, ChainId::ARBITRUMGOERLI, ChainId::POLYGON, From 4234788ce12b8034d4bcced1f67fc51810ae1a25 Mon Sep 17 00:00:00 2001 From: malik672 Date: Sun, 25 Feb 2024 13:18:54 +0100 Subject: [PATCH 05/17] solve issue 45 --- src/addresses.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/addresses.rs b/src/addresses.rs index 594c57b..559f3ff 100644 --- a/src/addresses.rs +++ b/src/addresses.rs @@ -184,13 +184,12 @@ pub fn optimism_sepolia_addresses() -> ChainAddresses { nonfungible_position_manager_address: Some(address!( "dA75cEf1C93078e8b736FCA5D5a30adb97C8957d" )), - tick_lens_address: Some(address!("0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5")), + tick_lens_address: Some(address!("Cb7f54747F58F8944973cea5b8f4ac2209BadDC5")), swap_router02_address: None, v1_mixed_route_quoter_address: None, } } - /// Arbitrum Goerli v3 addresses pub fn arbitrum_goerli_addresses() -> ChainAddresses { ChainAddresses { @@ -289,7 +288,10 @@ lazy_static! { new_map.insert(ChainId::POLYGONMUMBAI as u64, polygon_addresses()); new_map.insert(ChainId::OPTIMISM as u64, optimism_addresses()); new_map.insert(ChainId::OPTIMISMGOERLI as u64, optimism_goerli_addresses()); - new_map.insert(ChainId::OPTIMISMSEPOLIA as u64, optimism_sepolia_addresses()); + new_map.insert( + ChainId::OPTIMISMSEPOLIA as u64, + optimism_sepolia_addresses(), + ); new_map.insert(ChainId::BASEGOERLI as u64, base_goerli_addresses()); new_map.insert(ChainId::BASE as u64, base_addresses()); new_map From 9e792d95572abac709d11094e2b9c0fcd3e5cafb Mon Sep 17 00:00:00 2001 From: malik672 Date: Sun, 25 Feb 2024 20:21:48 +0100 Subject: [PATCH 06/17] remove lock --- Cargo.lock | 1522 ---------------------------------------------------- 1 file changed, 1522 deletions(-) delete mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 573d152..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,1522 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloy-primitives" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef197eb250c64962003cb08b90b17f0882c192f4a6f2f544809d424fd7cb0e7d" -dependencies = [ - "alloy-rlp", - "bytes", - "cfg-if", - "const-hex", - "derive_more", - "hex-literal", - "itoa", - "k256", - "keccak-asm", - "proptest", - "rand 0.8.5", - "ruint", - "serde", - "tiny-keccak", -] - -[[package]] -name = "alloy-rlp" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" -dependencies = [ - "arrayvec", - "bytes", -] - -[[package]] -name = "ark-ff" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" -dependencies = [ - "ark-ff-asm 0.3.0", - "ark-ff-macros 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "derivative", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.3.3", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest 0.10.7", - "itertools", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.4.0", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" -dependencies = [ - "num-bigint", - "num-traits", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-serialize" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" -dependencies = [ - "ark-std 0.3.0", - "digest 0.9.0", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint", -] - -[[package]] -name = "ark-std" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "auto_impl" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bigdecimal" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06619be423ea5bb86c95f087d5707942791a08a85530df0db2209a3ecfb8bc9" -dependencies = [ - "autocfg", - "libm", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[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 = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - -[[package]] -name = "cc" -version = "1.0.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3286b845d0fccbdd15af433f61c5970e711987036cb468f437ff6badd70f4e24" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "const-hex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbd12d49ab0eaf8193ba9175e45f56bbc2e4b27d57b8cfe62aa47942a46b9a9" -dependencies = [ - "cfg-if", - "cpufeatures", - "hex", - "proptest", - "serde", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[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 = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn 1.0.109", -] - -[[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", - "const-oid", - "crypto-common", - "subtle", -] - -[[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 = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[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 = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "eth_checksum" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0451da8f79bc717a33d8edd5f11b8fc7d510fd0a3b14f78361ff647f677da0d0" -dependencies = [ - "rust-crypto", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "fastrlp" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "fixed-hash" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" -dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "gcc" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[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 = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[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 = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "indexmap" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "k256" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", - "signature", -] - -[[package]] -name = "keccak-asm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" -dependencies = [ - "digest 0.10.7", - "sha3-asm", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "parity-scale-codec" -version = "3.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pest" -version = "2.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "primitive-types" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" -dependencies = [ - "fixed-hash", - "impl-codec", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" -dependencies = [ - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "proc-macro2" -version = "1.0.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags", - "lazy_static", - "num-traits", - "rand 0.8.5", - "rand_chacha", - "rand_xorshift", - "regex-syntax", - "rusty-fork", - "tempfile", - "unarray", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -dependencies = [ - "libc", - "rand 0.4.6", -] - -[[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.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 = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core 0.6.4", -] - -[[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 = "regex" -version = "1.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "rlp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rustc-hex", -] - -[[package]] -name = "ruint" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" -dependencies = [ - "alloy-rlp", - "ark-ff 0.3.0", - "ark-ff 0.4.2", - "bytes", - "fastrlp", - "num-bigint", - "num-traits", - "parity-scale-codec", - "primitive-types", - "proptest", - "rand 0.8.5", - "rlp", - "ruint-macro", - "serde", - "valuable", - "zeroize", -] - -[[package]] -name = "ruint-macro" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" - -[[package]] -name = "rust-crypto" -version = "0.2.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" -dependencies = [ - "gcc", - "libc", - "rand 0.3.23", - "rustc-serialize", - "time", -] - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc-serialize" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.22", -] - -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", -] - -[[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 = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3-asm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" -dependencies = [ - "cc", - "cfg-if", -] - -[[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 = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[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.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys", -] - -[[package]] -name = "thiserror" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "toml_datetime" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" - -[[package]] -name = "toml_edit" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "ucd-trie" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - -[[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", -] - -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "uniswap-sdk-core" -version = "0.16.0" -dependencies = [ - "alloy-primitives", - "bigdecimal", - "eth_checksum", - "lazy_static", - "num-bigint", - "num-integer", - "num-rational", - "num-traits", - "regex", - "syn 2.0.50", - "thiserror", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[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-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" -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.50", -] From 182b7a8894a5935fcef3f43bf3c2229a69dc3314 Mon Sep 17 00:00:00 2001 From: malik672 Date: Tue, 5 Mar 2024 03:12:08 +0100 Subject: [PATCH 07/17] added upstream equivalence --- Cargo.toml | 4 - src/addresses.rs | 371 +++++++++++++++++++++++++++------- src/chains.rs | 11 +- src/entities/base_currency.rs | 3 - 4 files changed, 303 insertions(+), 86 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c59a5d4..954024e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,6 @@ [package] name = "uniswap-sdk-core" -<<<<<<< HEAD -version = "0.16.0" -======= version = "0.18.0" ->>>>>>> 2891f4e4fc69685514fcf70a9bf090dca1dfbb22 edition = "2021" authors = ["malik ", "Shuhui Luo "] description = "The Uniswap SDK Core in Rust provides essential functionality for interacting with the Uniswap decentralized exchange" diff --git a/src/addresses.rs b/src/addresses.rs index d4aeb2b..bded702 100644 --- a/src/addresses.rs +++ b/src/addresses.rs @@ -1,10 +1,11 @@ use crate::prelude::*; +use std::collections::HashMap; type AddressMap = HashMap; type ChainMap = HashMap; type ChainAddress = HashMap; -#[derive(Clone)] +#[derive(Clone, Copy)] pub struct ChainAddresses { v3_core_factory_address: Address, multicall_address: Address, @@ -57,25 +58,91 @@ pub const UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS: Address = pub const V2_FACTORY_ADDRESS: Address = address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"); lazy_static! { - pub static ref V2_FACTORY_ADDRESSES: AddressMap = construct_same_address_map( - V2_FACTORY_ADDRESS, - &[ - ChainId::POLYGON, - ChainId::OPTIMISM, - ChainId::CELO, - ChainId::ARBITRUMONE, - ChainId::BNB, - ChainId::AVALANCHE, - ChainId::BASE, - ] - ); + pub static ref V2_FACTORY_ADDRESSES: HashMap = { + let mut m = HashMap::new(); + m.insert( + ChainId::MAINNET as u64, + address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"), + ); + m.insert( + ChainId::GOERLI as u64, + address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"), + ); + m.insert( + ChainId::SEPOLIA as u64, + address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"), + ); + m.insert( + ChainId::OPTIMISM as u64, + address!("0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf"), + ); + m.insert( + ChainId::ARBITRUMONE as u64, + address!("f1D7CC64Fb4452F05c498126312eBE29f30Fbcf9"), + ); + m.insert( + ChainId::AVALANCHE as u64, + address!("9e5A52f57b3038F1B8EeE45F28b3C1967e22799C"), + ); + m.insert( + ChainId::BASE as u64, + address!("8909dc15e40173ff4699343b6eb8132c65e18ec6"), + ); + m.insert( + ChainId::BNB as u64, + address!("8909Dc15e40173Ff4699343b6eB8132c65e18eC6"), + ); + m.insert( + ChainId::POLYGON as u64, + address!("9e5A52f57b3038F1B8EeE45F28b3C1967e22799C"), + ); + m.insert( + ChainId::CELO as u64, + address!("79a530c8e2fA8748B7B40dd3629C0520c2cCf03f"), + ); + m + }; } pub const V2_ROUTER_ADDRESS: Address = address!("7a250d5630B4cF539739dF2C5dAcb4c659F2488D"); lazy_static! { - pub static ref V2_ROUTER_ADDRESSES: AddressMap = - construct_same_address_map(V2_ROUTER_ADDRESS, &[]); + pub static ref V2_ROUTER_ADDRESSES: HashMap = { + let mut m = HashMap::new(); + m.insert( + ChainId::MAINNET as u64, + address!("7a250d5630B4cF539739dF2C5dAcb4c659F2488D"), + ); + m.insert( + ChainId::GOERLI as u64, + address!("7a250d5630B4cF539739dF2C5dAcb4c659F2488D"), + ); + m.insert( + ChainId::ARBITRUMONE as u64, + address!("4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), + ); + m.insert( + ChainId::OPTIMISM as u64, + address!("4a7b5da61326a6379179b40d00f57e5bbdc962c2"), + ); + m.insert( + ChainId::BASE as u64, + address!("4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), + ); + m.insert( + ChainId::AVALANCHE as u64, + address!("4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), + ); + m.insert( + ChainId::BNB as u64, + address!("4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), + ); + m.insert( + ChainId::POLYGON as u64, + address!("edf6066a2b290c185783862c7f4776a2c8077ad1"), + ); + m + }; } impl Default for ChainAddresses { @@ -97,38 +164,47 @@ impl Default for ChainAddresses { } } -pub fn mainnet_address() -> ChainAddresses { - ChainAddresses { - v1_mixed_route_quoter_address: Some(address!("84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E")), - ..Default::default() - } +lazy_static! { + pub static ref MAINNET_ADDRESS: ChainAddresses = { + ChainAddresses { + v1_mixed_route_quoter_address: Some(address!( + "84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E" + )), + ..Default::default() + } + }; } -pub fn goerli_address() -> ChainAddresses { - ChainAddresses { - v1_mixed_route_quoter_address: Some(address!("Ba60b6e6fF25488308789E6e0A65D838be34194e")), - ..Default::default() - } +lazy_static! { + pub static ref GOERLI_ADDRESS: ChainAddresses = { + ChainAddresses { + v1_mixed_route_quoter_address: Some(address!( + "Ba60b6e6fF25488308789E6e0A65D838be34194e" + )), + ..Default::default() + } + }; } -pub fn optimism_addresses() -> ChainAddresses { - ChainAddresses::default() +lazy_static! { + pub static ref OPTIMISM_ADDRESSES: ChainAddresses = ChainAddresses::default(); } -pub fn arbitum_one_addresses() -> ChainAddresses { - ChainAddresses { - multicall_address: address!("adF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB"), - tick_lens_address: Some(address!("bfd8137f7d1516D3ea5cA83523914859ec47F573")), - ..Default::default() - } +lazy_static! { + pub static ref ARBITUM_ONE_ADDRESSES: ChainAddresses = { + ChainAddresses { + multicall_address: address!("adF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB"), + tick_lens_address: Some(address!("bfd8137f7d1516D3ea5cA83523914859ec47F573")), + ..Default::default() + } + }; } - -pub fn polygon_addresses() -> ChainAddresses { - ChainAddresses::default() +lazy_static! { + pub static ref POLYGON_ADDRESSES: ChainAddresses = ChainAddresses::default(); } /// celo v3 addresses -pub fn celo_addresses() -> ChainAddresses { +pub const CELO_ADDRESSES: ChainAddresses = { ChainAddresses { v3_core_factory_address: address!("AfE208a311B21f13EF87E33A90049fC17A7acDEc"), multicall_address: address!("633987602DE5C4F337e3DbF265303A1080324204"), @@ -141,10 +217,10 @@ pub fn celo_addresses() -> ChainAddresses { swap_router02_address: None, v1_mixed_route_quoter_address: None, } -} +}; /// BNB v3 addresses -pub fn bnb_addresses() -> ChainAddresses { +pub const BNB_ADDRESSES: ChainAddresses = { ChainAddresses { v3_core_factory_address: address!("dB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7"), multicall_address: address!("963Df249eD09c358A4819E39d9Cd5736c3087184"), @@ -157,10 +233,10 @@ pub fn bnb_addresses() -> ChainAddresses { swap_router02_address: Some(address!("B971eF87ede563556b2ED4b1C0b0019111Dd85d2")), v1_mixed_route_quoter_address: None, } -} +}; /// Optimism Goerli addresses -pub fn optimism_goerli_addresses() -> ChainAddresses { +pub const OPTIMISM_GOERLI_ADDRESSES: ChainAddresses = { ChainAddresses { v3_core_factory_address: address!("B656dA17129e7EB733A557f4EBc57B76CFbB5d10"), multicall_address: address!("07F2D8a2a02251B62af965f22fC4744A5f96BCCd"), @@ -173,10 +249,10 @@ pub fn optimism_goerli_addresses() -> ChainAddresses { swap_router02_address: None, v1_mixed_route_quoter_address: None, } -} +}; /// Optimism Sepolia addresses -pub fn optimism_sepolia_addresses() -> ChainAddresses { +pub const OPTIMISM_SEPOLIA_ADDRESSES: ChainAddresses = { ChainAddresses { v3_core_factory_address: address!("8CE191193D15ea94e11d327b4c7ad8bbE520f6aF"), multicall_address: address!("80e4e06841bb76AA9735E0448cB8d003C0EF009a"), @@ -186,13 +262,13 @@ pub fn optimism_sepolia_addresses() -> ChainAddresses { "dA75cEf1C93078e8b736FCA5D5a30adb97C8957d" )), tick_lens_address: Some(address!("Cb7f54747F58F8944973cea5b8f4ac2209BadDC5")), - swap_router02_address: None, + swap_router02_address: Some(address!("94cC0AaC535CCDB3C01d6787D6413C739ae12bc4")), v1_mixed_route_quoter_address: None, } -} +}; /// Arbitrum Goerli v3 addresses -pub fn arbitrum_goerli_addresses() -> ChainAddresses { +pub const ARBITRUM_GOERLI_ADDRESSES: ChainAddresses = { ChainAddresses { v3_core_factory_address: address!("4893376342d5D7b3e31d4184c08b265e5aB2A3f6"), multicall_address: address!("8260CB40247290317a4c062F3542622367F206Ee"), @@ -205,10 +281,26 @@ pub fn arbitrum_goerli_addresses() -> ChainAddresses { swap_router02_address: None, v1_mixed_route_quoter_address: None, } -} +}; + +/// Arbitrum sepolia v3 addresses +pub const ARBITRUM_SEPOLIA_ADDRESSES: ChainAddresses = { + ChainAddresses { + v3_core_factory_address: address!("248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e"), + multicall_address: address!("2B718b475e385eD29F56775a66aAB1F5cC6B2A0A"), + quoter_address: address!("2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B"), + v3_migrator_address: Some(address!("398f43ef2c67B941147157DA1c5a868E906E043D")), + nonfungible_position_manager_address: Some(address!( + "6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65" + )), + tick_lens_address: Some(address!("b52429333da969a0C79a60930a4Bf0020E5D1DE8")), + swap_router02_address: Some(address!("101F443B4d1b059569D643917553c771E1b9663E")), + v1_mixed_route_quoter_address: None, + } +}; /// sepolia v3 addresses -pub fn sepolia_address() -> ChainAddresses { +pub const SEPOLIA_ADDRESS: ChainAddresses = { ChainAddresses { v3_core_factory_address: address!("0227628f3F023bb0B980b67D528571c95c6DaC1c"), multicall_address: address!("D7F33bCdb21b359c8ee6F0251d30E94832baAd07"), @@ -218,13 +310,13 @@ pub fn sepolia_address() -> ChainAddresses { "1238536071E1c677A632429e3655c799b22cDA52" )), tick_lens_address: Some(address!("d7f33bcdb21b359c8ee6f0251d30e94832baad07")), - swap_router02_address: None, + swap_router02_address: Some(address!("3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E")), v1_mixed_route_quoter_address: None, } -} +}; /// Avalanche v3 addresses -pub fn avalanche_addresses() -> ChainAddresses { +pub const AVALANCHE_ADDRESSES: ChainAddresses = { ChainAddresses { v3_core_factory_address: address!("740b1c1de25031C31FF4fC9A62f554A55cdC1baD"), multicall_address: address!("0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2"), @@ -237,10 +329,10 @@ pub fn avalanche_addresses() -> ChainAddresses { swap_router02_address: Some(address!("bb00FF08d01D300023C629E8fFfFcb65A5a578cE")), v1_mixed_route_quoter_address: None, } -} +}; /// Base v3 addresses -pub fn base_addresses() -> ChainAddresses { +pub const BASE_ADDRESSES: ChainAddresses = { ChainAddresses { v3_core_factory_address: address!("33128a8fC17869897dcE68Ed026d694621f6FDfD"), multicall_address: address!("091e99cb1C49331a94dD62755D168E941AbD0693"), @@ -253,10 +345,10 @@ pub fn base_addresses() -> ChainAddresses { swap_router02_address: Some(address!("2626664c2603336E57B271c5C0b26F421741e481")), v1_mixed_route_quoter_address: None, } -} +}; /// Base Goerli v3 addresses -pub fn base_goerli_addresses() -> ChainAddresses { +pub const BASE_GOERLI_ADDRESSES: ChainAddresses = { ChainAddresses { v3_core_factory_address: address!("9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2"), multicall_address: address!("B206027a9E0E13F05eBEFa5D2402Bab3eA716439"), @@ -269,32 +361,81 @@ pub fn base_goerli_addresses() -> ChainAddresses { swap_router02_address: Some(address!("8357227D4eDc78991Db6FDB9bD6ADE250536dE1d")), v1_mixed_route_quoter_address: None, } -} +}; + +/// Zora addresses +pub const ZORA_ADDRESSES: ChainAddresses = { + ChainAddresses { + v3_core_factory_address: address!("7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb"), + multicall_address: address!("A51c76bEE6746cB487a7e9312E43e2b8f4A37C15"), + quoter_address: address!("11867e1b3348F3ce4FcC170BC5af3d23E07E64Df"), + v3_migrator_address: Some(address!("048352d8dCF13686982C799da63fA6426a9D0b60")), + nonfungible_position_manager_address: Some(address!( + "bC91e8DfA3fF18De43853372A3d7dfe585137D78" + )), + tick_lens_address: Some(address!("209AAda09D74Ad3B8D0E92910Eaf85D2357e3044")), + swap_router02_address: Some(address!("7De04c96BE5159c3b5CeffC82aa176dc81281557")), + v1_mixed_route_quoter_address: None, + } +}; + +/// Zora Sepolia addresses +pub const ZORA_SEPOLIA_ADDRESSES: ChainAddresses = { + ChainAddresses { + v3_core_factory_address: address!("4324A677D74764f46f33ED447964252441aA8Db6"), + multicall_address: address!("A1E7e3A69671C4494EC59Dbd442de930a93F911A"), + quoter_address: address!("C195976fEF0985886E37036E2DF62bF371E12Df0"), + v3_migrator_address: Some(address!("65ef259b31bf1d977c37e9434658694267674897")), + nonfungible_position_manager_address: Some(address!( + "B8458EaAe43292e3c1F7994EFd016bd653d23c20" + )), + tick_lens_address: Some(address!("23C0F71877a1Fc4e20A78018f9831365c85f3064")), + swap_router02_address: None, + v1_mixed_route_quoter_address: None, + } +}; + +/// Rootstock addresses +pub const ROOTSTOCK_ADDRESSES: ChainAddresses = { + ChainAddresses { + v3_core_factory_address: address!("aF37EC98A00FD63689CF3060BF3B6784E00caD82"), + multicall_address: address!("996a9858cDfa45Ad68E47c9A30a7201E29c6a386"), + quoter_address: address!("b51727c996C68E60F598A923a5006853cd2fEB31"), + v3_migrator_address: Some(address!("16678977CA4ec3DAD5efc7b15780295FE5f56162")), + nonfungible_position_manager_address: Some(address!( + "9d9386c042F194B460Ec424a1e57ACDE25f5C4b1" + )), + tick_lens_address: Some(address!("55B9dF5bF68ADe972191a91980459f48ecA16afC")), + swap_router02_address: None, + v1_mixed_route_quoter_address: None, + } +}; lazy_static! { pub static ref CHAIN_TO_ADDRESSES_MAP: ChainMap = { let mut new_map = ChainMap::new(); - new_map.insert(ChainId::BNB as u64, bnb_addresses()); - - new_map.insert(ChainId::AVALANCHE as u64, avalanche_addresses()); - new_map.insert(ChainId::MAINNET as u64, mainnet_address()); - new_map.insert(ChainId::SEPOLIA as u64, sepolia_address()); - new_map.insert(ChainId::GOERLI as u64, goerli_address()); - new_map.insert(ChainId::ARBITRUMONE as u64, arbitum_one_addresses()); - new_map.insert(ChainId::ARBITRUMGOERLI as u64, arbitrum_goerli_addresses()); - new_map.insert(ChainId::CELO as u64, celo_addresses()); - new_map.insert(ChainId::CELOALFAJORES as u64, celo_addresses()); - - new_map.insert(ChainId::POLYGON as u64, polygon_addresses()); - new_map.insert(ChainId::POLYGONMUMBAI as u64, polygon_addresses()); - new_map.insert(ChainId::OPTIMISM as u64, optimism_addresses()); - new_map.insert(ChainId::OPTIMISMGOERLI as u64, optimism_goerli_addresses()); - new_map.insert( - ChainId::OPTIMISMSEPOLIA as u64, - optimism_sepolia_addresses(), - ); - new_map.insert(ChainId::BASEGOERLI as u64, base_goerli_addresses()); - new_map.insert(ChainId::BASE as u64, base_addresses()); + new_map.insert(ChainId::BNB as u64, BNB_ADDRESSES); + + new_map.insert(ChainId::AVALANCHE as u64, AVALANCHE_ADDRESSES); + new_map.insert(ChainId::MAINNET as u64, *MAINNET_ADDRESS); + new_map.insert(ChainId::SEPOLIA as u64, SEPOLIA_ADDRESS); + new_map.insert(ChainId::GOERLI as u64, *GOERLI_ADDRESS); + new_map.insert(ChainId::ARBITRUMONE as u64, *ARBITUM_ONE_ADDRESSES); + new_map.insert(ChainId::ARBITRUMGOERLI as u64, ARBITRUM_GOERLI_ADDRESSES); + new_map.insert(ChainId::ARBITRUMSEPOLIA as u64, ARBITRUM_SEPOLIA_ADDRESSES); + new_map.insert(ChainId::CELO as u64, CELO_ADDRESSES); + new_map.insert(ChainId::CELOALFAJORES as u64, CELO_ADDRESSES); + + new_map.insert(ChainId::POLYGON as u64, *POLYGON_ADDRESSES); + new_map.insert(ChainId::POLYGONMUMBAI as u64, *POLYGON_ADDRESSES); + new_map.insert(ChainId::OPTIMISM as u64, *OPTIMISM_ADDRESSES); + new_map.insert(ChainId::OPTIMISMGOERLI as u64, OPTIMISM_GOERLI_ADDRESSES); + new_map.insert(ChainId::OPTIMISMSEPOLIA as u64, OPTIMISM_SEPOLIA_ADDRESSES); + new_map.insert(ChainId::BASEGOERLI as u64, BASE_GOERLI_ADDRESSES); + new_map.insert(ChainId::BASE as u64, BASE_ADDRESSES); + new_map.insert(ChainId::ZORA as u64, ZORA_ADDRESSES); + new_map.insert(ChainId::ZORASEPOLIA as u64, ZORA_SEPOLIA_ADDRESSES); + new_map.insert(ChainId::ROOTSTOCK as u64, ROOTSTOCK_ADDRESSES); new_map }; } @@ -486,7 +627,13 @@ pub fn v1_mixed_route_quoter_address() -> ChainAddress { } pub fn swap_router02_address(chain_id: u64) -> Address { - if chain_id == ChainId::BNB as u64 { + if CHAIN_TO_ADDRESSES_MAP.contains_key(&chain_id) + && CHAIN_TO_ADDRESSES_MAP + .get(&chain_id) + .unwrap() + .swap_router02_address + .is_some() + { CHAIN_TO_ADDRESSES_MAP .get(&chain_id) .unwrap() @@ -496,3 +643,71 @@ pub fn swap_router02_address(chain_id: u64) -> Address { address!("68b3465833fb72A70ecDF485E0e4C7bD8665Fc45") } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_swap_router_02_addresses_base() { + let address = swap_router02_address(ChainId::BASE as u64); + assert_eq!( + address, + address!("2626664c2603336E57B271c5C0b26F421741e481") + ); + } + + #[test] + fn test_swap_router_02_addresses_base_goerli() { + let address = swap_router02_address(ChainId::BASEGOERLI as u64); + assert_eq!( + address, + address!("8357227D4eDc78991Db6FDB9bD6ADE250536dE1d") + ); + } + + #[test] + fn test_swap_router_02_addresses_avalanche() { + let address = swap_router02_address(ChainId::AVALANCHE as u64); + assert_eq!( + address, + address!("bb00FF08d01D300023C629E8fFfFcb65A5a578cE") + ); + } + + #[test] + fn test_swap_router_02_addresses_bnb() { + let address = swap_router02_address(ChainId::BNB as u64); + assert_eq!( + address, + address!("B971eF87ede563556b2ED4b1C0b0019111Dd85d2") + ); + } + + #[test] + fn test_swap_router_02_addresses_arbritum_goerli() { + let address = swap_router02_address(ChainId::ARBITRUMGOERLI as u64); + assert_eq!( + address, + address!("68b3465833fb72A70ecDF485E0e4C7bD8665Fc45") + ); + } + + #[test] + fn test_swap_router_02_addresses_optimism_sepolia() { + let address = swap_router02_address(ChainId::OPTIMISMSEPOLIA as u64); + assert_eq!( + address, + address!("94cC0AaC535CCDB3C01d6787D6413C739ae12bc4") + ); + } + + #[test] + fn test_swap_router_02_addresses_sepolia() { + let address = swap_router02_address(ChainId::SEPOLIA as u64); + assert_eq!( + address, + address!("3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E") + ); + } +} diff --git a/src/chains.rs b/src/chains.rs index 1f18b14..822d868 100644 --- a/src/chains.rs +++ b/src/chains.rs @@ -8,6 +8,7 @@ pub enum ChainId { OPTIMISMSEPOLIA = 11155420, ARBITRUMONE = 42161, ARBITRUMGOERLI = 421613, + ARBITRUMSEPOLIA = 421614, POLYGON = 137, POLYGONMUMBAI = 80001, CELO = 42220, @@ -18,15 +19,19 @@ pub enum ChainId { AVALANCHE = 43114, BASEGOERLI = 84531, BASE = 8453, + ZORA = 7777777, + ZORASEPOLIA = 999999999, + ROOTSTOCK = 30 } -pub const SUPPORTED_CHAINS: [ChainId; 16] = [ +pub const SUPPORTED_CHAINS: [ChainId; 20] = [ ChainId::MAINNET, ChainId::OPTIMISM, ChainId::OPTIMISMGOERLI, ChainId::OPTIMISMSEPOLIA, ChainId::ARBITRUMONE, ChainId::ARBITRUMGOERLI, + ChainId::ARBITRUMSEPOLIA, ChainId::POLYGON, ChainId::POLYGONMUMBAI, ChainId::GOERLI, @@ -37,6 +42,9 @@ pub const SUPPORTED_CHAINS: [ChainId; 16] = [ ChainId::AVALANCHE, ChainId::BASE, ChainId::BASEGOERLI, + ChainId::ZORA, + ChainId::ZORASEPOLIA, + ChainId::ROOTSTOCK ]; pub enum NativeCurrencyName { @@ -47,4 +55,5 @@ pub enum NativeCurrencyName { MOONBEAM, BNB, AVAX, + ROOTSTOCK, } diff --git a/src/entities/base_currency.rs b/src/entities/base_currency.rs index be8e20a..4a43e65 100644 --- a/src/entities/base_currency.rs +++ b/src/entities/base_currency.rs @@ -45,10 +45,7 @@ impl BaseCurrency for CurrencyLike { } } -<<<<<<< HEAD -======= /// Implement [`Deref`] to allow direct access to the metadata of the currency ->>>>>>> 2891f4e4fc69685514fcf70a9bf090dca1dfbb22 impl Deref for CurrencyLike { type Target = M; From cb5bd69ccb56b51ac726c74fec42c2cfd7b1e135 Mon Sep 17 00:00:00 2001 From: malik672 Date: Tue, 5 Mar 2024 03:17:24 +0100 Subject: [PATCH 08/17] added upstream equivalence --- src/chains.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chains.rs b/src/chains.rs index 822d868..2d177df 100644 --- a/src/chains.rs +++ b/src/chains.rs @@ -21,7 +21,7 @@ pub enum ChainId { BASE = 8453, ZORA = 7777777, ZORASEPOLIA = 999999999, - ROOTSTOCK = 30 + ROOTSTOCK = 30, } pub const SUPPORTED_CHAINS: [ChainId; 20] = [ @@ -44,7 +44,7 @@ pub const SUPPORTED_CHAINS: [ChainId; 20] = [ ChainId::BASEGOERLI, ChainId::ZORA, ChainId::ZORASEPOLIA, - ChainId::ROOTSTOCK + ChainId::ROOTSTOCK, ]; pub enum NativeCurrencyName { From 556e9e0b7c59ff992ecd3fb4ac5de6c7722ea5c1 Mon Sep 17 00:00:00 2001 From: malik672 Date: Tue, 5 Mar 2024 03:27:59 +0100 Subject: [PATCH 09/17] added upstream equivalence --- src/addresses.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/addresses.rs b/src/addresses.rs index bded702..2e508e9 100644 --- a/src/addresses.rs +++ b/src/addresses.rs @@ -1,5 +1,4 @@ use crate::prelude::*; -use std::collections::HashMap; type AddressMap = HashMap; type ChainMap = HashMap; From 5d80739494647da69f30fdb755cd43eff8a74718 Mon Sep 17 00:00:00 2001 From: malik672 Date: Tue, 5 Mar 2024 03:31:19 +0100 Subject: [PATCH 10/17] add new version and removee cargo lock --- Cargo.toml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 954024e..cba92eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uniswap-sdk-core" -version = "0.18.0" +version = "0.19.0" edition = "2021" authors = ["malik ", "Shuhui Luo "] description = "The Uniswap SDK Core in Rust provides essential functionality for interacting with the Uniswap decentralized exchange" diff --git a/README.md b/README.md index a3897e5..42df924 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Add this to your Cargo.toml ``` [dependencies] -uniswap-sdk-core = "0.17.0"; +uniswap-sdk-core = "0.19.0"; ``` And this to your code: From 9ce0d2849f4f2651036dca11d13df864fa1fd54e Mon Sep 17 00:00:00 2001 From: malik672 Date: Tue, 5 Mar 2024 08:13:13 +0100 Subject: [PATCH 11/17] fix issues --- src/addresses.rs | 634 +++++++++++++++++++++++------------------------ 1 file changed, 312 insertions(+), 322 deletions(-) diff --git a/src/addresses.rs b/src/addresses.rs index 2e508e9..f2f25b5 100644 --- a/src/addresses.rs +++ b/src/addresses.rs @@ -59,17 +59,11 @@ pub const V2_FACTORY_ADDRESS: Address = address!("5C69bEe701ef814a2B6a3EDD4B1652 lazy_static! { pub static ref V2_FACTORY_ADDRESSES: HashMap = { let mut m = HashMap::new(); - m.insert( - ChainId::MAINNET as u64, - address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"), - ); - m.insert( - ChainId::GOERLI as u64, - address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"), - ); + m.insert(ChainId::MAINNET as u64, V2_FACTORY_ADDRESS); + m.insert(ChainId::GOERLI as u64, V2_FACTORY_ADDRESS); m.insert( ChainId::SEPOLIA as u64, - address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"), + address!("B7f907f7A9eBC822a80BD25E224be42Ce0A698A0"), ); m.insert( ChainId::OPTIMISM as u64, @@ -108,14 +102,8 @@ pub const V2_ROUTER_ADDRESS: Address = address!("7a250d5630B4cF539739dF2C5dAcb4c lazy_static! { pub static ref V2_ROUTER_ADDRESSES: HashMap = { let mut m = HashMap::new(); - m.insert( - ChainId::MAINNET as u64, - address!("7a250d5630B4cF539739dF2C5dAcb4c659F2488D"), - ); - m.insert( - ChainId::GOERLI as u64, - address!("7a250d5630B4cF539739dF2C5dAcb4c659F2488D"), - ); + m.insert(ChainId::MAINNET as u64, V2_ROUTER_ADDRESS); + m.insert(ChainId::GOERLI as u64, V2_ROUTER_ADDRESS); m.insert( ChainId::ARBITRUMONE as u64, address!("4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), @@ -164,7 +152,7 @@ impl Default for ChainAddresses { } lazy_static! { - pub static ref MAINNET_ADDRESS: ChainAddresses = { + pub static ref MAINNET_ADDRESSES: ChainAddresses = { ChainAddresses { v1_mixed_route_quoter_address: Some(address!( "84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E" @@ -175,7 +163,7 @@ lazy_static! { } lazy_static! { - pub static ref GOERLI_ADDRESS: ChainAddresses = { + pub static ref GOERLI_ADDRESSES: ChainAddresses = { ChainAddresses { v1_mixed_route_quoter_address: Some(address!( "Ba60b6e6fF25488308789E6e0A65D838be34194e" @@ -203,211 +191,185 @@ lazy_static! { } /// celo v3 addresses -pub const CELO_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("AfE208a311B21f13EF87E33A90049fC17A7acDEc"), - multicall_address: address!("633987602DE5C4F337e3DbF265303A1080324204"), - quoter_address: address!("82825d0554fA07f7FC52Ab63c961F330fdEFa8E8"), - v3_migrator_address: Some(address!("3cFd4d48EDfDCC53D3f173F596f621064614C582")), - nonfungible_position_manager_address: Some(address!( - "3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A" - )), - tick_lens_address: Some(address!("5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D")), - swap_router02_address: None, - v1_mixed_route_quoter_address: None, - } +pub const CELO_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("AfE208a311B21f13EF87E33A90049fC17A7acDEc"), + multicall_address: address!("633987602DE5C4F337e3DbF265303A1080324204"), + quoter_address: address!("82825d0554fA07f7FC52Ab63c961F330fdEFa8E8"), + v3_migrator_address: Some(address!("3cFd4d48EDfDCC53D3f173F596f621064614C582")), + nonfungible_position_manager_address: Some(address!( + "3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A" + )), + tick_lens_address: Some(address!("5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D")), + swap_router02_address: None, + v1_mixed_route_quoter_address: None, }; /// BNB v3 addresses -pub const BNB_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("dB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7"), - multicall_address: address!("963Df249eD09c358A4819E39d9Cd5736c3087184"), - quoter_address: address!("78D78E420Da98ad378D7799bE8f4AF69033EB077"), - v3_migrator_address: Some(address!("32681814957e0C13117ddc0c2aba232b5c9e760f")), - nonfungible_position_manager_address: Some(address!( - "7b8A01B39D58278b5DE7e48c8449c9f4F5170613" - )), - tick_lens_address: Some(address!("D9270014D396281579760619CCf4c3af0501A47C")), - swap_router02_address: Some(address!("B971eF87ede563556b2ED4b1C0b0019111Dd85d2")), - v1_mixed_route_quoter_address: None, - } +pub const BNB_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("dB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7"), + multicall_address: address!("963Df249eD09c358A4819E39d9Cd5736c3087184"), + quoter_address: address!("78D78E420Da98ad378D7799bE8f4AF69033EB077"), + v3_migrator_address: Some(address!("32681814957e0C13117ddc0c2aba232b5c9e760f")), + nonfungible_position_manager_address: Some(address!( + "7b8A01B39D58278b5DE7e48c8449c9f4F5170613" + )), + tick_lens_address: Some(address!("D9270014D396281579760619CCf4c3af0501A47C")), + swap_router02_address: Some(address!("B971eF87ede563556b2ED4b1C0b0019111Dd85d2")), + v1_mixed_route_quoter_address: None, }; /// Optimism Goerli addresses -pub const OPTIMISM_GOERLI_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("B656dA17129e7EB733A557f4EBc57B76CFbB5d10"), - multicall_address: address!("07F2D8a2a02251B62af965f22fC4744A5f96BCCd"), - quoter_address: address!("9569CbA925c8ca2248772A9A4976A516743A246F"), - v3_migrator_address: Some(address!("f6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8")), - nonfungible_position_manager_address: Some(address!( - "39Ca85Af2F383190cBf7d7c41ED9202D27426EF6" - )), - tick_lens_address: Some(address!("e6140Bd164b63E8BfCfc40D5dF952f83e171758e")), - swap_router02_address: None, - v1_mixed_route_quoter_address: None, - } +pub const OPTIMISM_GOERLI_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("B656dA17129e7EB733A557f4EBc57B76CFbB5d10"), + multicall_address: address!("07F2D8a2a02251B62af965f22fC4744A5f96BCCd"), + quoter_address: address!("9569CbA925c8ca2248772A9A4976A516743A246F"), + v3_migrator_address: Some(address!("f6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8")), + nonfungible_position_manager_address: Some(address!( + "39Ca85Af2F383190cBf7d7c41ED9202D27426EF6" + )), + tick_lens_address: Some(address!("e6140Bd164b63E8BfCfc40D5dF952f83e171758e")), + swap_router02_address: None, + v1_mixed_route_quoter_address: None, }; /// Optimism Sepolia addresses -pub const OPTIMISM_SEPOLIA_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("8CE191193D15ea94e11d327b4c7ad8bbE520f6aF"), - multicall_address: address!("80e4e06841bb76AA9735E0448cB8d003C0EF009a"), - quoter_address: address!("0FBEa6cf957d95ee9313490050F6A0DA68039404"), - v3_migrator_address: Some(address!("E7EcbAAaA54D007A00dbb6c1d2f150066D69dA07")), - nonfungible_position_manager_address: Some(address!( - "dA75cEf1C93078e8b736FCA5D5a30adb97C8957d" - )), - tick_lens_address: Some(address!("Cb7f54747F58F8944973cea5b8f4ac2209BadDC5")), - swap_router02_address: Some(address!("94cC0AaC535CCDB3C01d6787D6413C739ae12bc4")), - v1_mixed_route_quoter_address: None, - } +pub const OPTIMISM_SEPOLIA_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("8CE191193D15ea94e11d327b4c7ad8bbE520f6aF"), + multicall_address: address!("80e4e06841bb76AA9735E0448cB8d003C0EF009a"), + quoter_address: address!("0FBEa6cf957d95ee9313490050F6A0DA68039404"), + v3_migrator_address: Some(address!("E7EcbAAaA54D007A00dbb6c1d2f150066D69dA07")), + nonfungible_position_manager_address: Some(address!( + "dA75cEf1C93078e8b736FCA5D5a30adb97C8957d" + )), + tick_lens_address: Some(address!("Cb7f54747F58F8944973cea5b8f4ac2209BadDC5")), + swap_router02_address: Some(address!("94cC0AaC535CCDB3C01d6787D6413C739ae12bc4")), + v1_mixed_route_quoter_address: None, }; /// Arbitrum Goerli v3 addresses -pub const ARBITRUM_GOERLI_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("4893376342d5D7b3e31d4184c08b265e5aB2A3f6"), - multicall_address: address!("8260CB40247290317a4c062F3542622367F206Ee"), - quoter_address: address!("1dd92b83591781D0C6d98d07391eea4b9a6008FA"), - v3_migrator_address: Some(address!("A815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3")), - nonfungible_position_manager_address: Some(address!( - "622e4726a167799826d1E1D150b076A7725f5D81" - )), - tick_lens_address: Some(address!("b52429333da969a0C79a60930a4Bf0020E5D1DE8")), - swap_router02_address: None, - v1_mixed_route_quoter_address: None, - } +pub const ARBITRUM_GOERLI_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("4893376342d5D7b3e31d4184c08b265e5aB2A3f6"), + multicall_address: address!("8260CB40247290317a4c062F3542622367F206Ee"), + quoter_address: address!("1dd92b83591781D0C6d98d07391eea4b9a6008FA"), + v3_migrator_address: Some(address!("A815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3")), + nonfungible_position_manager_address: Some(address!( + "622e4726a167799826d1E1D150b076A7725f5D81" + )), + tick_lens_address: Some(address!("b52429333da969a0C79a60930a4Bf0020E5D1DE8")), + swap_router02_address: None, + v1_mixed_route_quoter_address: None, }; /// Arbitrum sepolia v3 addresses -pub const ARBITRUM_SEPOLIA_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e"), - multicall_address: address!("2B718b475e385eD29F56775a66aAB1F5cC6B2A0A"), - quoter_address: address!("2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B"), - v3_migrator_address: Some(address!("398f43ef2c67B941147157DA1c5a868E906E043D")), - nonfungible_position_manager_address: Some(address!( - "6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65" - )), - tick_lens_address: Some(address!("b52429333da969a0C79a60930a4Bf0020E5D1DE8")), - swap_router02_address: Some(address!("101F443B4d1b059569D643917553c771E1b9663E")), - v1_mixed_route_quoter_address: None, - } +pub const ARBITRUM_SEPOLIA_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e"), + multicall_address: address!("2B718b475e385eD29F56775a66aAB1F5cC6B2A0A"), + quoter_address: address!("2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B"), + v3_migrator_address: Some(address!("398f43ef2c67B941147157DA1c5a868E906E043D")), + nonfungible_position_manager_address: Some(address!( + "6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65" + )), + tick_lens_address: Some(address!("b52429333da969a0C79a60930a4Bf0020E5D1DE8")), + swap_router02_address: Some(address!("101F443B4d1b059569D643917553c771E1b9663E")), + v1_mixed_route_quoter_address: None, }; /// sepolia v3 addresses -pub const SEPOLIA_ADDRESS: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("0227628f3F023bb0B980b67D528571c95c6DaC1c"), - multicall_address: address!("D7F33bCdb21b359c8ee6F0251d30E94832baAd07"), - quoter_address: address!("Ed1f6473345F45b75F8179591dd5bA1888cf2FB3"), - v3_migrator_address: Some(address!("729004182cF005CEC8Bd85df140094b6aCbe8b15")), - nonfungible_position_manager_address: Some(address!( - "1238536071E1c677A632429e3655c799b22cDA52" - )), - tick_lens_address: Some(address!("d7f33bcdb21b359c8ee6f0251d30e94832baad07")), - swap_router02_address: Some(address!("3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E")), - v1_mixed_route_quoter_address: None, - } +pub const SEPOLIA_ADDRESS: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("0227628f3F023bb0B980b67D528571c95c6DaC1c"), + multicall_address: address!("D7F33bCdb21b359c8ee6F0251d30E94832baAd07"), + quoter_address: address!("Ed1f6473345F45b75F8179591dd5bA1888cf2FB3"), + v3_migrator_address: Some(address!("729004182cF005CEC8Bd85df140094b6aCbe8b15")), + nonfungible_position_manager_address: Some(address!( + "1238536071E1c677A632429e3655c799b22cDA52" + )), + tick_lens_address: Some(address!("d7f33bcdb21b359c8ee6f0251d30e94832baad07")), + swap_router02_address: Some(address!("3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E")), + v1_mixed_route_quoter_address: None, }; /// Avalanche v3 addresses -pub const AVALANCHE_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("740b1c1de25031C31FF4fC9A62f554A55cdC1baD"), - multicall_address: address!("0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2"), - quoter_address: address!("be0F5544EC67e9B3b2D979aaA43f18Fd87E6257F"), - v3_migrator_address: Some(address!("44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97")), - nonfungible_position_manager_address: Some(address!( - "655C406EBFa14EE2006250925e54ec43AD184f8B" - )), - tick_lens_address: Some(address!("EB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950")), - swap_router02_address: Some(address!("bb00FF08d01D300023C629E8fFfFcb65A5a578cE")), - v1_mixed_route_quoter_address: None, - } +pub const AVALANCHE_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("740b1c1de25031C31FF4fC9A62f554A55cdC1baD"), + multicall_address: address!("0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2"), + quoter_address: address!("be0F5544EC67e9B3b2D979aaA43f18Fd87E6257F"), + v3_migrator_address: Some(address!("44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97")), + nonfungible_position_manager_address: Some(address!( + "655C406EBFa14EE2006250925e54ec43AD184f8B" + )), + tick_lens_address: Some(address!("EB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950")), + swap_router02_address: Some(address!("bb00FF08d01D300023C629E8fFfFcb65A5a578cE")), + v1_mixed_route_quoter_address: None, }; /// Base v3 addresses -pub const BASE_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("33128a8fC17869897dcE68Ed026d694621f6FDfD"), - multicall_address: address!("091e99cb1C49331a94dD62755D168E941AbD0693"), - quoter_address: address!("3d4e44Eb1374240CE5F1B871ab261CD16335B76a"), - v3_migrator_address: Some(address!("23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7")), - nonfungible_position_manager_address: Some(address!( - "03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1" - )), - tick_lens_address: Some(address!("0CdeE061c75D43c82520eD998C23ac2991c9ac6d")), - swap_router02_address: Some(address!("2626664c2603336E57B271c5C0b26F421741e481")), - v1_mixed_route_quoter_address: None, - } +pub const BASE_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("33128a8fC17869897dcE68Ed026d694621f6FDfD"), + multicall_address: address!("091e99cb1C49331a94dD62755D168E941AbD0693"), + quoter_address: address!("3d4e44Eb1374240CE5F1B871ab261CD16335B76a"), + v3_migrator_address: Some(address!("23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7")), + nonfungible_position_manager_address: Some(address!( + "03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1" + )), + tick_lens_address: Some(address!("0CdeE061c75D43c82520eD998C23ac2991c9ac6d")), + swap_router02_address: Some(address!("2626664c2603336E57B271c5C0b26F421741e481")), + v1_mixed_route_quoter_address: None, }; /// Base Goerli v3 addresses -pub const BASE_GOERLI_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2"), - multicall_address: address!("B206027a9E0E13F05eBEFa5D2402Bab3eA716439"), - quoter_address: address!("edf539058e28E5937dAef3f69cEd0b25fbE66Ae9"), - v3_migrator_address: Some(address!("3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE")), - nonfungible_position_manager_address: Some(address!( - "3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30" - )), - tick_lens_address: Some(address!("1acB873Ee909D0c98adB18e4474943249F931b92")), - swap_router02_address: Some(address!("8357227D4eDc78991Db6FDB9bD6ADE250536dE1d")), - v1_mixed_route_quoter_address: None, - } +pub const BASE_GOERLI_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2"), + multicall_address: address!("B206027a9E0E13F05eBEFa5D2402Bab3eA716439"), + quoter_address: address!("edf539058e28E5937dAef3f69cEd0b25fbE66Ae9"), + v3_migrator_address: Some(address!("3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE")), + nonfungible_position_manager_address: Some(address!( + "3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30" + )), + tick_lens_address: Some(address!("1acB873Ee909D0c98adB18e4474943249F931b92")), + swap_router02_address: Some(address!("8357227D4eDc78991Db6FDB9bD6ADE250536dE1d")), + v1_mixed_route_quoter_address: None, }; /// Zora addresses -pub const ZORA_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb"), - multicall_address: address!("A51c76bEE6746cB487a7e9312E43e2b8f4A37C15"), - quoter_address: address!("11867e1b3348F3ce4FcC170BC5af3d23E07E64Df"), - v3_migrator_address: Some(address!("048352d8dCF13686982C799da63fA6426a9D0b60")), - nonfungible_position_manager_address: Some(address!( - "bC91e8DfA3fF18De43853372A3d7dfe585137D78" - )), - tick_lens_address: Some(address!("209AAda09D74Ad3B8D0E92910Eaf85D2357e3044")), - swap_router02_address: Some(address!("7De04c96BE5159c3b5CeffC82aa176dc81281557")), - v1_mixed_route_quoter_address: None, - } +pub const ZORA_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb"), + multicall_address: address!("A51c76bEE6746cB487a7e9312E43e2b8f4A37C15"), + quoter_address: address!("11867e1b3348F3ce4FcC170BC5af3d23E07E64Df"), + v3_migrator_address: Some(address!("048352d8dCF13686982C799da63fA6426a9D0b60")), + nonfungible_position_manager_address: Some(address!( + "bC91e8DfA3fF18De43853372A3d7dfe585137D78" + )), + tick_lens_address: Some(address!("209AAda09D74Ad3B8D0E92910Eaf85D2357e3044")), + swap_router02_address: Some(address!("7De04c96BE5159c3b5CeffC82aa176dc81281557")), + v1_mixed_route_quoter_address: None, }; /// Zora Sepolia addresses -pub const ZORA_SEPOLIA_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("4324A677D74764f46f33ED447964252441aA8Db6"), - multicall_address: address!("A1E7e3A69671C4494EC59Dbd442de930a93F911A"), - quoter_address: address!("C195976fEF0985886E37036E2DF62bF371E12Df0"), - v3_migrator_address: Some(address!("65ef259b31bf1d977c37e9434658694267674897")), - nonfungible_position_manager_address: Some(address!( - "B8458EaAe43292e3c1F7994EFd016bd653d23c20" - )), - tick_lens_address: Some(address!("23C0F71877a1Fc4e20A78018f9831365c85f3064")), - swap_router02_address: None, - v1_mixed_route_quoter_address: None, - } +pub const ZORA_SEPOLIA_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("4324A677D74764f46f33ED447964252441aA8Db6"), + multicall_address: address!("A1E7e3A69671C4494EC59Dbd442de930a93F911A"), + quoter_address: address!("C195976fEF0985886E37036E2DF62bF371E12Df0"), + v3_migrator_address: Some(address!("65ef259b31bf1d977c37e9434658694267674897")), + nonfungible_position_manager_address: Some(address!( + "B8458EaAe43292e3c1F7994EFd016bd653d23c20" + )), + tick_lens_address: Some(address!("23C0F71877a1Fc4e20A78018f9831365c85f3064")), + swap_router02_address: None, + v1_mixed_route_quoter_address: None, }; /// Rootstock addresses -pub const ROOTSTOCK_ADDRESSES: ChainAddresses = { - ChainAddresses { - v3_core_factory_address: address!("aF37EC98A00FD63689CF3060BF3B6784E00caD82"), - multicall_address: address!("996a9858cDfa45Ad68E47c9A30a7201E29c6a386"), - quoter_address: address!("b51727c996C68E60F598A923a5006853cd2fEB31"), - v3_migrator_address: Some(address!("16678977CA4ec3DAD5efc7b15780295FE5f56162")), - nonfungible_position_manager_address: Some(address!( - "9d9386c042F194B460Ec424a1e57ACDE25f5C4b1" - )), - tick_lens_address: Some(address!("55B9dF5bF68ADe972191a91980459f48ecA16afC")), - swap_router02_address: None, - v1_mixed_route_quoter_address: None, - } +pub const ROOTSTOCK_ADDRESSES: ChainAddresses = ChainAddresses { + v3_core_factory_address: address!("aF37EC98A00FD63689CF3060BF3B6784E00caD82"), + multicall_address: address!("996a9858cDfa45Ad68E47c9A30a7201E29c6a386"), + quoter_address: address!("b51727c996C68E60F598A923a5006853cd2fEB31"), + v3_migrator_address: Some(address!("16678977CA4ec3DAD5efc7b15780295FE5f56162")), + nonfungible_position_manager_address: Some(address!( + "9d9386c042F194B460Ec424a1e57ACDE25f5C4b1" + )), + tick_lens_address: Some(address!("55B9dF5bF68ADe972191a91980459f48ecA16afC")), + swap_router02_address: Some(address!("0B14ff67f0014046b4b99057Aec4509640b3947A")), + v1_mixed_route_quoter_address: None, }; lazy_static! { @@ -416,9 +378,9 @@ lazy_static! { new_map.insert(ChainId::BNB as u64, BNB_ADDRESSES); new_map.insert(ChainId::AVALANCHE as u64, AVALANCHE_ADDRESSES); - new_map.insert(ChainId::MAINNET as u64, *MAINNET_ADDRESS); + new_map.insert(ChainId::MAINNET as u64, *MAINNET_ADDRESSES); new_map.insert(ChainId::SEPOLIA as u64, SEPOLIA_ADDRESS); - new_map.insert(ChainId::GOERLI as u64, *GOERLI_ADDRESS); + new_map.insert(ChainId::GOERLI as u64, *GOERLI_ADDRESSES); new_map.insert(ChainId::ARBITRUMONE as u64, *ARBITUM_ONE_ADDRESSES); new_map.insert(ChainId::ARBITRUMGOERLI as u64, ARBITRUM_GOERLI_ADDRESSES); new_map.insert(ChainId::ARBITRUMSEPOLIA as u64, ARBITRUM_SEPOLIA_ADDRESSES); @@ -439,190 +401,218 @@ lazy_static! { }; } -/// V3 Contract Addresses -pub fn v3_factory_addresses() -> ChainAddress { - let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { - chain_add.insert( - memo as u64, - CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) - .unwrap() - .v3_core_factory_address, - ); - } - chain_add +lazy_static! { + /// V3 Contract Addresses + pub static ref V3_CORE_FACTORY_ADDRESSES: ChainAddress = { + let mut chain_add = ChainAddress::new(); + for memo in SUPPORTED_CHAINS { + chain_add.insert( + memo as u64, + CHAIN_TO_ADDRESSES_MAP + .get(&(memo as u64)) + .unwrap() + .v3_core_factory_address, + ); + } + chain_add + }; } -/// V3 Contract Addresses -pub fn v3_migrator_addresses() -> ChainAddress { - let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { - chain_add.insert( - memo as u64, - CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) - .unwrap() - .v3_migrator_address - .unwrap(), - ); - } - chain_add +lazy_static! { + /// V3 Contract Addresses + pub static ref V3_MIGRATOR_ADDRESSES: ChainAddress = { + let mut chain_add = ChainAddress::new(); + for memo in SUPPORTED_CHAINS { + chain_add.insert( + memo as u64, + CHAIN_TO_ADDRESSES_MAP + .get(&(memo as u64)) + .unwrap() + .v3_migrator_address + .unwrap(), + ); + } + chain_add + }; } -/// V3 Contract Addresses -pub fn multicall_addresses() -> ChainAddress { - let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { - chain_add.insert( - memo as u64, - CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) - .unwrap() - .multicall_address, - ); - } - chain_add +lazy_static! { + /// V3 Contract Addresses + pub static ref MULTICALL_ADDRESSES: ChainAddress = { + let mut chain_add = ChainAddress::new(); + for memo in SUPPORTED_CHAINS { + chain_add.insert( + memo as u64, + CHAIN_TO_ADDRESSES_MAP + .get(&(memo as u64)) + .unwrap() + .multicall_address, + ); + } + chain_add + }; } +lazy_static! { /// The oldest V0 governance address -pub fn governance_alpha_v0_addresses() -> AddressMap { +pub static ref GOVERNANCE_ALPHA_V0_ADDRESSES: AddressMap = { construct_same_address_map(address!("5e4be8Bc9637f0EAA1A755019e06A68ce081D58F"), &[]) +}; } +lazy_static! { /// The older V1 governance address -pub fn governance_alpha_v1_addresses() -> AddressMap { +pub static ref GOVERNANCE_ALPHA_V1_ADDRESSES: AddressMap = { let mut new_map = AddressMap::new(); new_map.insert( ChainId::MAINNET as u64, address!("C4e172459f1E7939D522503B81AFAaC1014CE6F6"), ); new_map +}; } +lazy_static! { /// The latest governor bravo that is currently admin of timelock -pub fn governance_bravo_addresses() -> AddressMap { +pub static ref GOVERNANCE_BRAVO_ADDRESSES: AddressMap = { let mut new_map = AddressMap::new(); new_map.insert( ChainId::MAINNET as u64, address!("408ED6354d4973f66138C91495F2f2FCbd8724C3"), ); new_map +}; } -pub fn timelock_addresses() -> AddressMap { - construct_same_address_map(address!("1a9C8182C09F50C8318d769245beA52c32BE35BC"), &[]) -} - -pub fn merkle_distributor_address() -> AddressMap { - let mut new_map = AddressMap::new(); - new_map.insert( - ChainId::MAINNET as u64, - address!("090D4613473dEE047c3f2706764f49E0821D256e"), - ); - new_map +lazy_static! { + pub static ref TIMELOCK_ADDRESSES: AddressMap = + construct_same_address_map(address!("1a9C8182C09F50C8318d769245beA52c32BE35BC"), &[]); } -pub fn argent_wallet_detector_address() -> AddressMap { - let mut new_map = AddressMap::new(); - new_map.insert( - ChainId::MAINNET as u64, - address!("eca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8"), - ); - new_map +lazy_static! { + pub static ref MERKLE_DISTRIBUTOR_ADDRESS: AddressMap = { + let mut new_map = AddressMap::new(); + new_map.insert( + ChainId::MAINNET as u64, + address!("090D4613473dEE047c3f2706764f49E0821D256e"), + ); + new_map + }; } -pub fn quoter_address() -> ChainAddress { - let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { - chain_add.insert( - memo as u64, - CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) - .unwrap() - .quoter_address, +lazy_static! { + pub static ref ARGENT_WALLET_DETECTOR_ADDRESS: AddressMap = { + let mut new_map = AddressMap::new(); + new_map.insert( + ChainId::MAINNET as u64, + address!("eca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8"), ); - } - chain_add + new_map + }; } -pub fn nonfungible_position_manager_address() -> ChainAddress { - let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { - if CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) - .unwrap() - .nonfungible_position_manager_address - .is_some() - { +lazy_static! { + pub static ref QUOTER_ADDRESS: ChainAddress = { + let mut chain_add = ChainAddress::new(); + for memo in SUPPORTED_CHAINS { chain_add.insert( memo as u64, CHAIN_TO_ADDRESSES_MAP .get(&(memo as u64)) .unwrap() - .nonfungible_position_manager_address - .unwrap(), + .quoter_address, ); } - } - chain_add + chain_add + }; } -pub fn ens_resgister_address_map() -> AddressMap { - construct_same_address_map(address!("00000000000C2E074eC69A0dFb2997BA6C7d2e1e"), &[]) +lazy_static! { + pub static ref NONFUNGIBLE_POSITION_MANAGER_ADDRESS: ChainAddress = { + let mut chain_add = ChainAddress::new(); + for memo in SUPPORTED_CHAINS { + if CHAIN_TO_ADDRESSES_MAP + .get(&(memo as u64)) + .unwrap() + .nonfungible_position_manager_address + .is_some() + { + chain_add.insert( + memo as u64, + CHAIN_TO_ADDRESSES_MAP + .get(&(memo as u64)) + .unwrap() + .nonfungible_position_manager_address + .unwrap(), + ); + } + } + chain_add + }; } -pub fn socks_controller_addresses() -> AddressMap { - let mut new_map = AddressMap::new(); - new_map.insert( - ChainId::MAINNET as u64, - address!("65770b5283117639760beA3F867b69b3697a91dd"), - ); - new_map +lazy_static! { + pub static ref ENS_RESGISTER_ADDRESS_MAP: AddressMap = + construct_same_address_map(address!("00000000000C2E074eC69A0dFb2997BA6C7d2e1e"), &[]); } -pub fn tick_lens_addresses() -> ChainAddress { - let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { - if CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) - .unwrap() - .tick_lens_address - .is_some() - { - chain_add.insert( - memo as u64, - CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) - .unwrap() - .tick_lens_address - .unwrap(), - ); +lazy_static! { + pub static ref SOCKS_CONTROLLER_ADDRESSES: AddressMap = { + let mut new_map = AddressMap::new(); + new_map.insert( + ChainId::MAINNET as u64, + address!("65770b5283117639760beA3F867b69b3697a91dd"), + ); + new_map + }; +} + +lazy_static! { + pub static ref TICK_LENS_ADDRESSES: ChainAddress = { + let mut chain_add = ChainAddress::new(); + for memo in SUPPORTED_CHAINS { + if CHAIN_TO_ADDRESSES_MAP + .get(&(memo as u64)) + .unwrap() + .tick_lens_address + .is_some() + { + chain_add.insert( + memo as u64, + CHAIN_TO_ADDRESSES_MAP + .get(&(memo as u64)) + .unwrap() + .tick_lens_address + .unwrap(), + ); + } } - } - chain_add + chain_add + }; } -pub fn v1_mixed_route_quoter_address() -> ChainAddress { - let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { - if CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) - .unwrap() - .v1_mixed_route_quoter_address - .is_some() - { - chain_add.insert( - memo as u64, - CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) - .unwrap() - .v1_mixed_route_quoter_address - .unwrap(), - ); +lazy_static! { + pub static ref V1_MIXED_ROUTE_QUOTER_ADDRESS: ChainAddress = { + let mut chain_add = ChainAddress::new(); + for memo in SUPPORTED_CHAINS { + if CHAIN_TO_ADDRESSES_MAP + .get(&(memo as u64)) + .unwrap() + .v1_mixed_route_quoter_address + .is_some() + { + chain_add.insert( + memo as u64, + CHAIN_TO_ADDRESSES_MAP + .get(&(memo as u64)) + .unwrap() + .v1_mixed_route_quoter_address + .unwrap(), + ); + } } - } - chain_add + chain_add + }; } pub fn swap_router02_address(chain_id: u64) -> Address { From 1e08f6bbc8d07be8461894cec4e38fac06b36263 Mon Sep 17 00:00:00 2001 From: malik672 Date: Tue, 5 Mar 2024 16:37:57 +0100 Subject: [PATCH 12/17] fixes --- src/addresses.rs | 60 ++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/addresses.rs b/src/addresses.rs index f2f25b5..1520359 100644 --- a/src/addresses.rs +++ b/src/addresses.rs @@ -275,7 +275,7 @@ pub const ARBITRUM_SEPOLIA_ADDRESSES: ChainAddresses = ChainAddresses { }; /// sepolia v3 addresses -pub const SEPOLIA_ADDRESS: ChainAddresses = ChainAddresses { +pub const SEPOLIA_ADDRESSES: ChainAddresses = ChainAddresses { v3_core_factory_address: address!("0227628f3F023bb0B980b67D528571c95c6DaC1c"), multicall_address: address!("D7F33bCdb21b359c8ee6F0251d30E94832baAd07"), quoter_address: address!("Ed1f6473345F45b75F8179591dd5bA1888cf2FB3"), @@ -283,7 +283,7 @@ pub const SEPOLIA_ADDRESS: ChainAddresses = ChainAddresses { nonfungible_position_manager_address: Some(address!( "1238536071E1c677A632429e3655c799b22cDA52" )), - tick_lens_address: Some(address!("d7f33bcdb21b359c8ee6f0251d30e94832baad07")), + tick_lens_address: Some(address!("0b343475d44EC2b4b8243EBF81dc888BF0A14b36")), swap_router02_address: Some(address!("3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E")), v1_mixed_route_quoter_address: None, }; @@ -405,11 +405,11 @@ lazy_static! { /// V3 Contract Addresses pub static ref V3_CORE_FACTORY_ADDRESSES: ChainAddress = { let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { + for chain_id in SUPPORTED_CHAINS { chain_add.insert( - memo as u64, + chain_id as u64, CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) + .get(&(chain_id as u64)) .unwrap() .v3_core_factory_address, ); @@ -422,11 +422,11 @@ lazy_static! { /// V3 Contract Addresses pub static ref V3_MIGRATOR_ADDRESSES: ChainAddress = { let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { + for chain_id in SUPPORTED_CHAINS { chain_add.insert( - memo as u64, + chain_id as u64, CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) + .get(&(chain_id as u64)) .unwrap() .v3_migrator_address .unwrap(), @@ -440,11 +440,11 @@ lazy_static! { /// V3 Contract Addresses pub static ref MULTICALL_ADDRESSES: ChainAddress = { let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { + for chain_id in SUPPORTED_CHAINS { chain_add.insert( - memo as u64, + chain_id as u64, CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) + .get(&(chain_id as u64)) .unwrap() .multicall_address, ); @@ -512,13 +512,13 @@ lazy_static! { } lazy_static! { - pub static ref QUOTER_ADDRESS: ChainAddress = { + pub static ref QUOTER_ADDRESSESES: ChainAddress = { let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { + for chain_id in SUPPORTED_CHAINS { chain_add.insert( - memo as u64, + chain_id as u64, CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) + .get(&(chain_id as u64)) .unwrap() .quoter_address, ); @@ -528,19 +528,19 @@ lazy_static! { } lazy_static! { - pub static ref NONFUNGIBLE_POSITION_MANAGER_ADDRESS: ChainAddress = { + pub static ref NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: ChainAddress = { let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { + for chain_id in SUPPORTED_CHAINS { if CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) + .get(&(chain_id as u64)) .unwrap() .nonfungible_position_manager_address .is_some() { chain_add.insert( - memo as u64, + chain_id as u64, CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) + .get(&(chain_id as u64)) .unwrap() .nonfungible_position_manager_address .unwrap(), @@ -552,7 +552,7 @@ lazy_static! { } lazy_static! { - pub static ref ENS_RESGISTER_ADDRESS_MAP: AddressMap = + pub static ref ENS_RESGISTER_ADDRESS: AddressMap = construct_same_address_map(address!("00000000000C2E074eC69A0dFb2997BA6C7d2e1e"), &[]); } @@ -570,17 +570,17 @@ lazy_static! { lazy_static! { pub static ref TICK_LENS_ADDRESSES: ChainAddress = { let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { + for chain_id in SUPPORTED_CHAINS { if CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) + .get(&(chain_id as u64)) .unwrap() .tick_lens_address .is_some() { chain_add.insert( - memo as u64, + chain_id as u64, CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) + .get(&(chain_id as u64)) .unwrap() .tick_lens_address .unwrap(), @@ -592,19 +592,19 @@ lazy_static! { } lazy_static! { - pub static ref V1_MIXED_ROUTE_QUOTER_ADDRESS: ChainAddress = { + pub static ref V1_MIXED_ROUTE_QUOTER_ADDRESSES: ChainAddress = { let mut chain_add = ChainAddress::new(); - for memo in SUPPORTED_CHAINS { + for chain_id in SUPPORTED_CHAINS { if CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) + .get(&(chain_id as u64)) .unwrap() .v1_mixed_route_quoter_address .is_some() { chain_add.insert( - memo as u64, + chain_id as u64, CHAIN_TO_ADDRESSES_MAP - .get(&(memo as u64)) + .get(&(chain_id as u64)) .unwrap() .v1_mixed_route_quoter_address .unwrap(), From 7c7a8dd37d62ad23b51efd76a024dd15a6d484d6 Mon Sep 17 00:00:00 2001 From: malik672 Date: Tue, 5 Mar 2024 16:42:44 +0100 Subject: [PATCH 13/17] fixes --- src/addresses.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addresses.rs b/src/addresses.rs index 1520359..94eec59 100644 --- a/src/addresses.rs +++ b/src/addresses.rs @@ -379,7 +379,7 @@ lazy_static! { new_map.insert(ChainId::AVALANCHE as u64, AVALANCHE_ADDRESSES); new_map.insert(ChainId::MAINNET as u64, *MAINNET_ADDRESSES); - new_map.insert(ChainId::SEPOLIA as u64, SEPOLIA_ADDRESS); + new_map.insert(ChainId::SEPOLIA as u64, SEPOLIA_ADDRESSES); new_map.insert(ChainId::GOERLI as u64, *GOERLI_ADDRESSES); new_map.insert(ChainId::ARBITRUMONE as u64, *ARBITUM_ONE_ADDRESSES); new_map.insert(ChainId::ARBITRUMGOERLI as u64, ARBITRUM_GOERLI_ADDRESSES); From d8021d40e7f6884170c5bfe0bd82eede2bd680f4 Mon Sep 17 00:00:00 2001 From: malik Date: Tue, 5 Mar 2024 17:32:17 +0100 Subject: [PATCH 14/17] Update src/addresses.rs Co-authored-by: Shuhui Luo <107524008+shuhuiluo@users.noreply.github.com> --- src/addresses.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addresses.rs b/src/addresses.rs index 94eec59..c2f0352 100644 --- a/src/addresses.rs +++ b/src/addresses.rs @@ -592,7 +592,7 @@ lazy_static! { } lazy_static! { - pub static ref V1_MIXED_ROUTE_QUOTER_ADDRESSES: ChainAddress = { + pub static ref MIXED_ROUTE_QUOTER_V1_ADDRESSES: ChainAddress = { let mut chain_add = ChainAddress::new(); for chain_id in SUPPORTED_CHAINS { if CHAIN_TO_ADDRESSES_MAP From 47ad391558f4d6583c16defe9d332ca8207b85db Mon Sep 17 00:00:00 2001 From: malik Date: Tue, 5 Mar 2024 17:32:24 +0100 Subject: [PATCH 15/17] Update src/addresses.rs Co-authored-by: Shuhui Luo <107524008+shuhuiluo@users.noreply.github.com> --- src/addresses.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addresses.rs b/src/addresses.rs index c2f0352..bc4af45 100644 --- a/src/addresses.rs +++ b/src/addresses.rs @@ -512,7 +512,7 @@ lazy_static! { } lazy_static! { - pub static ref QUOTER_ADDRESSESES: ChainAddress = { + pub static ref QUOTER_ADDRESSES: ChainAddress = { let mut chain_add = ChainAddress::new(); for chain_id in SUPPORTED_CHAINS { chain_add.insert( From a97a30626879d73fb866813e822dc9c99e580cf2 Mon Sep 17 00:00:00 2001 From: malik Date: Tue, 5 Mar 2024 17:32:46 +0100 Subject: [PATCH 16/17] Update src/addresses.rs Co-authored-by: Shuhui Luo <107524008+shuhuiluo@users.noreply.github.com> --- src/addresses.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addresses.rs b/src/addresses.rs index bc4af45..a8b02f8 100644 --- a/src/addresses.rs +++ b/src/addresses.rs @@ -552,7 +552,7 @@ lazy_static! { } lazy_static! { - pub static ref ENS_RESGISTER_ADDRESS: AddressMap = + pub static ref ENS_REGISTRAR_ADDRESSES: AddressMap = construct_same_address_map(address!("00000000000C2E074eC69A0dFb2997BA6C7d2e1e"), &[]); } From acf15161455d6e65f55ede8f4e3b12727605a27a Mon Sep 17 00:00:00 2001 From: malik Date: Tue, 5 Mar 2024 17:53:44 +0100 Subject: [PATCH 17/17] Update Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index cba92eb..4fddad4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" [dependencies] alloy-primitives = "0.6" -bigdecimal = "0.4.2" +bigdecimal = "=0.4.2" eth_checksum = { version = "0.1.2", optional = true } lazy_static = "1.4" num-bigint = "0.4.4"