From fa34c632b0f5eaa444b7dd709700c594aeae5d3c Mon Sep 17 00:00:00 2001 From: Chris Smith <1979423+chris13524@users.noreply.github.com> Date: Fri, 26 Apr 2024 15:55:12 -0400 Subject: [PATCH] feat: EIP-6492 (#188) * feat: EIP-6492 * chore: use tagged versions --- Cargo.lock | 350 +++++++++++++++++++++++++++++++++++++++-------------- Cargo.toml | 6 +- 2 files changed, 259 insertions(+), 97 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9b554fe..0639c9f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,21 +71,82 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] -name = "alloy-eips" +name = "alloy-consensus" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" dependencies = [ + "alloy-eips", "alloy-primitives", "alloy-rlp", + "alloy-serde", + "c-kzg", "serde", + "sha2", +] + +[[package]] +name = "alloy-contract" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", "thiserror", ] +[[package]] +name = "alloy-dyn-abi" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ab339ca7b4ea9115f0578c941abc80a171edf8e5eadd01e6c4237b68db8083" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow 0.6.6", +] + +[[package]] +name = "alloy-eips" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "once_cell", + "serde", +] + +[[package]] +name = "alloy-genesis" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] + [[package]] name = "alloy-json-abi" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c5aecfe87e06da0e760840974c6e3cc19d4247be17a3172825fbbe759c8e60" +checksum = "44294729c145cf7ae65feab544b5b81fb2bb7e2fd060214842eb3989a1e9d882" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -96,31 +157,51 @@ dependencies = [ [[package]] name = "alloy-json-rpc" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" dependencies = [ "alloy-primitives", "serde", "serde_json", "thiserror", + "tracing", ] [[package]] name = "alloy-network" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" dependencies = [ + "alloy-consensus", "alloy-eips", "alloy-json-rpc", "alloy-primitives", - "alloy-rlp", - "serde", + "alloy-rpc-types", + "alloy-signer", + "async-trait", + "futures-utils-wasm", + "thiserror", +] + +[[package]] +name = "alloy-node-bindings" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +dependencies = [ + "alloy-genesis", + "alloy-primitives", + "k256 0.13.3", + "serde_json", + "tempfile", + "thiserror", + "tracing", + "url", ] [[package]] name = "alloy-primitives" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4b6fb2b432ff223d513db7f908937f63c252bee0af9b82bfd25b0a5dd1eb0d8" +checksum = "50c715249705afa1e32be79dabfd35e2ef0f1cc02ad2cf48c9d1e20026ee637b" dependencies = [ "alloy-rlp", "bytes", @@ -139,22 +220,31 @@ dependencies = [ ] [[package]] -name = "alloy-providers" +name = "alloy-provider" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" dependencies = [ + "alloy-eips", + "alloy-json-rpc", "alloy-network", "alloy-primitives", "alloy-rpc-client", - "alloy-rpc-trace-types", "alloy-rpc-types", + "alloy-rpc-types-trace", "alloy-transport", "alloy-transport-http", + "async-stream", "async-trait", "auto_impl", - "reqwest 0.11.24", - "serde", - "thiserror", + "dashmap", + "futures", + "futures-utils-wasm", + "lru", + "reqwest", + "serde_json", + "tokio", + "tracing", + "url", ] [[package]] @@ -182,53 +272,85 @@ dependencies = [ [[package]] name = "alloy-rpc-client" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" dependencies = [ "alloy-json-rpc", "alloy-transport", "alloy-transport-http", "futures", "pin-project", - "reqwest 0.11.24", + "reqwest", + "serde", "serde_json", + "tokio", + "tokio-stream", "tower", "tracing", "url", ] [[package]] -name = "alloy-rpc-trace-types" +name = "alloy-rpc-types" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.12.1", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-rpc-types-trace" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" dependencies = [ "alloy-primitives", "alloy-rpc-types", + "alloy-serde", "serde", "serde_json", ] [[package]] -name = "alloy-rpc-types" +name = "alloy-serde" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" dependencies = [ "alloy-primitives", - "alloy-rlp", - "itertools 0.12.1", "serde", "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve 0.13.8", + "k256 0.13.3", "thiserror", ] [[package]] name = "alloy-sol-macro" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0b5ab0cb07c21adf9d72e988b34e8200ce648c2bba8d009183bb1c50fb1216" +checksum = "bef9a94a27345fb31e3fcb5f5e9f592bb4847493b07fa1e47dd9fde2222f2e28" dependencies = [ + "alloy-sol-macro-input", "const-hex", - "dunce", - "heck", + "heck 0.4.1", "indexmap 2.2.1", "proc-macro-error", "proc-macro2", @@ -238,20 +360,35 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-sol-macro-input" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31fe73cd259527e24dc2dbfe64bc95e5ddfcd2b2731f670a11ff72b2be2c25b" +dependencies = [ + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity", +] + [[package]] name = "alloy-sol-type-parser" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd124ec0a456ec5e9dcca5b6e8b011bc723cc410d4d9a66bf032770feaeef4b" +checksum = "8c8d6e74e4feeaa2bcfdecfd3da247ab53c67bd654ba1907270c32e02b142331" dependencies = [ - "winnow", + "winnow 0.6.6", ] [[package]] name = "alloy-sol-types" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c08f62ded7ce03513bfb60ef5cad4fff5d4f67eac6feb4df80426b7b9ffb06e" +checksum = "afaffed78bfb17526375754931e045f96018aa810844b29c7aef823266dd4b4b" dependencies = [ "alloy-primitives", "alloy-sol-macro", @@ -262,10 +399,12 @@ dependencies = [ [[package]] name = "alloy-transport" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" dependencies = [ "alloy-json-rpc", - "base64 0.21.7", + "base64 0.22.0", + "futures-util", + "futures-utils-wasm", "serde", "serde_json", "thiserror", @@ -278,11 +417,11 @@ dependencies = [ [[package]] name = "alloy-transport-http" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" dependencies = [ "alloy-json-rpc", "alloy-transport", - "reqwest 0.11.24", + "reqwest", "serde_json", "tower", "url", @@ -501,9 +640,9 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", @@ -1007,7 +1146,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdca6a10ecad987bda04e95606ef85a5417dcaac1a78455242d72e031e2b6b62" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.48", @@ -1140,16 +1279,28 @@ dependencies = [ [[package]] name = "blockchain_api" version = "0.1.0" -source = "git+https://github.com/WalletConnect/WalletConnectRust.git?tag=v0.29.3#b4c8f4c50aebc125bff2ee60d8413a315e9417a9" +source = "git+https://github.com/WalletConnect/WalletConnectRust.git?tag=v0.30.0#edd6b6bcaa360e0887b4930ba78d56c958700612" dependencies = [ "relay_rpc", - "reqwest 0.12.3", + "reqwest", "serde", "tokio", "tracing", "url", ] +[[package]] +name = "blst" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + [[package]] name = "brotli" version = "4.0.0" @@ -1300,6 +1451,20 @@ dependencies = [ "either", ] +[[package]] +name = "c-kzg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3130f3d8717cc02e668a896af24984d5d5d4e8bf12e278e982e0f1bd88a0f9af" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "serde", +] + [[package]] name = "camino" version = "1.1.6" @@ -1818,7 +1983,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2061,6 +2226,12 @@ dependencies = [ "slab", ] +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + [[package]] name = "generic-array" version = "0.14.7" @@ -2075,7 +2246,7 @@ dependencies = [ [[package]] name = "geoip" version = "0.1.0" -source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.10.0#dfb9d5902271e4f27027f78948ea4f9b7e0e9072" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.11.1#ec503450d9671a5546bf8887f17723b9a02e0d36" dependencies = [ "aws-sdk-s3", "axum-client-ip", @@ -2209,6 +2380,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -2353,7 +2530,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -3521,7 +3698,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools 0.10.5", "lazy_static", "log", @@ -3686,12 +3863,14 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "relay_rpc" version = "0.1.0" -source = "git+https://github.com/WalletConnect/WalletConnectRust.git?tag=v0.29.3#b4c8f4c50aebc125bff2ee60d8413a315e9417a9" +source = "git+https://github.com/WalletConnect/WalletConnectRust.git?tag=v0.30.0#edd6b6bcaa360e0887b4930ba78d56c958700612" dependencies = [ + "alloy-contract", "alloy-json-abi", "alloy-json-rpc", + "alloy-node-bindings", "alloy-primitives", - "alloy-providers", + "alloy-provider", "alloy-rpc-types", "alloy-sol-types", "alloy-transport", @@ -3701,6 +3880,7 @@ dependencies = [ "data-encoding", "derive_more", "ed25519-dalek", + "hex", "jsonwebtoken", "k256 0.13.3", "once_cell", @@ -3716,42 +3896,6 @@ dependencies = [ "url", ] -[[package]] -name = "reqwest" -version = "0.11.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.24", - "http 0.2.11", - "http-body 0.4.6", - "hyper 0.14.28", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg 0.50.0", -] - [[package]] name = "reqwest" version = "0.12.3" @@ -3945,9 +4089,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.30" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.4.2", "errno", @@ -4478,7 +4622,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -4515,9 +4659,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63bef2e2c735acbc06874eca3a8506f02a3c4700e6e748afc92cc2e4220e8a03" +checksum = "70aba06097b6eda3c15f6eebab8a6339e121475bcf08bbe6758807e716c372a1" dependencies = [ "paste", "proc-macro2", @@ -4572,13 +4716,12 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", "windows-sys 0.52.0", ] @@ -4613,6 +4756,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + [[package]] name = "time" version = "0.3.31" @@ -4746,6 +4898,7 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", ] [[package]] @@ -4777,7 +4930,7 @@ checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.2.1", "toml_datetime", - "winnow", + "winnow 0.5.36", ] [[package]] @@ -5303,7 +5456,7 @@ checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "wc" version = "0.1.0" -source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.10.0#dfb9d5902271e4f27027f78948ea4f9b7e0e9072" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.11.1#ec503450d9671a5546bf8887f17723b9a02e0d36" dependencies = [ "geoip", ] @@ -5527,6 +5680,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index 0ef04de..8e827d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,14 +11,14 @@ authors = [ build = "build.rs" [dependencies] -wc = { git = "https://github.com/WalletConnect/utils-rs.git", tag = "v0.10.0", features = [ +wc = { git = "https://github.com/WalletConnect/utils-rs.git", tag = "v0.11.1", features = [ "geoip", "geoblock", ] } -relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.29.3", features = [ +relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.30.0", features = [ "cacao", ] } -blockchain_api = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.29.3" } +blockchain_api = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.30.0" } aws-config = "1.1.9" aws-sdk-s3 = "1.21.0"