diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ae99155..0a3ec4d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,11 +1,6 @@ -FROM ghcr.io/dfinity/icp-dev-env:7 - +FROM ghcr.io/dfinity/icp-dev-env:10 # Install caddy RUN apt -yqq install --no-install-recommends debian-keyring debian-archive-keyring apt-transport-https gpg lsof pkg-config libssl-dev -RUN curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg -RUN curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list -RUN apt -yq update -RUN apt -yqq install --no-install-recommends caddy RUN rustup install stable RUN rustup default stable diff --git a/Caddyfile b/Caddyfile deleted file mode 100644 index eb4daa0..0000000 --- a/Caddyfile +++ /dev/null @@ -1,10 +0,0 @@ -{ - log { - output discard - } -} - -localhost:8546 { - tls internal - reverse_proxy localhost:8545 -} diff --git a/Cargo.lock b/Cargo.lock index ae7dbcb..2a5d09f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -17,20 +17,1127 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy 0.7.35", +] + [[package]] name = "aho-corasick" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ - "memchr", + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "alloy" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-consensus 0.3.5-icp.1", + "alloy-contract 0.3.5-icp.1", + "alloy-core", + "alloy-eips 0.3.5-icp.1", + "alloy-network 0.3.5-icp.1", + "alloy-provider 0.3.5-icp.1", + "alloy-rpc-client 0.3.5-icp.1", + "alloy-rpc-types 0.3.5-icp.1", + "alloy-signer 0.3.5-icp.1", + "alloy-signer-icp", + "alloy-transport 0.3.5-icp.1", + "alloy-transport-http 0.3.5-icp.1", + "alloy-transport-icp", +] + +[[package]] +name = "alloy" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ec9b8795b2083585293bd3d19033e9d67e725917c95c44cb154e3400529ccd" +dependencies = [ + "alloy-consensus 0.12.5", + "alloy-contract 0.12.5", + "alloy-core", + "alloy-eips 0.12.5", + "alloy-genesis", + "alloy-network 0.12.5", + "alloy-provider 0.12.5", + "alloy-pubsub", + "alloy-rpc-client 0.12.5", + "alloy-rpc-types 0.12.5", + "alloy-serde 0.12.5", + "alloy-signer 0.12.5", + "alloy-signer-local", + "alloy-transport 0.12.5", + "alloy-transport-http 0.12.5", + "alloy-transport-ipc", + "alloy-transport-ws", +] + +[[package]] +name = "alloy-chains" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da226340862e036ab26336dc99ca85311c6b662267c1440e1733890fd688802c" +dependencies = [ + "alloy-primitives", + "num_enum", + "strum 0.26.3", +] + +[[package]] +name = "alloy-consensus" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-eips 0.3.5-icp.1", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.3.5-icp.1", + "c-kzg", + "serde", +] + +[[package]] +name = "alloy-consensus" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84efb7b8ddb9223346bfad9d8094e1a100c254037a3b5913243bfa8e04be266" +dependencies = [ + "alloy-eips 0.12.5", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.12.5", + "alloy-trie", + "auto_impl", + "c-kzg", + "derive_more 2.0.1", + "either", + "k256", + "once_cell", + "rand 0.8.5", + "serde", + "serde_with", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-consensus-any" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fafded0c1ff8f0275c4a484239058e1c01c0c2589f8a16e03669ef7094a06f9b" +dependencies = [ + "alloy-consensus 0.12.5", + "alloy-eips 0.12.5", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.12.5", + "serde", +] + +[[package]] +name = "alloy-contract" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network 0.3.5-icp.1", + "alloy-network-primitives 0.3.5-icp.1", + "alloy-primitives", + "alloy-provider 0.3.5-icp.1", + "alloy-rpc-types-eth 0.3.5-icp.1", + "alloy-sol-types", + "alloy-transport 0.3.5-icp.1", + "futures", + "futures-util", + "thiserror 1.0.69", +] + +[[package]] +name = "alloy-contract" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a0fa0584d13dd0c4e79288d411222c4d7c3411c71b7fa637cefda9dcf9bb1f9" +dependencies = [ + "alloy-consensus 0.12.5", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network 0.12.5", + "alloy-network-primitives 0.12.5", + "alloy-primitives", + "alloy-provider 0.12.5", + "alloy-pubsub", + "alloy-rpc-types-eth 0.12.5", + "alloy-sol-types", + "alloy-transport 0.12.5", + "futures", + "futures-util", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-core" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca1380cc3c81b83d5234865779494970c83b5893b423c59cdd68c3cd1ed0b671" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7078bef2bc353c1d1a97b44981d0186198be320038fbfbb0b37d1dd822a555d3" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow 0.7.4", +] + +[[package]] +name = "alloy-eip2124" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "675264c957689f0fd75f5993a73123c2cc3b5c235a38f5b9037fe6c826bfb2c0" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "crc", + "serde", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b15b13d38b366d01e818fe8e710d4d702ef7499eacd44926a06171dd9585d0c" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "k256", + "serde", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-eips" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702 0.1.1", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.3.5-icp.1", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-eips" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4bffedaddc627520eabdcbfe27a2d2c2f716e15295e2ed1010df3feae67040" +dependencies = [ + "alloy-eip2124", + "alloy-eip2930", + "alloy-eip7702 0.5.1", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.12.5", + "auto_impl", + "c-kzg", + "derive_more 2.0.1", + "either", + "once_cell", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-genesis" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b11774716152a5204aff0e86a8c841df499ea81464e2b1f82b3f72d6a2ef32" +dependencies = [ + "alloy-eips 0.12.5", + "alloy-primitives", + "alloy-serde 0.12.5", + "alloy-trie", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec80745c33797e8baf547a8cfeb850e60d837fe9b9e67b3f579c1fcd26f527e9" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6929e607b0a56803c69c68adc6e8aae1644c94e37ea458aa2d0713fc77490e70" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror 2.0.12", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-consensus 0.3.5-icp.1", + "alloy-eips 0.3.5-icp.1", + "alloy-json-rpc 0.3.5-icp.1", + "alloy-network-primitives 0.3.5-icp.1", + "alloy-primitives", + "alloy-rpc-types-eth 0.3.5-icp.1", + "alloy-serde 0.3.5-icp.1", + "alloy-signer 0.3.5-icp.1", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror 1.0.69", +] + +[[package]] +name = "alloy-network" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2b14524c3605ed5ee173b966333089474415416a8cfd80ceb003c18fd6d1736" +dependencies = [ + "alloy-consensus 0.12.5", + "alloy-consensus-any", + "alloy-eips 0.12.5", + "alloy-json-rpc 0.12.5", + "alloy-network-primitives 0.12.5", + "alloy-primitives", + "alloy-rpc-types-any", + "alloy-rpc-types-eth 0.12.5", + "alloy-serde 0.12.5", + "alloy-signer 0.12.5", + "alloy-sol-types", + "async-trait", + "auto_impl", + "derive_more 2.0.1", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-eips 0.3.5-icp.1", + "alloy-primitives", + "alloy-serde 0.3.5-icp.1", + "serde", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c06932646544ea341f0fda48d2c0fe4fda75bc132379cb84019cdfb6ddcb0fb" +dependencies = [ + "alloy-consensus 0.12.5", + "alloy-eips 0.12.5", + "alloy-primitives", + "alloy-serde 0.12.5", + "serde", +] + +[[package]] +name = "alloy-node-bindings" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb8702df5255ed061ccb452511328edf267ff8b1c356623e8f93a5b708d57273" +dependencies = [ + "alloy-genesis", + "alloy-network 0.12.5", + "alloy-primitives", + "alloy-signer 0.12.5", + "alloy-signer-local", + "k256", + "rand 0.8.5", + "serde_json", + "tempfile", + "thiserror 2.0.12", + "tracing", + "url", +] + +[[package]] +name = "alloy-primitives" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eacedba97e65cdc7ab592f2b22ef5d3ab8d60b2056bc3a6e6363577e8270ec6f" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 2.0.1", + "foldhash", + "hashbrown 0.15.2", + "indexmap 2.9.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.8.5", + "ruint", + "rustc-hash", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.3.5-icp.1", + "alloy-eips 0.3.5-icp.1", + "alloy-json-rpc 0.3.5-icp.1", + "alloy-network 0.3.5-icp.1", + "alloy-network-primitives 0.3.5-icp.1", + "alloy-primitives", + "alloy-rpc-client 0.3.5-icp.1", + "alloy-rpc-types-eth 0.3.5-icp.1", + "alloy-transport 0.3.5-icp.1", + "alloy-transport-icp", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru 0.12.5", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tracing", +] + +[[package]] +name = "alloy-provider" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1ec2eabd9b3acc46e59247c35f75545960372431c68f7fdbfcfb970a486c30" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.12.5", + "alloy-eips 0.12.5", + "alloy-json-rpc 0.12.5", + "alloy-network 0.12.5", + "alloy-network-primitives 0.12.5", + "alloy-primitives", + "alloy-pubsub", + "alloy-rpc-client 0.12.5", + "alloy-rpc-types-anvil", + "alloy-rpc-types-debug", + "alloy-rpc-types-eth 0.12.5", + "alloy-rpc-types-trace", + "alloy-rpc-types-txpool", + "alloy-sol-types", + "alloy-transport 0.12.5", + "alloy-transport-http 0.12.5", + "alloy-transport-ipc", + "alloy-transport-ws", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru 0.13.0", + "parking_lot", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-pubsub" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1cf194abddb88b034d22ab41449ed8532e5113e58699cd055bf21d98a0991ab" +dependencies = [ + "alloy-json-rpc 0.12.5", + "alloy-primitives", + "alloy-transport 0.12.5", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6c1d995bff8d011f7cd6c81820d51825e6e06d6db73914c1630ecf544d83d6" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.4", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a40e1ef334153322fd878d07e86af7a529bcb86b2439525920a88eba87bcf943" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-json-rpc 0.3.5-icp.1", + "alloy-transport 0.3.5-icp.1", + "alloy-transport-http 0.3.5-icp.1", + "alloy-transport-icp", + "futures", + "ic-cdk 0.17.1", + "ic-cdk-timers", + "pin-project", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6213829d8eabc239c2f9572452a5993ebdf78b04c020abc450ae48c54261d4ce" +dependencies = [ + "alloy-json-rpc 0.12.5", + "alloy-primitives", + "alloy-pubsub", + "alloy-transport 0.12.5", + "alloy-transport-http 0.12.5", + "alloy-transport-ipc", + "alloy-transport-ws", + "futures", + "pin-project", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-rpc-types-eth 0.3.5-icp.1", + "alloy-serde 0.3.5-icp.1", + "serde", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a153db94cf231b03238fe4da48f59dc6f36e01b5e4d5a2e30de33b95395380fa" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-anvil", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth 0.12.5", + "alloy-rpc-types-trace", + "alloy-rpc-types-txpool", + "alloy-serde 0.12.5", + "serde", +] + +[[package]] +name = "alloy-rpc-types-anvil" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5462937f088889c337c236c2509226e87a26301d2b01f9fafee246bd84cb0407" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth 0.12.5", + "alloy-serde 0.12.5", + "serde", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cd4ceea38ea27eeb26f021df34ed5b7b793704ad7a2a009f16137a19461e7ca" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth 0.12.5", + "alloy-serde 0.12.5", +] + +[[package]] +name = "alloy-rpc-types-debug" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fa8f6e27d47b4c56c627cb03dc91624c26bd814f6609bb1d1a836148b76fc9b" +dependencies = [ + "alloy-primitives", + "serde", +] + +[[package]] +name = "alloy-rpc-types-engine" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a1a0710dbfbab2b33200ef45c650963d63edf6a81b2c7399ede762b3586dfd" +dependencies = [ + "alloy-consensus 0.12.5", + "alloy-eips 0.12.5", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.12.5", + "derive_more 2.0.1", + "rand 0.8.5", + "serde", + "strum 0.27.1", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-consensus 0.3.5-icp.1", + "alloy-eips 0.3.5-icp.1", + "alloy-network-primitives 0.3.5-icp.1", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.3.5-icp.1", + "alloy-sol-types", + "cfg-if", + "derive_more 1.0.0", + "hashbrown 0.14.5", + "itertools 0.13.0", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e18d94b1036302720b987564560e4a5b85035a17553c53a50afa2bd8762b487" +dependencies = [ + "alloy-consensus 0.12.5", + "alloy-consensus-any", + "alloy-eips 0.12.5", + "alloy-network-primitives 0.12.5", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.12.5", + "alloy-sol-types", + "itertools 0.13.0", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-rpc-types-trace" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef4bba67ec601730ceb23e542980d73ae9f718819604dfdd8289b13a506e762" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth 0.12.5", + "alloy-serde 0.12.5", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-rpc-types-txpool" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8edc8512f919feb79dd30864ef7574d2877e71b73e30b5de4925ba9bc6bd4f96" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth 0.12.5", + "alloy-serde 0.12.5", + "serde", +] + +[[package]] +name = "alloy-serde" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9824e1bf92cd7848ca6fabb01c9aca15c9c5fb0ab96da5514ef0543f021c69f6" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror 1.0.69", +] + +[[package]] +name = "alloy-signer" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81755ed6a6a33061302ac95e9bb7b40ebf7078e4568397168024242bc31a3e58" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "either", + "elliptic-curve", + "k256", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-signer-icp" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-consensus 0.3.5-icp.1", + "alloy-network 0.3.5-icp.1", + "alloy-primitives", + "alloy-signer 0.3.5-icp.1", + "async-trait", + "ic-cdk 0.17.1", + "thiserror 1.0.69", +] + +[[package]] +name = "alloy-signer-local" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa857621a5c95c13e640e18bb9c4720f4338a666d6276f55446477a6bc3912ff" +dependencies = [ + "alloy-consensus 0.12.5", + "alloy-network 0.12.5", + "alloy-primitives", + "alloy-signer 0.12.5", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3637022e781bc73a9e300689cd91105a0e6be00391dd4e2110a71cc7e9f20a94" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9bd22d0bba90e40f40c625c33d39afb7d62b22192476a2ce1dcf8409dce880" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck", + "indexmap 2.9.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.100", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ae4646e8123ec2fd10f9c22e361ffe4365c42811431829c2eabae528546bcc" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck", + "macro-string", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.100", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488a747fdcefeec5c1ed5aa9e08becd775106777fdeae2a35730729fc8a95910" +dependencies = [ + "serde", + "winnow 0.7.4", +] + +[[package]] +name = "alloy-sol-types" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "767957235807b021126dca1598ac3ef477007eace07961607dc5f490550909c7" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-json-rpc 0.3.5-icp.1", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c74598eb65cefa886be6ba624c14a6856d9d84339ec720520f3efcc03311716" +dependencies = [ + "alloy-json-rpc 0.12.5", + "base64 0.22.1", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-transport-http" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-transport 0.3.5-icp.1", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcd2f8ab2f053cd848ead5d625cb1b63716562951101588c1fa49300e3c6418" +dependencies = [ + "alloy-json-rpc 0.12.5", + "alloy-transport 0.12.5", + "reqwest", + "serde_json", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-icp" +version = "0.3.5-icp.1" +source = "git+https://github.com/ic-alloy/ic-alloy.git?tag=v0.3.5-icp.1#47a9d0b199f47675497d83a0f64fe42b61ceef1a" +dependencies = [ + "alloy-json-rpc 0.3.5-icp.1", + "alloy-transport 0.3.5-icp.1", + "candid", + "ic-cdk 0.17.1", + "serde", + "serde_json", + "tower", +] + +[[package]] +name = "alloy-transport-ipc" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e61e2b5cbf16f7588e4420848b61824f6514944773732534f4129ba6a251e059" +dependencies = [ + "alloy-json-rpc 0.12.5", + "alloy-pubsub", + "alloy-transport 0.12.5", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde", + "serde_json", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "alloy-transport-ws" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ddcf4b98b3448eb998e057dc5a27345997863d6544ee7f0f79957616768dd3" +dependencies = [ + "alloy-pubsub", + "alloy-transport 0.12.5", + "futures", + "http", + "rustls", + "serde_json", + "tokio", + "tokio-tungstenite", + "tracing", + "ws_stream_wasm", +] + +[[package]] +name = "alloy-trie" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95a94854e420f07e962f7807485856cde359ab99ab6413883e15235ad996e8b" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arrayvec 0.7.4", + "derive_more 1.0.0", + "nybbles", + "serde", + "smallvec", + "tracing", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "arbitrary" @@ -38,6 +1145,136 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +[[package]] +name = "arc-swap" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" + +[[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 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.1", + "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.5.2" @@ -49,6 +1286,9 @@ name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +dependencies = [ + "serde", +] [[package]] name = "ascii-canvas" @@ -59,6 +1299,123 @@ dependencies = [ "term", ] +[[package]] +name = "askama" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a4e46abb203e00ef226442d452769233142bbfdd79c3941e84c8e61c4112543" +dependencies = [ + "askama_derive", + "itoa", + "percent-encoding", + "serde", + "serde_json", +] + +[[package]] +name = "askama_derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54398906821fd32c728135f7b351f0c7494ab95ae421d41b6f5a020e158f28a6" +dependencies = [ + "askama_parser", + "basic-toml", + "memchr", + "proc-macro2", + "quote", + "rustc-hash", + "serde", + "serde_derive", + "syn 2.0.100", +] + +[[package]] +name = "askama_parser" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf315ce6524c857bb129ff794935cf6d42c82a6cff60526fe2a63593de4d0d4f" +dependencies = [ + "memchr", + "serde", + "serde_derive", + "winnow 0.7.4", +] + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener 5.4.0", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "async-watch" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a078faf4e27c0c6cc0efb20e5da59dcccc04968ebf2801d8e0b2195124cdcdb2" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version 0.4.1", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -73,7 +1430,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", ] [[package]] @@ -82,6 +1439,17 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "getrandom 0.2.15", + "instant", + "rand 0.8.5", +] + [[package]] name = "backtrace" version = "0.3.71" @@ -92,7 +1460,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -103,6 +1471,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" version = "0.22.1" @@ -115,12 +1489,27 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "basic-toml" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a" +dependencies = [ + "serde", +] + [[package]] name = "beef" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" +[[package]] +name = "bimap" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" + [[package]] name = "binread" version = "2.2.0" @@ -159,12 +1548,6 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.5.0" @@ -183,6 +1566,15 @@ dependencies = [ "wyz", ] +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -192,6 +1584,18 @@ dependencies = [ "generic-array", ] +[[package]] +name = "blst" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -212,18 +1616,55 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +dependencies = [ + "serde", +] + +[[package]] +name = "c-kzg" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "once_cell", + "serde", +] + +[[package]] +name = "cached" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8466736fe5dbcaf8b8ee24f9bbefe43c884dc3e9ff7178da70f55bffca1133c" +dependencies = [ + "ahash", + "hashbrown 0.14.5", + "instant", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "camino" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] [[package]] name = "candid" -version = "0.10.6" +version = "0.10.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965e86b1bd1c0c26df70cf0c92ae16c56204ab402eb915c26a541cf949d841cf" +checksum = "a253bab4a9be502c82332b60cbeee6202ad0692834efeec95fae9f29db33d692" dependencies = [ "anyhow", "binread", @@ -239,7 +1680,7 @@ dependencies = [ "serde", "serde_bytes", "stacker", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -251,7 +1692,7 @@ dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", ] [[package]] @@ -263,21 +1704,49 @@ dependencies = [ "anyhow", "candid", "codespan-reporting", - "convert_case", + "convert_case 0.6.0", "hex", "lalrpop", "lalrpop-util", "logos", "num-bigint", "pretty", - "thiserror", + "thiserror 1.0.69", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.25", + "serde", + "serde_json", + "thiserror 2.0.12", ] [[package]] name = "cc" -version = "1.0.90" +version = "1.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +dependencies = [ + "jobserver", + "libc", + "shlex", +] [[package]] name = "cfg-if" @@ -285,19 +1754,22 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chain_fusion" version = "0.1.0" dependencies = [ - "candid", - "ethers-core", - "evm-rpc-canister-types 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "getrandom", - "hex", + "alloy 0.3.5-icp.1", + "candid", + "getrandom 0.2.15", "ic-canisters-http-types", "ic-cdk 0.14.0", "ic-cdk-timers", - "ic-evm-utils 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ic-stable-structures", "minicbor", "minicbor-derive", @@ -312,9 +1784,53 @@ version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ + "android-tzdata", + "iana-time-zone", "num-traits", + "serde", + "windows-targets 0.52.6", +] + +[[package]] +name = "clap" +version = "4.5.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.100", ] +[[package]] +name = "clap_lex" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" + [[package]] name = "codespan-reporting" version = "0.11.1" @@ -325,11 +1841,26 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "const-hex" -version = "1.12.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" +checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" dependencies = [ "cfg-if", "cpufeatures", @@ -353,6 +1884,15 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "convert_case" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -378,6 +1918,21 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" version = "1.4.0" @@ -387,6 +1942,65 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crossterm" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +dependencies = [ + "bitflags", + "crossterm_winapi", + "libc", + "mio 0.8.11", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + [[package]] name = "crunchy" version = "0.2.2" @@ -400,7 +2014,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -415,6 +2029,68 @@ dependencies = [ "typenum", ] +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.100", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.5.0" @@ -428,9 +2104,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", + "pem-rfc7468", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[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.18" @@ -439,7 +2137,58 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl 1.0.0", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl 2.0.1", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", + "unicode-xid", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", ] [[package]] @@ -448,12 +2197,21 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", "const-oid", "crypto-common", "subtle", ] +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + [[package]] name = "dirs-next" version = "2.0.0" @@ -464,6 +2222,18 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.5.0", + "windows-sys 0.59.0", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -471,10 +2241,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "redox_users", + "redox_users 0.4.5", "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "doctest-file" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + [[package]] name = "ecdsa" version = "0.16.9" @@ -482,18 +2281,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", - "digest", + "digest 0.10.7", "elliptic-curve", "rfc6979", + "serdect", "signature", "spki", ] +[[package]] +name = "ed25519-consensus" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" +dependencies = [ + "curve25519-dalek-ng", + "hex", + "rand_core 0.6.4", + "serde", + "sha2 0.9.9", + "thiserror 1.0.69", + "zeroize", +] + [[package]] name = "either" -version = "1.10.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] [[package]] name = "elliptic-curve" @@ -503,13 +2321,15 @@ checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "digest", + "digest 0.10.7", "ff", "generic-array", "group", + "pem-rfc7468", "pkcs8", - "rand_core", + "rand_core 0.6.4", "sec1", + "serdect", "subtle", "zeroize", ] @@ -532,12 +2352,44 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "env_filter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", +] + [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" +dependencies = [ + "serde", +] + [[package]] name = "errno" version = "0.3.8" @@ -561,7 +2413,7 @@ dependencies = [ "serde", "serde_json", "sha3", - "thiserror", + "thiserror 1.0.69", "uint", ] @@ -612,35 +2464,47 @@ dependencies = [ "k256", "num_enum", "open-fastrlp", - "rand", + "rand 0.8.5", "rlp", "serde", "serde_json", - "strum", + "strum 0.26.3", "tempfile", - "thiserror", + "thiserror 1.0.69", "tiny-keccak", "unicode-xid", ] [[package]] -name = "evm-rpc-canister-types" -version = "0.1.2" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26317f516fb0bc1e0e49083865484df312566bef8e4e4b84f492dd552192dd5a" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" dependencies = [ - "candid", - "candid_parser", - "ic-cdk 0.14.0", - "reqwest", - "serde", - "serde_bytes", - "serde_json", + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" +dependencies = [ + "event-listener 5.4.0", + "pin-project-lite", ] [[package]] name = "evm-rpc-canister-types" -version = "1.0.0" +version = "5.0.1" dependencies = [ "candid", "candid_parser", @@ -653,13 +2517,12 @@ dependencies = [ [[package]] name = "evm-rpc-canister-types" -version = "1.0.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b0da276d418ffaad13b7348d94182b597a43339b6852806dbdcdadb6749d31" +checksum = "43ca514087adf7d8654f4b5b1f6fa828f68163f2aba11e05a1e02c031f0d630b" dependencies = [ "candid", "candid_parser", - "evm-rpc-canister-types 0.1.2", "ic-cdk 0.14.0", "reqwest", "serde", @@ -673,13 +2536,35 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes", +] + +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec 0.7.4", + "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", + "rand_core 0.6.4", "subtle", ] @@ -690,7 +2575,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] @@ -701,12 +2586,28 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +[[package]] +name = "flate2" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" +dependencies = [ + "crc32fast", + "miniz_oxide 0.8.5", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + [[package]] name = "foreign-types" version = "0.3.2" @@ -754,9 +2655,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -764,9 +2665,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" @@ -781,38 +2682,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -826,6 +2727,24 @@ 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 = "fuzzy-select" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f78ba8c46863e3f024f81f5035a886016f3ca9991a7d27a34d321de1150f620" +dependencies = [ + "crossterm", + "nucleo", + "onlyerror", + "unicode-segmentation", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -839,13 +2758,27 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", ] [[package]] @@ -854,6 +2787,27 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +[[package]] +name = "git2" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5220b8ba44c68a9a7f7a7659e864dd73692e417ef0211bea133c7b74e031eeb9" +dependencies = [ + "bitflags", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + [[package]] name = "group" version = "0.13.0" @@ -861,7 +2815,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -877,18 +2831,47 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", "tracing", ] +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", + "serde", +] [[package]] name = "heck" @@ -896,11 +2879,20 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] [[package]] name = "hmac" @@ -908,7 +2900,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -953,9 +2945,9 @@ checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "hyper" -version = "1.3.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", @@ -982,10 +2974,12 @@ dependencies = [ "hyper", "hyper-util", "rustls", + "rustls-native-certs 0.7.3", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", + "webpki-roots", ] [[package]] @@ -1006,9 +3000,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -1019,11 +3013,81 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ic-agent" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe81c75d117a496296e2a896733ae7a33ba838a7b2d79dae93e4df233940a9a8" +dependencies = [ + "arc-swap", + "async-channel", + "async-lock", + "async-trait", + "async-watch", + "backoff", + "cached", + "candid", + "der", + "ecdsa", + "ed25519-consensus", + "elliptic-curve", + "futures-util", + "hex", + "http", + "http-body", + "ic-certification", + "ic-transport-types 0.40.0", + "ic-verify-bls-signature", + "k256", + "leb128", + "p256", + "pem", + "pkcs8", + "rand 0.8.5", + "rangemap", + "reqwest", + "sec1", + "serde", + "serde_bytes", + "serde_cbor", + "serde_repr", + "sha2 0.10.8", + "simple_asn1", + "stop-token", + "thiserror 2.0.12", + "time", + "tokio", + "tower-service", + "url", +] + [[package]] name = "ic-canisters-http-types" version = "0.9.0" @@ -1035,146 +3099,375 @@ dependencies = [ ] [[package]] -name = "ic-cdk" -version = "0.13.1" +name = "ic-cdk" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff384f182459bec490a7f50a58bbdf8f7a6934de4dcc259e30c70641bcbcb917" +dependencies = [ + "candid", + "ic-cdk-macros 0.14.0", + "ic0", + "serde", + "serde_bytes", +] + +[[package]] +name = "ic-cdk" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "122efbcb0af5280d408a75a57b7dc6e9d92893bf6ed9cc98fe4dcff51f18b67c" +dependencies = [ + "candid", + "ic-cdk-macros 0.17.1", + "ic0", + "serde", + "serde_bytes", +] + +[[package]] +name = "ic-cdk-macros" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01dc6bc425ec048d6ac4137c7c0f2cfbd6f8b0be8efc568feae2b265f566117c" +dependencies = [ + "candid", + "proc-macro2", + "quote", + "serde", + "serde_tokenstream", + "syn 2.0.100", +] + +[[package]] +name = "ic-cdk-macros" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c792bf0d1621c893ccf2bcdeac4ee70121103a03030a1827031a6b3c60488944" +dependencies = [ + "candid", + "proc-macro2", + "quote", + "serde", + "serde_tokenstream", + "syn 2.0.100", +] + +[[package]] +name = "ic-cdk-timers" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb8fd812a9e26f6aa00594546f8fbf4d4853f39c3ba794c8ff11ecf86fd3c9e4" +dependencies = [ + "futures", + "ic-cdk 0.17.1", + "ic0", + "serde", + "serde_bytes", + "slotmap", +] + +[[package]] +name = "ic-certification" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb40d73f9f8273dc6569a68859003bbd467c9dc6d53c6fd7d174742f857209d" +dependencies = [ + "hex", + "serde", + "serde_bytes", + "sha2 0.10.8", +] + +[[package]] +name = "ic-evm-utils" +version = "4.0.0" +dependencies = [ + "candid", + "ethers-core", + "evm-rpc-canister-types 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ic-cdk 0.14.0", + "num-traits", + "serde", + "serde_bytes", + "serde_json", +] + +[[package]] +name = "ic-stable-structures" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f5684f577e0146738cd11afed789109c4f51ba963c75823c48c1501dc53278" +dependencies = [ + "ic_principal", +] + +[[package]] +name = "ic-test" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2f218b17f7e987b72ce8323698a8250b059ba4b0f895f6805612ef4715fa8f" +dependencies = [ + "alloy 0.12.5", + "alloy-node-bindings", + "anyhow", + "askama", + "async-trait", + "candid", + "candid_parser", + "cargo_metadata", + "clap", + "convert_case 0.8.0", + "dirs", + "env_logger", + "fuzzy-select", + "git2", + "ic-agent", + "ic-cdk 0.17.1", + "indexmap 2.9.0", + "lazy_static", + "pocket-ic", + "prettyplease", + "quote", + "regress", + "reqwest", + "serde", + "serde-json-schema", + "serde_json", + "slog", + "syn 2.0.100", + "thiserror 2.0.12", + "tokio", + "toml_edit 0.22.24", + "wf-cdk-bindgen", +] + +[[package]] +name = "ic-transport-types" +version = "0.39.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "979ee7bee5a67150a4c090fb012c93c294a528b4a867bad9a15cc6d01cb4227f" +dependencies = [ + "candid", + "hex", + "ic-certification", + "leb128", + "serde", + "serde_bytes", + "serde_cbor", + "serde_repr", + "sha2 0.10.8", + "thiserror 2.0.12", +] + +[[package]] +name = "ic-transport-types" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc75ff050a629a7fed83c5cff2eab9509cde334e777621b826d764160e75393" +dependencies = [ + "candid", + "hex", + "ic-certification", + "leb128", + "serde", + "serde_bytes", + "serde_cbor", + "serde_repr", + "sha2 0.10.8", + "thiserror 2.0.12", +] + +[[package]] +name = "ic-verify-bls-signature" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63a6fceb94127bda86bd6d05f859a0e2a67d128a8ffb5ddab17e1f15ac8f555" +checksum = "d420b25c0091059f6c3c23a21427a81915e6e0aca3b79e0d403ed767f286a3b9" dependencies = [ - "candid", - "ic-cdk-macros 0.9.0", - "ic0 0.21.1", - "serde", - "serde_bytes", + "hex", + "ic_bls12_381", + "lazy_static", + "pairing", + "rand 0.8.5", + "sha2 0.10.8", ] [[package]] -name = "ic-cdk" -version = "0.14.0" +name = "ic0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff384f182459bec490a7f50a58bbdf8f7a6934de4dcc259e30c70641bcbcb917" +checksum = "8de254dd67bbd58073e23dc1c8553ba12fa1dc610a19de94ad2bbcd0460c067f" + +[[package]] +name = "ic_bls12_381" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e828f9e804ccefe4b9b15b2195f474c60fd4f95ccd14fcb554eb6d7dfafde3" dependencies = [ - "candid", - "ic-cdk-macros 0.14.0", - "ic0 0.23.0", - "serde", - "serde_bytes", + "digest 0.10.7", + "ff", + "group", + "pairing", + "rand_core 0.6.4", + "subtle", ] [[package]] -name = "ic-cdk-macros" -version = "0.9.0" +name = "ic_principal" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fde5ca6ef1e69825c68916ff1bf7256b8f7ed69ac5ea3f1756f6e57f1503e27" +checksum = "1762deb6f7c8d8c2bdee4b6c5a47b60195b74e9b5280faa5ba29692f8e17429c" dependencies = [ - "candid", - "proc-macro2", - "quote", + "arbitrary", + "crc32fast", + "data-encoding", "serde", - "serde_tokenstream 0.1.7", - "syn 1.0.109", + "sha2 0.10.8", + "thiserror 1.0.69", ] [[package]] -name = "ic-cdk-macros" -version = "0.14.0" +name = "icu_collections" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01dc6bc425ec048d6ac4137c7c0f2cfbd6f8b0be8efc568feae2b265f566117c" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ - "candid", - "proc-macro2", - "quote", - "serde", - "serde_tokenstream 0.2.1", - "syn 2.0.58", + "displaydoc", + "yoke", + "zerofrom", + "zerovec", ] [[package]] -name = "ic-cdk-timers" -version = "0.7.0" +name = "icu_locid" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054727a3a1c486528b96349817d54290ff70df6addf417def456ea708a16f7fb" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ - "futures", - "ic-cdk 0.13.1", - "ic0 0.21.1", - "serde", - "serde_bytes", - "slotmap", + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", ] [[package]] -name = "ic-evm-utils" -version = "1.0.0" +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" dependencies = [ - "candid", - "ethers-core", - "evm-rpc-canister-types 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ic-cdk 0.14.0", - "num-traits", - "serde", - "serde_bytes", - "serde_json", + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "ic-evm-utils" -version = "1.0.0" +name = "icu_locid_transform_data" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae5163ad493747b9c2e29b09ba2c22b2800545c2030d29a01309eada92ab8179" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ - "candid", - "ethers-core", - "evm-rpc-canister-types 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ic-cdk 0.14.0", - "num-traits", - "serde", - "serde_bytes", - "serde_json", + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", ] [[package]] -name = "ic-stable-structures" -version = "0.6.4" +name = "icu_normalizer_data" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e2282054c8ddf0cb2a7abf5c174c373917b4345c9a096ae4aa7f7185cdcdc7" +checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ - "ic_principal", + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "ic0" -version = "0.21.1" +name = "icu_properties_data" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a54b5297861c651551676e8c43df805dad175cc33bc97dbd992edbbb85dcbcdf" +checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" [[package]] -name = "ic0" -version = "0.23.0" +name = "icu_provider" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de254dd67bbd58073e23dc1c8553ba12fa1dc610a19de94ad2bbcd0460c067f" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] [[package]] -name = "ic_principal" -version = "0.1.1" +name = "icu_provider_macros" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1762deb6f7c8d8c2bdee4b6c5a47b60195b74e9b5280faa5ba29692f8e17429c" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ - "arbitrary", - "crc32fast", - "data-encoding", - "serde", - "sha2", - "thiserror", + "proc-macro2", + "quote", + "syn 2.0.100", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1217,12 +3510,48 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.2", + "serde", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "interprocess" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d941b405bd2322993887859a8ee6ac9134945a24ec5ec763a8a962fc64dfec2d" +dependencies = [ + "doctest-file", + "futures-core", + "libc", + "recvmsg", + "tokio", + "widestring", + "windows-sys 0.52.0", ] [[package]] @@ -1231,6 +3560,21 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.11.0" @@ -1240,32 +3584,86 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jiff" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c102670231191d07d37a35af3eb77f1f0dbf7a71be51a962dcd57ea607be7260" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde", +] + +[[package]] +name = "jiff-static" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cdde31a9d349f1b1f51a0b3714a5940ac022976f4b49485fc04be052b183b4c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] +[[package]] +name = "json-pointer" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fe841b94e719a482213cee19dd04927cf412f26d8dc84c5a446c081e49c2997" +dependencies = [ + "serde_json", +] + [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", "once_cell", - "sha2", + "serdect", + "sha2 0.10.8", + "signature", ] [[package]] @@ -1277,6 +3675,16 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + [[package]] name = "lalrpop" version = "0.20.2" @@ -1286,7 +3694,7 @@ dependencies = [ "ascii-canvas", "bit-set", "ena", - "itertools", + "itertools 0.11.0", "lalrpop-util", "petgraph", "pico-args", @@ -1305,7 +3713,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata", + "regex-automata 0.4.6", ] [[package]] @@ -1322,9 +3730,23 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.169" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" + +[[package]] +name = "libgit2-sys" +version = "0.18.1+1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "e1dcb20f84ffcdd825c7a311ae347cce604a6f084a767dec4a4929829645290e" +dependencies = [ + "cc", + "libc", + "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +] [[package]] name = "libm" @@ -1338,8 +3760,34 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags", + "libc", +] + +[[package]] +name = "libssh2-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libz-sys" +version = "1.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" +dependencies = [ + "cc", "libc", + "pkg-config", + "vcpkg", ] [[package]] @@ -1348,6 +3796,12 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +[[package]] +name = "litemap" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" + [[package]] name = "lock_api" version = "0.4.12" @@ -1384,7 +3838,7 @@ dependencies = [ "proc-macro2", "quote", "regex-syntax 0.6.29", - "syn 2.0.58", + "syn 2.0.100", ] [[package]] @@ -1396,6 +3850,44 @@ dependencies = [ "logos-codegen", ] +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.2", +] + +[[package]] +name = "lru" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +dependencies = [ + "hashbrown 0.15.2", +] + +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "memchr" version = "2.7.2" @@ -1408,6 +3900,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minicbor" version = "0.24.0" @@ -1425,7 +3927,7 @@ checksum = "a6bdc119b1a405df86a8cde673295114179dbd0ebe18877c26ba89fb080365c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", ] [[package]] @@ -1437,6 +3939,15 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +dependencies = [ + "adler2", +] + [[package]] name = "mio" version = "0.8.11" @@ -1444,10 +3955,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "wasi", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.48.0", ] +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", +] + +[[package]] +name = "myn" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e49d2fc6c79d00e708293cb0793a2a33357405d0c0bf0fa7dc88e7694c8db313" + [[package]] name = "native-tls" version = "0.2.12" @@ -1471,18 +4000,54 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "nucleo" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5262af4c94921c2646c5ac6ff7900c2af9cbb08dc26a797e18130a7019c039d4" +dependencies = [ + "nucleo-matcher", + "parking_lot", + "rayon", +] + +[[package]] +name = "nucleo-matcher" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf33f538733d1a5a3494b836ba913207f14d9d4a1d3cd67030c5061bdd2cac85" +dependencies = [ + "memchr", + "unicode-segmentation", +] + [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", "serde", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.46" @@ -1502,6 +4067,16 @@ dependencies = [ "libm", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "num_enum" version = "0.7.2" @@ -1520,7 +4095,20 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", +] + +[[package]] +name = "nybbles" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983bb634df7248924ee0c4c3a749609b5abcb082c28fffe3254b3eb3602b307" +dependencies = [ + "alloy-rlp", + "const-hex", + "proptest", + "serde", + "smallvec", ] [[package]] @@ -1538,6 +4126,21 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "onlyerror" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f0c9c18fd5c5a2c580df757c1a0bc5058fa4b1db1e1823c6692d7c7d5a09ff0" +dependencies = [ + "myn", +] + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "open-fastrlp" version = "0.1.4" @@ -1569,7 +4172,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.5.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -1586,7 +4189,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", ] [[package]] @@ -1607,6 +4210,39 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.8", +] + +[[package]] +name = "pairing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" +dependencies = [ + "group", +] + [[package]] name = "parity-scale-codec" version = "3.6.12" @@ -1633,6 +4269,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.3" @@ -1653,7 +4295,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1662,12 +4304,42 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "pem" +version = "3.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" +dependencies = [ + "base64 0.22.1", + "serde", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" +dependencies = [ + "memchr", + "thiserror 2.0.12", + "ucd-trie", +] + [[package]] name = "petgraph" version = "0.6.5" @@ -1675,7 +4347,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 2.9.0", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version 0.4.1", ] [[package]] @@ -1710,7 +4392,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", ] [[package]] @@ -1741,6 +4423,58 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +[[package]] +name = "pocket-ic" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccd672d6b262731dccae40cb561e4c578709ea9987fbf649377d51077bf16db3" +dependencies = [ + "backoff", + "base64 0.13.1", + "candid", + "flate2", + "hex", + "ic-certification", + "ic-transport-types 0.39.3", + "reqwest", + "schemars", + "serde", + "serde_bytes", + "serde_cbor", + "serde_json", + "sha2 0.10.8", + "slog", + "strum 0.26.3", + "strum_macros 0.26.4", + "thiserror 2.0.12", + "tokio", + "tracing", + "tracing-appender", + "tracing-subscriber", + "wslpath", +] + +[[package]] +name = "portable-atomic" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1764,6 +4498,25 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "prettyplease" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" +dependencies = [ + "proc-macro2", + "syn 2.0.100", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1784,14 +4537,36 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit", + "toml_edit 0.21.1", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] @@ -1802,13 +4577,17 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ - "bitflags 2.5.0", + "bit-set", + "bit-vec", + "bitflags", "lazy_static", "num-traits", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax 0.8.3", + "rusty-fork", + "tempfile", "unarray", ] @@ -1821,11 +4600,69 @@ dependencies = [ "cc", ] +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quinn" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.12", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +dependencies = [ + "bytes", + "getrandom 0.2.15", + "rand 0.8.5", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.12", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" -version = "1.0.35" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] @@ -1843,8 +4680,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "serde", +] + +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "zerocopy 0.8.23", ] [[package]] @@ -1854,7 +4703,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -1863,25 +4722,66 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.1", ] [[package]] name = "rand_xorshift" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rangemap" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684" + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "rand_core", + "crossbeam-deque", + "crossbeam-utils", ] +[[package]] +name = "recvmsg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" + [[package]] name = "redox_syscall" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ - "bitflags 2.5.0", + "bitflags", ] [[package]] @@ -1890,9 +4790,20 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom", + "getrandom 0.2.15", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "redox_users" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" +dependencies = [ + "getrandom 0.2.15", "libredox", - "thiserror", + "thiserror 2.0.12", ] [[package]] @@ -1903,10 +4814,19 @@ checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata", + "regex-automata 0.4.6", "regex-syntax 0.8.3", ] +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + [[package]] name = "regex-automata" version = "0.4.6" @@ -1930,13 +4850,23 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +[[package]] +name = "regress" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ef7fa9ed0256d64a688a3747d0fef7a88851c18a5e1d57f115f38ec2e09366" +dependencies = [ + "hashbrown 0.15.2", + "memchr", +] + [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "encoding_rs", "futures-channel", @@ -1954,11 +4884,16 @@ dependencies = [ "js-sys", "log", "mime", + "mime_guess", "native-tls", "once_cell", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", + "rustls-native-certs 0.8.0", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", @@ -1966,12 +4901,18 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", + "tokio-rustls", + "tokio-socks", + "tokio-util", + "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", - "winreg", + "webpki-roots", + "windows-registry", ] [[package]] @@ -1992,7 +4933,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -2021,25 +4962,81 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ruint" +version = "1.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5ef8fb1dd8de3870cb8400d51b4c2023854bbafd5431a3ac7e7317243e22d2f" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp 0.3.1", + "fastrlp 0.4.0", + "num-bigint", + "num-integer", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + [[package]] name = "rustc-demangle" version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + [[package]] name = "rustc-hex" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.25", +] + [[package]] name = "rustix" version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.5.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -2053,19 +5050,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" dependencies = [ "once_cell", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", "zeroize", ] +[[package]] +name = "rustls-native-certs" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "rustls-pki-types", + "schannel", + "security-framework", +] + [[package]] name = "rustls-pemfile" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" dependencies = [ - "base64", + "base64 0.22.1", "rustls-pki-types", ] @@ -2074,6 +5098,9 @@ name = "rustls-pki-types" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -2092,6 +5119,18 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[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 = "ryu" version = "1.0.17" @@ -2114,7 +5153,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "cfg-if", - "derive_more", + "derive_more 0.99.18", "parity-scale-codec", "scale-info-derive", ] @@ -2140,6 +5179,30 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.100", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -2156,6 +5219,7 @@ dependencies = [ "der", "generic-array", "pkcs8", + "serdect", "subtle", "zeroize", ] @@ -2166,7 +5230,7 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 2.5.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -2183,55 +5247,122 @@ dependencies = [ "libc", ] +[[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.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" +dependencies = [ + "pest", +] + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + [[package]] name = "serde" -version = "1.0.197" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] +[[package]] +name = "serde-json-schema" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "481fc729c42ca7b2e93ac70540d05d58511399fef0a28c0d1c163304b042a142" +dependencies = [ + "json-pointer", + "serde", + "serde_json", + "url", +] + [[package]] name = "serde_bytes" -version = "0.11.14" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ + "half", "serde", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] -name = "serde_tokenstream" -version = "0.1.7" +name = "serde_repr" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", - "serde", - "syn 1.0.109", + "quote", + "syn 2.0.100", ] [[package]] @@ -2243,7 +5374,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.58", + "syn 2.0.100", ] [[package]] @@ -2258,6 +5389,70 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.9.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + [[package]] name = "sha2" version = "0.10.8" @@ -2266,7 +5461,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -2275,18 +5470,85 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest", + "digest 0.10.7", "keccak", ] +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" +dependencies = [ + "libc", + "mio 0.8.11", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + [[package]] name = "signature" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest", - "rand_core", + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "simple_asn1" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror 2.0.12", + "time", ] [[package]] @@ -2304,6 +5566,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slog" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" +dependencies = [ + "erased-serde", +] + [[package]] name = "slotmap" version = "1.0.7" @@ -2318,6 +5589,9 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -2345,6 +5619,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stacker" version = "0.1.15" @@ -2364,6 +5644,18 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "stop-token" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af91f480ee899ab2d9f8435bfdfc14d08a5754bd9d3fef1f1a1c23336aad6c8b" +dependencies = [ + "async-channel", + "cfg-if", + "futures-core", + "pin-project-lite", +] + [[package]] name = "string_cache" version = "0.8.7" @@ -2377,13 +5669,28 @@ dependencies = [ "precomputed-hash", ] +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros", + "strum_macros 0.26.4", +] + +[[package]] +name = "strum" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" +dependencies = [ + "strum_macros 0.27.1", ] [[package]] @@ -2396,7 +5703,20 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.58", + "syn 2.0.100", +] + +[[package]] +name = "strum_macros" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.100", ] [[package]] @@ -2405,6 +5725,12 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + [[package]] name = "syn" version = "1.0.109" @@ -2418,37 +5744,63 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.58" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d975606bae72d8aad5b07d9342465e123a2cccf53a5a735aedf81ca92a709ecb" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -2492,24 +5844,110 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "tests" +version = "0.1.0" +dependencies = [ + "alloy 0.12.5", + "candid", + "cargo_metadata", + "convert_case 0.8.0", + "ic-cdk 0.17.1", + "ic-test", + "pocket-ic", + "serde", + "serde_bytes", + "tokio", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" -version = "1.0.58" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "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.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" + +[[package]] +name = "time-macros" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" +dependencies = [ + "num-conv", + "time-core", ] [[package]] @@ -2521,6 +5959,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.6.1" @@ -2538,17 +5986,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", "libc", - "mio", + "mio 1.0.3", + "parking_lot", "pin-project-lite", + "signal-hook-registry", "socket2", - "windows-sys 0.48.0", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] @@ -2572,6 +6034,46 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-socks" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" +dependencies = [ + "either", + "futures-util", + "thiserror 1.0.69", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" +dependencies = [ + "futures-util", + "log", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots", +] + [[package]] name = "tokio-util" version = "0.7.11" @@ -2587,9 +6089,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" @@ -2597,21 +6099,32 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap", + "indexmap 2.9.0", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +dependencies = [ + "indexmap 2.9.0", "toml_datetime", - "winnow", + "winnow 0.7.4", ] [[package]] name = "tower" -version = "0.4.13" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "pin-project", "pin-project-lite", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -2619,33 +6132,101 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror 1.0.69", + "time", + "tracing-subscriber", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ + "matchers", + "nu-ansi-term", "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "time", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", ] [[package]] @@ -2654,6 +6235,25 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" +dependencies = [ + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.9.0", + "rustls", + "rustls-pki-types", + "sha1", + "thiserror 2.0.12", + "utf-8", +] + [[package]] name = "typed-arena" version = "2.0.2" @@ -2666,6 +6266,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + [[package]] name = "uint" version = "0.9.5" @@ -2685,10 +6291,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] -name = "unicode-bidi" -version = "0.3.15" +name = "unicase" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" @@ -2696,15 +6302,6 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.11.0" @@ -2727,18 +6324,49 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" name = "untrusted" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] -name = "url" -version = "2.5.2" +name = "valuable" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vcpkg" @@ -2752,6 +6380,15 @@ 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 = "walkdir" version = "2.5.0" @@ -2777,28 +6414,38 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", "wasm-bindgen-shared", ] @@ -2816,9 +6463,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2826,22 +6473,52 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.100", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasmtimer" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] [[package]] name = "web-sys" @@ -2853,6 +6530,43 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "wf-cdk-bindgen" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14d3ee5d18d9ea3588e0f885fdfee9e850287c32e708418002a0f7d4ce0e6b2" +dependencies = [ + "candid", + "candid_parser", + "convert_case 0.6.0", + "pretty", +] + +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + [[package]] name = "winapi" version = "0.3.9" @@ -2884,6 +6598,50 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-link" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" + +[[package]] +name = "windows-registry" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.53.0", +] + +[[package]] +name = "windows-result" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -2899,7 +6657,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -2919,18 +6686,34 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] [[package]] @@ -2941,9 +6724,15 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" [[package]] name = "windows_aarch64_msvc" @@ -2953,9 +6742,15 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" [[package]] name = "windows_i686_gnu" @@ -2965,15 +6760,27 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" [[package]] name = "windows_i686_msvc" @@ -2983,9 +6790,15 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" [[package]] name = "windows_x86_64_gnu" @@ -2995,9 +6808,15 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" [[package]] name = "windows_x86_64_gnullvm" @@ -3007,9 +6826,15 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" [[package]] name = "windows_x86_64_msvc" @@ -3019,9 +6844,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" @@ -3033,15 +6864,60 @@ dependencies = [ ] [[package]] -name = "winreg" -version = "0.52.0" +name = "winnow" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" dependencies = [ - "cfg-if", - "windows-sys 0.48.0", + "memchr", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version 0.4.1", + "send_wrapper", + "thiserror 1.0.69", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wslpath" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04a2ecdf2cc4d33a6a93d71bcfbc00bb1f635cdb8029a2cc0709204a045ec7a3" + [[package]] name = "wyz" version = "0.5.1" @@ -3051,8 +6927,129 @@ dependencies = [ "tap", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" +dependencies = [ + "zerocopy-derive 0.8.23", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", + "synstructure", +] + [[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.100", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] diff --git a/Cargo.toml b/Cargo.toml index 4afe202..8d59996 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ members = [ "canisters/chain_fusion", "packages/evm-rpc-canister-types", "packages/ic-evm-utils", + "tests", ] resolver = "2" @@ -13,5 +14,7 @@ serde = "1.0.197" serde_bytes = "0.11.14" serde_json = "1.0.116" ethers-core = "2.0.14" -ic-evm-utils = "1.0.0" -evm-rpc-canister-types = "1.0.0" +# ic-evm-utils = { path = "packages/ic-evm-utils" } +# evm-rpc-canister-types = { path = "packages/evm-rpc-canister-types" } +ic-evm-utils = "4.0.0" +evm-rpc-canister-types = "5.0.1" diff --git a/README.md b/README.md index 826afa4..f261fbc 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ - [Overview](#overview) - [What is a Coprocessor?](#what-is-a-coprocessor) - [Why Use ICP as a Coprocessor for Ethereum?](#why-use-icp-as-a-coprocessor-for-ethereum) +- [Now with `ic-alloy`](#now-with-ic-alloy) + - [Differences from Prior Implementations](#differences-from-prior-implementations) - [Getting Started](#getting-started) - [In the Cloud](#in-the-cloud) - [Locally](#locally) @@ -58,6 +60,22 @@ Moreover, canister smart contracts have numerous capabilities that can extend sm - ~1-2 second [finality](https://internetcomputer.org/how-it-works/consensus/). - [Multi-block transactions](https://internetcomputer.org/capabilities/multi-block-transactions/). +## Now with `ic-alloy` + +The version that talks to the `evm rpc canister` directly can be found in the `evm-rpc-canister` branch. This version uses the `ic-alloy` library to interact with the EVM RPC canister. The `ic-alloy` library is a Rust library that provides a convenient way to interact with the EVMs from canister deployed on the Internet Computer + +### Differences from Prior Implementations + +- No retry logic when `max-response-size` is exceeded. + - This means you have less control over the logic to fetch logs. + - For example, when 500 blocks have been produced since you last fetched logs, you will fetch logs for all those 500 blocks. If they don't fit into the `max-response-size`, you will encounter a problem. Even when you set `max-response-size` to the maximum value (2MB), the response might still exceed this limit. +- Logs/events are not fetched for a range, and you can't provide the block number from which you'd like to start fetching. + - You only fetch from the latest block since deployment. This means you can't fetch logs/events from before the canister was deployed. +- `ic-alloy` doesn't use the Candid convenience methods provided by the `evm-rpc-canister`, but only the `request` method. This means the requests are only forwarded to a single RPC provider, and you miss out on the 3-out-of-4 consensus that the `evm-rpc-canister` provides with its convenience methods. +- Topics are now passed in their string representation when initializing the canister, e.g., `"Transfer(address,address,uint256)"`. +- `coprocess_evm_address` and `filter_addresses` are now separated in the state and must be set separately. +- You need to provide a `chain_id` explicitly when initializing the canister. + ## Getting Started To deploy the project locally, run `./deploy.sh` from the project root. This script will: @@ -86,8 +104,7 @@ Ensure the following are installed on your system: - [Node.js](https://nodejs.org/en/) `>= 21` - [Foundry](https://github.com/foundry-rs/foundry) -- [Caddy](https://caddyserver.com/docs/install#install) -- [DFX](https://internetcomputer.org/docs/current/developer-docs/build/install-upgrade-remove) `>= 0.18` +- [DFX](https://internetcomputer.org/docs/current/developer-docs/build/install-upgrade-remove) `>= 0.23` Run these commands in a new, empty project directory: @@ -145,28 +162,30 @@ function callback(string calldata _result, uint256 _job_id) public { } ``` -For local deployment, see the `deploy.sh` script and `script/Coprocessor.s.sol`. +For local deployment, see the `deploy.sh` script and `script/Coprocessor.s.sol`. The arguments to initalize the canister can be found in `initArgument.did`. ### Chain Fusion Canister -The `chain_fusion` canister listens to `NewJob` events by periodically calling the `eth_getLogs` RPC method via the [EVM RPC canister](https://github.com/internet-computer-protocol/evm-rpc-canister). Upon receiving an event, it processes the job and sends the results back to the EVM smart contract via the EVM RPC canister, signing the transaction with threshold ECDSA. +The `chain_fusion` canister listens to `NewJob` events by periodically calling the `eth_getLogs` RPC method via the [EVM RPC canister](https://github.com/internet-computer-protocol/evm-rpc-canister). Upon receiving an event, it processes the job and sends the results back to the EVM smart contract via the EVM RPC canister, signing the transaction with threshold ECDSA. The calls to the `EVM RPC canister` are abstracted away from the developer by the `ic-alloy` library. The Job processing logic is in `canisters/chain_fusion/src/job.rs`: ```rust -pub async fn job(event_source: LogSource, event: LogEntry) { - mutate_state(|s| s.record_processed_log(event_source.clone())); +pub async fn job(log_source: LogSource, log: Log) { + mutate_state(|s| s.record_processed_log(log_source.clone())); // because we deploy the canister with topics only matching // NewJob events we can safely assume that the event is a NewJob. - let new_job_event = NewJobEvent::from(event); + let new_job: Log = log.log_decode().unwrap(); + let Coprocessor::NewJob { job_id } = new_job.data(); // this calculation would likely exceed an ethereum blocks gas limit // but can easily be calculated on the IC let result = fibonacci(20); // we write the result back to the evm smart contract, creating a signature // on the transaction with chain key ecdsa and sending it to the evm via the // evm rpc canister - submit_result(result.to_string(), new_job_event.job_id).await; - println!("Successfully ran job #{:?}", &new_job_event.job_id); + submit_result(result.to_string(), *job_id).await; + // `read_result` demonstrates how to make a `eth_call` via the evm rpc canister + read_result(*job_id).await; } ``` @@ -176,7 +195,7 @@ All coprocessing logic resides in `canisters/chain_fusion/src/job.rs`. Developer ### Interacting with the EVM Smart Contract -If you want to check that the `chain_fusion` canister really processed the events, you can either look at the logs output by running `./deploy.sh` – keep an eye open for the `Successfully ran job` message – or you can call the EVM contract to get the results of the jobs. To do this, run: +If you want to check that the `chain_fusion` canister really processed the events, you can either look at the logs output by running `./deploy.sh` – keep an eye open for the `Successfully ran job` and `Result` messages – or you can call the EVM contract to get the results of the jobs. To do this, run: ```sh cast call 0x5fbdb2315678afecb367f032d93f642f64180aa3 "getResult(uint)(string)" @@ -190,7 +209,7 @@ If you want to create more jobs, simply run: cast send 0x5fbdb2315678afecb367f032d93f642f64180aa3 "newJob()" --private-key=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --value 0.01ether ``` -Note that the Chain Fusion Canister only scrapes logs every 3 minutes, so you may need to wait a few minutes before seeing the new job processed. +Note that the Chain Fusion Canister only scrapes logs every minute, so you may need to wait a bit before seeing the new job processed. ### Leveraging `storage.rs` for Stable Memory @@ -223,14 +242,14 @@ By enabling this code, you can serve web content directly from the canister, lev ### Reading from and writing to EVM Smart Contracts -To send transactions to the EVM, this project uses the [`ic-evm-utils`](https://crates.io/crates/ic-evm-utils) crate. This crate provides functionality for constructing, signing and sending transactions to EVM networks, leveraging the [`evm-rpc-canister-types`](https://crates.io/crates/evm-rpc-canister-types) crate for data types and constants. +To send transactions to the EVM, listening for events and calling contracts, this project uses the [`ic-alloy`](https://ic-alloy.dev/) crate. This crate provides functionality for constructing, signing and sending transactions to EVM networks, leveraging the well-known `alloy` library as a base. You can see examples of how it's used in `canisters/chain_fusion/src/logs.rs`, `canisters/chain_fusion/src/job/submit_result.rs` and `canisters/chain_fusion/src/job/read_result.rs`. + +If you don't want to use `ic-alloy` but directly interact with the `EVM RPC canister`, consider using the [`ic-evm-utils`](https://crates.io/crates/ic-evm-utils) crate. This crate provides functionality for constructing, signing and sending transactions to EVM networks, leveraging the [`evm-rpc-canister-types`](https://crates.io/crates/evm-rpc-canister-types) crate for data types and constants. #### Key Functions: - **sign_eip1559_transaction**: This function signs a EIP-1559 transaction. -- **eth_call**: This function sends a call to an arbitrary EVM smart contract to read data from it. It constructs a JSON-RPC call to the EVM RPC canister, which then forwards the call to the EVM smart contract. - - **erc20_balance_of**: The `erc20_balance_of` function demonstrates how to construct and send a call to an ERC20 contract to query the balance of a specific address. It uses the `eth_call` function to send the call and parse the response. You can refer to the `erc20_balance_of` function in the `eth_call.rs` module to understand how to implement similar read operations for other types of EVM smart contracts. - **send_raw_transaction**: This function sends a raw transaction to an EVM smart contract. It constructs a transaction, signs it with the canister's private key, and sends it to the EVM network. @@ -239,10 +258,44 @@ To send transactions to the EVM, this project uses the [`ic-evm-utils`](https:// - **contract_interaction**: The `contract_interaction` function demonstrates how to interact with arbitrary EVM smart contracts. It constructs a transaction based on the desired contract interaction, signs it with the canister's private key, and sends it to the EVM network. `contract_interaction` uses the `send_raw_transaction` function to send the transaction. The `submit_result` function in this starter project leverages this function to send the results of processed jobs back to the EVM smart contract. +### Testing with `ic-test` + +The project showcases the convenience tool [`ic-test`](https://github.com/wasm-forge/ic-test), which simplifies high-level canister and cross-chain testing. It automatically reads configuration from your `dfx.json` and `foundry.toml` files, then generates a `tests` project with bindings for your canister and EVM contracts. It also generates a sample test file `tests.rs` to help you get started quickly. + +#### Installation +To install the tool: +```bash +cargo install ic-test +``` + +**Note:** Currently, for the generator to work, you need to make sure the `.dfx` folder was created by `dfx` and if there are any pull dependencies, you need to call the 'pull' command: + +```bash +dfx deps pull +dfx build +``` + + +#### Regenerating bindings +If your Candid interfaces change or you update dependencies, you can regenerate the test scaffolding and bindings using: +```bash +ic-test update +``` + +The tool reads from the stored generator configuration in `ic-test.json`, which is sufficient to fully regenerate the boilerplate code. + +Finally, to launch tests, simply run: +```bash +cargo test +``` + +This makes it easy to write and run high-level integration tests that span both Internet Computer canisters and EVM smart contracts. + ## Use Cases Examples leveraging the chain fusion starter logic: +- [BOLD Autonmous Interest Rate Manager for Liquity v2 Troves](https://github.com/liquity/bold-ir-management) - [On-chain asset and metadata creation for ERC721 NFT contracts](https://github.com/letmejustputthishere/chain-fusion-nft-creator) - [Ethereum Donations Streamer](https://github.com/frederikrothenberger/chain-fusion-donations) - [Recurring Transactions on Ethereum](https://github.com/malteish/ReTransICP) diff --git a/canisters/chain_fusion/Cargo.toml b/canisters/chain_fusion/Cargo.toml index aa7d100..532cc1f 100644 --- a/canisters/chain_fusion/Cargo.toml +++ b/canisters/chain_fusion/Cargo.toml @@ -10,17 +10,19 @@ crate-type = ["cdylib"] [dependencies] candid.workspace = true -getrandom = { version = "0.2", features = ["custom"] } -hex = "0.4.3" ic-canisters-http-types = { git = "https://github.com/dfinity/ic" } ic-cdk.workspace = true -ic-cdk-timers = "0.7" +ic-cdk-timers = "0.11" ic-stable-structures = "0.6.4" minicbor = { version = "0.24.0", features = ["alloc", "derive"] } minicbor-derive = "0.15.0" serde.workspace = true serde_bytes.workspace = true serde_json.workspace = true -evm-rpc-canister-types.workspace = true -ic-evm-utils.workspace = true -ethers-core.workspace = true +alloy = { git = "https://github.com/ic-alloy/ic-alloy.git", tag = "v0.3.5-icp.1", default-features = false, features = [ + "icp", + "sol-types", + "json", + "contract", +] } +getrandom = { version = "0.2.15", features = ["custom"] } \ No newline at end of file diff --git a/canisters/chain_fusion/chain_fusion.did b/canisters/chain_fusion/chain_fusion.did index 43692ab..8755cd2 100644 --- a/canisters/chain_fusion/chain_fusion.did +++ b/canisters/chain_fusion/chain_fusion.did @@ -1,11 +1,3 @@ -type BlockTag = variant { - Earliest; - Safe; - Finalized; - Latest; - Number : nat; - Pending; -}; type EcdsaCurve = variant { secp256k1 }; type EcdsaKeyId = record { name : text; curve : EcdsaCurve }; type EthMainnetService = variant { @@ -15,20 +7,25 @@ type EthMainnetService = variant { PublicNode; Ankr; }; -type EthSepoliaService = variant { Alchemy; BlockPi; PublicNode; Ankr }; type HttpHeader = record { value : text; name : text }; type InitArg = record { ecdsa_key_id : EcdsaKeyId; - get_logs_topics : opt vec vec text; - last_scraped_block_number : nat; - rpc_services : RpcServices; - block_tag : BlockTag; - get_logs_address : vec text; + rpc_service : RpcService; + filter_addresses : vec text; + chain_id : nat64; + coprocessor_evm_address : text; + filter_events : vec text; }; +type L2MainnetService = variant { Alchemy; BlockPi; PublicNode; Ankr }; type RpcApi = record { url : text; headers : opt vec HttpHeader }; -type RpcServices = variant { - EthSepolia : opt vec EthSepoliaService; - Custom : record { chainId : nat64; services : vec RpcApi }; - EthMainnet : opt vec EthMainnetService; +type RpcService = variant { + EthSepolia : L2MainnetService; + BaseMainnet : L2MainnetService; + Custom : RpcApi; + OptimismMainnet : L2MainnetService; + ArbitrumOne : L2MainnetService; + EthMainnet : EthMainnetService; + Chain : nat64; + Provider : nat64; }; -service : (InitArg) -> { get_evm_address : () -> (text) query } +service : (InitArg) -> { get_evm_address : () -> (opt text) query } diff --git a/canisters/chain_fusion/src/job.rs b/canisters/chain_fusion/src/job.rs index 3d70da3..a1bf772 100644 --- a/canisters/chain_fusion/src/job.rs +++ b/canisters/chain_fusion/src/job.rs @@ -1,53 +1,30 @@ mod calculate_result; +mod read_result; mod submit_result; -use std::fmt; - -use ethers_core::types::U256; -use evm_rpc_canister_types::LogEntry; -use ic_cdk::println; +use alloy::rpc::types::Log; +use read_result::read_result; use submit_result::submit_result; use crate::{ job::calculate_result::fibonacci, state::{mutate_state, LogSource}, + Coprocessor, }; -pub async fn job(event_source: LogSource, event: LogEntry) { - mutate_state(|s| s.record_processed_log(event_source.clone())); +pub async fn job(log_source: LogSource, log: Log) { + mutate_state(|s| s.record_processed_log(log_source.clone())); // because we deploy the canister with topics only matching // NewJob events we can safely assume that the event is a NewJob. - let new_job_event = NewJobEvent::from(event); + let new_job: Log = log.log_decode().unwrap(); + let Coprocessor::NewJob { job_id } = new_job.data(); // this calculation would likely exceed an ethereum blocks gas limit // but can easily be calculated on the IC let result = fibonacci(20); // we write the result back to the evm smart contract, creating a signature // on the transaction with chain key ecdsa and sending it to the evm via the // evm rpc canister - submit_result(result.to_string(), new_job_event.job_id).await; - println!("Successfully ran job #{:?}", &new_job_event.job_id); -} - -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)] -pub struct NewJobEvent { - pub job_id: U256, -} - -impl fmt::Debug for NewJobEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("NewJobEvent") - .field("job_id", &self.job_id) - .finish() - } -} - -impl From for NewJobEvent { - fn from(entry: LogEntry) -> NewJobEvent { - // we expect exactly 2 topics from the NewJob event. - // you can read more about event signatures [here](https://docs.alchemy.com/docs/deep-dive-into-eth_getlogs#what-are-event-signatures) - let job_id = - U256::from_str_radix(&entry.topics[1], 16).expect("the token id should be valid"); - - NewJobEvent { job_id } - } + submit_result(result.to_string(), *job_id).await; + // `read_result` demonstrates how to make a `eth_call` via the evm rpc canister + read_result(*job_id).await; } diff --git a/canisters/chain_fusion/src/job/read_result.rs b/canisters/chain_fusion/src/job/read_result.rs new file mode 100644 index 0000000..89dc686 --- /dev/null +++ b/canisters/chain_fusion/src/job/read_result.rs @@ -0,0 +1,23 @@ +use alloy::{primitives::Uint, providers::ProviderBuilder, transports::icp::IcpConfig}; +use ic_cdk::println; + +use crate::{ + state::{read_state, State}, + Coprocessor, +}; + +pub async fn read_result(job_id: Uint<256, 4>) { + let rpc_service = read_state(|s| s.rpc_service.clone()); + let config = IcpConfig::new(rpc_service); + let provider = ProviderBuilder::new().on_icp(config); + let contract_address = read_state(State::get_filter_addresses)[0]; + let contract = Coprocessor::new(contract_address, provider); + + let response = contract.getResult(job_id).call().await; + + let result = match response { + Ok(result) => result._0, + Err(e) => panic!("{}", e.to_string()), + }; + println!("Result: {}", result); +} diff --git a/canisters/chain_fusion/src/job/submit_result.rs b/canisters/chain_fusion/src/job/submit_result.rs index cf2b073..58c5f6b 100644 --- a/canisters/chain_fusion/src/job/submit_result.rs +++ b/canisters/chain_fusion/src/job/submit_result.rs @@ -1,80 +1,73 @@ -use ethers_core::{abi::Token, types::U256}; -use evm_rpc_canister_types::{SendRawTransactionStatus, EVM_RPC}; -use ic_evm_utils::eth_send_raw_transaction::{contract_interaction, ContractDetails}; +use alloy::primitives::Uint; +use alloy::providers::Provider; +use alloy::{network::EthereumWallet, providers::ProviderBuilder, transports::icp::IcpConfig}; +use ic_cdk::println; -use crate::state::{mutate_state, read_state, State}; +use crate::state::{mutate_state, read_state}; +use crate::Coprocessor; -pub async fn submit_result(result: String, job_id: U256) { +pub async fn submit_result(result: String, job_id: Uint<256, 4>) { // get necessary global state - let contract_address = &read_state(State::get_logs_addresses)[0]; - let rpc_services = read_state(State::rpc_services); - let nonce = read_state(State::nonce); - let key_id = read_state(State::key_id); + let signer = read_state(|s| s.signer.clone()).unwrap(); + let evm_address = read_state(|s| s.canister_evm_address).unwrap(); + let wallet = EthereumWallet::new(signer); + let rpc_service = read_state(|s| s.rpc_service.clone()); + let chain_id = read_state(|s| s.chain_id); + let config = IcpConfig::new(rpc_service); + let provider = ProviderBuilder::new() + .with_gas_estimation() + .wallet(wallet) + .on_icp(config); + let contract_address = read_state(|s| s.coprocessor_evm_address); + let contract = Coprocessor::new(contract_address, provider.clone()); - let abi_json = r#" - [ - { - "type": "function", - "name": "callback", - "inputs": [ - { - "name": "_result", - "type": "string", - "internalType": "string" - }, - { - "name": "_job_id", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - } - ] - "#; + // Attempt to get nonce from thread-local storage + let maybe_nonce = read_state(|s| { + // If a nonce exists, the next nonce to use is latest nonce + 1 + s.nonce.map(|nonce| nonce + 1) + }); - let abi = - serde_json::from_str::(abi_json).expect("should serialise"); - - let contract_details = ContractDetails { - contract_address: contract_address.clone(), - abi: &abi, - function_name: "callback", - args: &[Token::String(result), Token::Uint(job_id)], + // If no nonce exists, get it from the provider + let nonce = if let Some(nonce) = maybe_nonce { + nonce + } else { + provider + .get_transaction_count(evm_address) + .await + .unwrap_or(0) }; - // set the gas - let gas = Some(U256::from(5000000)); - - // interac with the contract, this calls `eth_sendRawTransaction` under the hood - let status = contract_interaction( - contract_details, - gas, - rpc_services, - nonce, - key_id, - vec![], - EVM_RPC, - ) - .await; + match contract + .callback(result, job_id) + .nonce(nonce) + .from(evm_address) + .chain_id(chain_id) + .send() + .await + { + Ok(res) => { + let node_hash = *res.tx_hash(); + let tx_response = contract + .provider() + .get_transaction_by_hash(node_hash) + .await + .unwrap(); - // if the transaction - match status { - SendRawTransactionStatus::Ok(transaction_hash) => { - ic_cdk::println!("Success {transaction_hash:?}"); - mutate_state(|s| { - s.nonce += U256::from(1); - }); - } - SendRawTransactionStatus::NonceTooLow => { - ic_cdk::println!("Nonce too low"); - } - SendRawTransactionStatus::NonceTooHigh => { - ic_cdk::println!("Nonce too high"); + match tx_response { + Some(_tx) => { + // The transaction has been mined and included in a block, the nonce + // has been consumed. Save it to thread-local storage. Next transaction + // for this address will use a nonce that is = this nonce + 1 + mutate_state(|s| { + s.nonce = Some(nonce); + }); + println!("Successfully ran job {}, tx: {}", job_id, res.tx_hash()) + } + None => println!("{}", "Could not get transaction.".to_string()), + } } - SendRawTransactionStatus::InsufficientFunds => { - ic_cdk::println!("Insufficient funds"); + Err(e) => { + println!("{}", e.to_string()) } } } diff --git a/canisters/chain_fusion/src/lib.rs b/canisters/chain_fusion/src/lib.rs index 3205106..fec0c99 100644 --- a/canisters/chain_fusion/src/lib.rs +++ b/canisters/chain_fusion/src/lib.rs @@ -8,6 +8,7 @@ mod state; use std::time::Duration; +use alloy::{network::TxSigner, signers::icp::IcpSigner, sol}; use logs::scrape_eth_logs; use lifecycle::InitArg; @@ -15,25 +16,27 @@ use state::{read_state, State}; use crate::state::{initialize_state, mutate_state}; -pub const SCRAPING_LOGS_INTERVAL: Duration = Duration::from_secs(3 * 60); +pub const SCRAPING_LOGS_INTERVAL: Duration = Duration::from_secs(60); + +sol!( + #[sol(rpc)] + "../../contracts/Coprocessor.sol" +); fn setup_timers() { - let key_id = read_state(State::key_id); - // as timers are synchronous, we need to spawn a new async task to get the public key + let ecdsa_key_name = read_state(State::key_id).name.clone(); ic_cdk_timers::set_timer(Duration::ZERO, || { - ic_cdk::spawn(async { - let public_key = - ic_evm_utils::evm_signer::get_canister_public_key(key_id, None, vec![]).await; - let evm_address = ic_evm_utils::evm_signer::pubkey_bytes_to_address(&public_key); + ic_cdk::spawn(async move { + let signer = IcpSigner::new(vec![], &ecdsa_key_name, None).await.unwrap(); + let address = signer.address(); mutate_state(|s| { - s.ecdsa_pub_key = Some(public_key); - s.evm_address = Some(evm_address); + s.signer = Some(signer); + s.canister_evm_address = Some(address); }); }) }); // // Start scraping logs almost immediately after the install, then repeat with the interval. ic_cdk_timers::set_timer(Duration::from_secs(10), || ic_cdk::spawn(scrape_eth_logs())); - ic_cdk_timers::set_timer_interval(SCRAPING_LOGS_INTERVAL, || ic_cdk::spawn(scrape_eth_logs())); } #[ic_cdk::init] @@ -43,8 +46,8 @@ fn init(arg: InitArg) { } #[ic_cdk::query] -fn get_evm_address() -> String { - read_state(|s| s.evm_address.clone()).expect("evm address should be initialized") +fn get_evm_address() -> Option { + read_state(|s| s.canister_evm_address.map(|x| x.to_string())) } // uncomment this if you need to serve stored assets from `storage.rs` via http requests diff --git a/canisters/chain_fusion/src/lifecycle.rs b/canisters/chain_fusion/src/lifecycle.rs index a1dce98..a7045ed 100644 --- a/canisters/chain_fusion/src/lifecycle.rs +++ b/canisters/chain_fusion/src/lifecycle.rs @@ -1,21 +1,18 @@ use crate::state::{InvalidStateError, State}; -use candid::types::number::Nat; +use alloy::primitives::Address; +use alloy::transports::icp::RpcService; use candid::{CandidType, Deserialize}; -use ethers_core::types::{H256, U256}; use ic_cdk::api::management_canister::ecdsa::EcdsaKeyId; use std::str::FromStr; -use evm_rpc_canister_types::{BlockTag, RpcService, RpcServices}; - #[derive(CandidType, Deserialize, Clone, Debug)] pub struct InitArg { - pub rpc_services: RpcServices, pub rpc_service: RpcService, - pub get_logs_addresses: Vec, - pub get_logs_topics: Option>>, - pub last_scraped_block_number: Nat, + pub chain_id: u64, + pub filter_addresses: Vec, + pub coprocessor_evm_address: String, + pub filter_events: Vec, pub ecdsa_key_id: EcdsaKeyId, - pub block_tag: BlockTag, } impl TryFrom for State { @@ -23,58 +20,42 @@ impl TryFrom for State { fn try_from( InitArg { - rpc_services, rpc_service, - get_logs_addresses, - get_logs_topics, - last_scraped_block_number, + chain_id, + filter_addresses, + filter_events, + coprocessor_evm_address, ecdsa_key_id, - block_tag, }: InitArg, ) -> Result { - // validate contract addresses - for contract_address in &get_logs_addresses { - ethers_core::types::Address::from_str(contract_address).map_err(|e| { + let validated_filter_addresses: Vec
= filter_addresses + .iter() + .map(|address| { + Address::from_str(address).map_err(|e| { + InvalidStateError::InvalidEthereumContractAddress(format!("ERROR: {}", e)) + }) + }) + .collect::>()?; + + let validated_coprocessor_evm_address = Address::from_str(&coprocessor_evm_address) + .map_err(|e| { InvalidStateError::InvalidEthereumContractAddress(format!("ERROR: {}", e)) })?; - } - // validate get_logs topics - if let Some(topics) = &get_logs_topics { - for topic in topics { - validate_topics(topic)?; - } - } let state = Self { - rpc_services, rpc_service, - get_logs_addresses, - get_logs_topics, - last_scraped_block_number, - last_observed_block_number: None, + chain_id, + filter_addresses: validated_filter_addresses, + filter_events, + coprocessor_evm_address: validated_coprocessor_evm_address, logs_to_process: Default::default(), processed_logs: Default::default(), - skipped_blocks: Default::default(), active_tasks: Default::default(), - ecdsa_pub_key: None, + signer: None, ecdsa_key_id, - evm_address: None, - nonce: U256::zero(), - block_tag, + canister_evm_address: None, + nonce: None, }; Ok(state) } } - -// Function to validate a single topic -fn validate_topic(topic: &str) -> Result { - H256::from_str(topic).map_err(|e| InvalidStateError::InvalidTopic(format!("ERROR: {}", e))) -} - -// Function to validate multiple topics -fn validate_topics(topics: &Vec) -> Result<(), InvalidStateError> { - for topic in topics { - validate_topic(topic)?; - } - Ok(()) -} diff --git a/canisters/chain_fusion/src/logs.rs b/canisters/chain_fusion/src/logs.rs index ffda56c..37f0bf3 100644 --- a/canisters/chain_fusion/src/logs.rs +++ b/canisters/chain_fusion/src/logs.rs @@ -1,21 +1,14 @@ -use std::{ - cmp::{min, Ordering}, - ops::{Add, Div, Sub}, - time::Duration, -}; - -use candid::Nat; -use evm_rpc_canister_types::{ - BlockTag, GetBlockByNumberResult, GetLogsArgs, GetLogsResult, HttpOutcallError, - MultiGetBlockByNumberResult, MultiGetLogsResult, RejectionCode, RpcError, EVM_RPC, -}; -use ic_cdk::println; +use std::time::Duration; +use crate::SCRAPING_LOGS_INTERVAL; use crate::{ guard::TimerGuard, job::job, state::{mutate_state, read_state, State, TaskType}, }; +use alloy::rpc::types::Filter; +use alloy::{eips::BlockNumberOrTag, providers::Provider}; +use alloy::{providers::ProviderBuilder, rpc::types::Log, transports::icp::IcpConfig}; async fn process_logs() { let _guard = match TimerGuard::new(TaskType::ProcessLogs) { @@ -30,172 +23,43 @@ async fn process_logs() { } } -pub async fn get_logs(from: &Nat, to: &Nat) -> GetLogsResult { - let get_logs_address = read_state(|s| s.get_logs_addresses.clone()); - let get_logs_topics = read_state(|s| s.get_logs_topics.clone()); - let rpc_services = read_state(|s| s.rpc_services.clone()); - let get_logs_args: GetLogsArgs = GetLogsArgs { - fromBlock: Some(BlockTag::Number(from.clone())), - toBlock: Some(BlockTag::Number(to.clone())), - addresses: get_logs_address.to_vec(), - topics: get_logs_topics.clone(), - }; - - let cycles = 10_000_000_000; - let (result,) = EVM_RPC - .eth_get_logs(rpc_services, None, get_logs_args, cycles) - .await - .expect("Call failed"); - - match result { - MultiGetLogsResult::Consistent(r) => r, - MultiGetLogsResult::Inconsistent(_) => { - panic!("RPC providers gave inconsistent results") - } - } -} - -/// Scraps Ethereum logs between `from` and `min(from + MAX_BLOCK_SPREAD, to)` since certain RPC providers -/// require that the number of blocks queried is no greater than MAX_BLOCK_SPREAD. -/// Returns the last block number that was scraped (which is `min(from + MAX_BLOCK_SPREAD, to)`) if there -/// was no error when querying the providers, otherwise returns `None`. -async fn scrape_eth_logs_range_inclusive(from: &Nat, to: &Nat) -> Option { - /// The maximum block spread is introduced by Alchemy limits. - const MAX_BLOCK_SPREAD: u16 = 500; - match from.cmp(to) { - Ordering::Less | Ordering::Equal => { - let max_to = from.clone().add(Nat::from(MAX_BLOCK_SPREAD)); - let mut last_block_number = min(max_to, to.clone()); - - let logs = loop { - match get_logs(from, &last_block_number).await { - GetLogsResult::Ok(logs) => break logs, - GetLogsResult::Err(e) => { - println!( - "Failed to get ETH logs from block {from} to block {last_block_number}: {e:?}", - ); - match e { - RpcError::HttpOutcallError(e) => { - if e.is_response_too_large() { - if *from == last_block_number { - mutate_state(|s| { - s.record_skipped_block(last_block_number.clone()); - s.last_scraped_block_number = last_block_number.clone(); - }); - return Some(last_block_number); - } else { - let new_last_block_number = from.clone().add( - last_block_number - .clone() - .sub(from.clone()) - .div(Nat::from(2u32)), - ); - println!( "Too many logs received in range [{from}, {last_block_number}]. Will retry with range [{from}, {new_last_block_number}]"); - last_block_number = new_last_block_number; - continue; - } - } - } - _ => return None, - } - } - }; - }; - - for log_entry in logs { - mutate_state(|s| s.record_log_to_process(&log_entry)); - } - if read_state(State::has_logs_to_process) { - ic_cdk_timers::set_timer(Duration::from_secs(0), move || { - ic_cdk::spawn(process_logs()) - }); - } - mutate_state(|s| s.last_scraped_block_number = last_block_number.clone()); - Some(last_block_number) - } - Ordering::Greater => { - ic_cdk::trap(&format!( - "BUG: last scraped block number ({:?}) is greater than the last queried block number ({:?})", - from, to - )); - } - } -} - pub async fn scrape_eth_logs() { let _guard = match TimerGuard::new(TaskType::ScrapeLogs) { Ok(guard) => guard, Err(_) => return, }; - - let last_block_number = match update_last_observed_block_number().await { - Some(block_number) => block_number, - None => { - println!( - "[scrape_eth_logs]: skipping scraping ETH logs: no last observed block number" + let rpc_service = read_state(|s| s.rpc_service.clone()); + let config = IcpConfig::new(rpc_service).set_max_response_size(100_000); + let provider = ProviderBuilder::new().on_icp(config); + let addresses = read_state(State::get_filter_addresses); + let events = read_state(State::get_filter_events); + + // This callback will be called every time new logs are received + let callback = |incoming_logs: Vec| { + for log in incoming_logs.iter() { + mutate_state(|s| s.record_log_to_process(log)); + } + if read_state(State::has_logs_to_process) { + ic_cdk_timers::set_timer( + Duration::from_secs(0), + move || ic_cdk::spawn(process_logs()), ); - return; } }; - let mut last_scraped_block_number = read_state(|s| s.last_scraped_block_number.clone()); - - while last_scraped_block_number < last_block_number { - let next_block_to_query = last_scraped_block_number.add(Nat::from(1u32)); - last_scraped_block_number = - match scrape_eth_logs_range_inclusive(&next_block_to_query, &last_block_number).await { - Some(last_scraped_block_number) => last_scraped_block_number, - None => { - return; - } - }; - } -} - -async fn update_last_observed_block_number() -> Option { - let rpc_providers = read_state(|s| s.rpc_services.clone()); - let block_tag = read_state(|s| s.block_tag.clone()); - - let cycles = 10_000_000_000; - let (result,) = EVM_RPC - .eth_get_block_by_number(rpc_providers, None, block_tag, cycles) - .await - .expect("Call failed"); - - match result { - MultiGetBlockByNumberResult::Consistent(r) => match r { - GetBlockByNumberResult::Ok(latest_block) => { - let block_number = Some(latest_block.number); - mutate_state(|s| s.last_observed_block_number.clone_from(&block_number)); - block_number - } - GetBlockByNumberResult::Err(err) => { - println!("Failed to get the latest finalized block number: {err:?}"); - read_state(|s| s.last_observed_block_number.clone()) - } - }, - MultiGetBlockByNumberResult::Inconsistent(_) => { - panic!("RPC providers gave inconsistent results") - } - } -} - -trait ResponseSizeErrorCheck { - fn is_response_too_large(&self) -> bool; -} - -impl ResponseSizeErrorCheck for HttpOutcallError { - fn is_response_too_large(&self) -> bool { - match self { - Self::IcError { code, message } => is_response_too_large(code, message), - _ => false, - } - } -} - -pub fn is_response_too_large(code: &RejectionCode, message: &str) -> bool { - match code { - RejectionCode::SysFatal => message.contains("size limit"), - _ => false, - } + let filter = Filter::new() + .address(addresses) + // By specifying an `event` or `event_signature` we listen for a specific event of the + // contract. In this case the `Transfer(address,address,uint256)` event. + // .event(Coprocessor::NewJob::SIGNATURE) + .events(events) + .from_block(BlockNumberOrTag::Latest); + + // Initialize the poller and start watching + // `with_poll_interval` (optional) is used to set the interval between polls, defaults to 7 seconds + let poller = provider.watch_logs(&filter).await.unwrap(); + let _timer_id = poller + .with_poll_interval(SCRAPING_LOGS_INTERVAL) + .start(callback) + .unwrap(); } diff --git a/canisters/chain_fusion/src/state.rs b/canisters/chain_fusion/src/state.rs index 26ea60e..bbf201b 100644 --- a/canisters/chain_fusion/src/state.rs +++ b/canisters/chain_fusion/src/state.rs @@ -1,9 +1,10 @@ -use evm_rpc_canister_types::{BlockTag, LogEntry, RpcService, RpcServices}; +use alloy::primitives::{Address, FixedBytes}; +use alloy::rpc::types::Log; +use alloy::signers::icp::IcpSigner; +use alloy::transports::icp::RpcService; -use candid::Nat; -use ethers_core::types::U256; use ic_cdk::api::management_canister::ecdsa::EcdsaKeyId; -use std::collections::{BTreeMap, BTreeSet, HashSet}; +use std::collections::{BTreeMap, HashSet}; use std::cell::RefCell; @@ -13,31 +14,27 @@ thread_local! { #[derive(Debug, Clone)] pub struct State { - pub rpc_services: RpcServices, pub rpc_service: RpcService, - pub get_logs_addresses: Vec, - pub get_logs_topics: Option>>, - pub last_scraped_block_number: Nat, - pub last_observed_block_number: Option, - pub logs_to_process: BTreeMap, - pub processed_logs: BTreeMap, - pub skipped_blocks: BTreeSet, + pub chain_id: u64, + pub coprocessor_evm_address: Address, + pub filter_addresses: Vec
, + pub filter_events: Vec, + pub logs_to_process: BTreeMap, + pub processed_logs: BTreeMap, pub active_tasks: HashSet, - pub ecdsa_pub_key: Option>, + pub signer: Option, pub ecdsa_key_id: EcdsaKeyId, - pub evm_address: Option, - pub nonce: U256, - pub block_tag: BlockTag, + pub canister_evm_address: Option
, + pub nonce: Option, } #[derive(Debug, Eq, PartialEq)] pub enum InvalidStateError { InvalidEthereumContractAddress(String), - InvalidTopic(String), } impl State { - pub fn record_log_to_process(&mut self, log_entry: &LogEntry) { + pub fn record_log_to_process(&mut self, log_entry: &Log) { let event_source = log_entry.source(); assert!( !self.logs_to_process.contains_key(&event_source), @@ -61,32 +58,20 @@ impl State { ); } - pub fn record_skipped_block(&mut self, block_number: Nat) { - assert!( - self.skipped_blocks.insert(block_number.clone()), - "BUG: block {} was already skipped", - block_number - ); - } - pub fn has_logs_to_process(&self) -> bool { !self.logs_to_process.is_empty() } - pub fn rpc_services(&self) -> RpcServices { - self.rpc_services.clone() - } - pub fn key_id(&self) -> EcdsaKeyId { self.ecdsa_key_id.clone() } - pub fn get_logs_addresses(&self) -> Vec { - self.get_logs_addresses.clone() + pub fn get_filter_addresses(&self) -> Vec
{ + self.filter_addresses.clone() } - pub fn nonce(&self) -> U256 { - self.nonce + pub fn get_filter_events(&self) -> Vec { + self.filter_events.clone() } } @@ -94,16 +79,14 @@ trait IntoLogSource { fn source(&self) -> LogSource; } -impl IntoLogSource for LogEntry { +impl IntoLogSource for Log { fn source(&self) -> LogSource { LogSource { transaction_hash: self - .transactionHash - .clone() + .transaction_hash .expect("for finalized blocks logs are not pending"), log_index: self - .logIndex - .clone() + .log_index .expect("for finalized blocks logs are not pending"), } } @@ -113,8 +96,8 @@ impl IntoLogSource for LogEntry { /// entry index. #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] pub struct LogSource { - pub transaction_hash: String, - pub log_index: Nat, + pub transaction_hash: FixedBytes<32>, + pub log_index: u64, } pub fn read_state(f: impl FnOnce(&State) -> R) -> R { diff --git a/contracts/Coprocessor.sol b/contracts/Coprocessor.sol index 21ca232..11cb582 100644 --- a/contracts/Coprocessor.sol +++ b/contracts/Coprocessor.sol @@ -3,10 +3,10 @@ pragma solidity 0.8.20; contract Coprocessor { uint job_id = 0; - address payable private immutable coprocessor; + address payable private coprocessor; - constructor(address _coprocessor) { - coprocessor = payable(_coprocessor); + constructor() { + coprocessor = payable(msg.sender); } mapping(uint => string) public jobs; @@ -41,4 +41,12 @@ contract Coprocessor { ); jobs[_job_id] = _result; } + + function updateCoprocessor(address _coprocessor) public { + require( + msg.sender == coprocessor, + "Only the coprocessor can call this function" + ); + coprocessor = payable(_coprocessor); + } } diff --git a/deploy.sh b/deploy.sh index 99bc1ed..13f3546 100755 --- a/deploy.sh +++ b/deploy.sh @@ -13,11 +13,7 @@ else fi # start anvil with slots in an epoch send to 1 for faster finalised blocks -anvil --slots-in-an-epoch 1 & -# kill caddyserver -caddy stop -# start caddyserver -caddy start +anvil --silent --slots-in-an-epoch 1 & dfx stop # Find process IDs listening on port 4943 (dfx) dfx=$(lsof -t -i:4943) @@ -35,36 +31,9 @@ dfx deploy evm_rpc cargo build --release --target wasm32-unknown-unknown --package chain_fusion dfx canister create --with-cycles 10_000_000_000_000 chain_fusion # because the local smart contract deployment is deterministic, we can hardcode the -# the `get_logs_address` here. in our case we are listening for NewJob events, +# the `get_logs_address` in the initArgument.didd`. in our case we are listening for NewJob events, # you can read more about event signatures [here](https://docs.alchemy.com/docs/deep-dive-into-eth_getlogs#what-are-event-signatures) -dfx canister install --wasm target/wasm32-unknown-unknown/release/chain_fusion.wasm chain_fusion --argument '( - record { - ecdsa_key_id = record { - name = "dfx_test_key"; - curve = variant { secp256k1 }; - }; - get_logs_topics = opt vec { - vec { - "0x031ada964b8e520743eb9508d0ace62654b126430b7e5a92b42e78eebb61602e"; - }; - }; - last_scraped_block_number = 0: nat; - rpc_services = variant { - Custom = record { - chainId = 31_337 : nat64; - services = vec { record { url = "https://localhost:8546"; headers = null } }; - } - }; - rpc_service = variant { - Custom = record { - url = "https://localhost:8546"; - headers = null; - } - }; - get_logs_addresses = vec { "0x5FbDB2315678afecb367f032d93F642f64180aa3" }; - block_tag = variant { Latest = null }; - }, -)' +dfx canister install --wasm target/wasm32-unknown-unknown/release/chain_fusion.wasm chain_fusion # sleep for 3 seconds to allow the evm address to be generated sleep 3 # save the chain_fusion canisters evm address diff --git a/dfx.json b/dfx.json index 2bce810..9d28add 100644 --- a/dfx.json +++ b/dfx.json @@ -2,6 +2,7 @@ "canisters": { "chain_fusion": { "candid": "canisters/chain_fusion/chain_fusion.did", + "init_arg_file": "initArgument.did", "package": "chain_fusion", "type": "rust", "dependencies": ["evm_rpc"], @@ -14,15 +15,15 @@ }, "evm_rpc": { "type": "custom", - "candid": "https://github.com/internet-computer-protocol/evm-rpc-canister/releases/latest/download/evm_rpc.did", - "wasm": "https://github.com/internet-computer-protocol/evm-rpc-canister/releases/latest/download/evm_rpc.wasm.gz", + "candid": "https://github.com/dfinity/evm-rpc-canister/releases/latest/download/evm_rpc.did", + "wasm": "https://github.com/dfinity/evm-rpc-canister/releases/latest/download/evm_rpc.wasm.gz", "remote": { "id": { "ic": "7hfb6-caaaa-aaaar-qadga-cai" } }, "specified_id": "7hfb6-caaaa-aaaar-qadga-cai", - "init_arg": "(record { nodesInSubnet = 28 })" + "init_arg": "(record { logFilter = opt variant { HideAll }})" } }, "defaults": { diff --git a/ic-test.json b/ic-test.json new file mode 100644 index 0000000..d8846ff --- /dev/null +++ b/ic-test.json @@ -0,0 +1,38 @@ +{ + "test_folder": "tests", + "icp_setup": { + "dfx_json": "dfx.json", + "skip_dfx_json": false, + "canisters": { + "evm_rpc": { + "name": "evm_rpc", + "var_name": "evm_rpc", + "service_name": "EvmRpcCanister", + "candid": ".dfx/local/canisters/evm_rpc/constructor.did", + "wasm": "./.dfx/local/canisters/evm_rpc/evm_rpc.wasm.gz", + "specified_id": "7hfb6-caaaa-aaaar-qadga-cai" + }, + "chain_fusion": { + "name": "chain_fusion", + "var_name": "chain_fusion", + "service_name": "ChainFusionCanister", + "candid": ".dfx/local/canisters/chain_fusion/constructor.did", + "wasm": "./.dfx/local/canisters/chain_fusion/chain_fusion.wasm", + "specified_id": "2222s-4iaaa-aaaaf-ax2uq-cai" + } + } + }, + "evm_setup": { + "foundry_toml": "foundry.toml", + "skip_foundry_toml": false, + "foundry_src": "contracts", + "foundry_out": "out", + "contracts": { + "Coprocessor": { + "name": "Coprocessor", + "var_name": "coprocessor", + "sol_json": "out/Coprocessor.sol/Coprocessor.json" + } + } + } +} \ No newline at end of file diff --git a/initArgument.did b/initArgument.did new file mode 100644 index 0000000..f4e458d --- /dev/null +++ b/initArgument.did @@ -0,0 +1,28 @@ +( + record { + // ecdsa_key_id specifies the threshold key to use for signing transactions. + // currently, it is set to the key only present when running dfx locally. + ecdsa_key_id = record { + name = "dfx_test_key"; + curve = variant { secp256k1 }; + }; + // rpc_service specifies the RPC service to use for interacting with the EVM. + // because we're using `anvil` to simulate the EVM locally, we use the default + // URL for the `anvil` service. + rpc_service = variant { + Custom = record { + url = "http://localhost:8545"; + headers = null; + } + }; + // filter_addresses specifies the contract addresses we'd like to listen on for events + filter_addresses = vec { "0x5FbDB2315678afecb367f032d93F642f64180aa3" }; + // chain_id specifies the chain ID of the EVM we're interacting with. locally for anvil this is 31337. + chain_id = 31337 : nat64; + // coprocessor_evm_address specifies the contract address of the EVM coprocessor smart contract. + // this is the adress of the contract we interact with to send transactions to the EVM. + coprocessor_evm_address = "0x5FbDB2315678afecb367f032d93F642f64180aa3"; + // `filter_events` specifies the events we'd like to listen to on the EVM on the `filter_addresses`. + filter_events = vec { "NewJob(uint256)" }; + } +) diff --git a/packages/evm-rpc-canister-types/CHANGELOG.md b/packages/evm-rpc-canister-types/CHANGELOG.md new file mode 100644 index 0000000..6759cf3 --- /dev/null +++ b/packages/evm-rpc-canister-types/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [4.0.0] - 2025-01-23 + +### Added +- updated evm rpc canister interface according to [latest release](https://github.com/dfinity/evm-rpc-canister/releases/tag/v2.2.0) \ No newline at end of file diff --git a/packages/evm-rpc-canister-types/Cargo.toml b/packages/evm-rpc-canister-types/Cargo.toml index 112113a..37ac56e 100644 --- a/packages/evm-rpc-canister-types/Cargo.toml +++ b/packages/evm-rpc-canister-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "evm-rpc-canister-types" -version = "1.0.0" +version = "5.0.1" edition = "2021" readme = "README.md" authors = ["Moritz Fuller moritz.fuller@dfinity.org"] @@ -20,10 +20,10 @@ keywords = [ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -candid.workspace = true candid_parser = "0.1.4" -ic-cdk.workspace = true reqwest = { version = "0.12", features = ["blocking", "json"] } +candid.workspace = true +ic-cdk.workspace = true serde.workspace = true serde_bytes.workspace = true serde_json.workspace = true diff --git a/packages/evm-rpc-canister-types/README.md b/packages/evm-rpc-canister-types/README.md index effe706..fd7efb1 100644 --- a/packages/evm-rpc-canister-types/README.md +++ b/packages/evm-rpc-canister-types/README.md @@ -1,6 +1,7 @@ # How was this library created? - used `didc` to generate the rust bindings from the evm rpc canister did file + - `didc bind --target rs evm_rpc.did > interface.rs` - added `call_with_payment128` to functions that expect cycles - derive `Debug` and `Clone` trait for types for convenience @@ -18,7 +19,7 @@ } }, "specified_id": "7hfb6-caaaa-aaaar-qadga-cai", - "init_arg": "(record { nodesInSubnet = 28 })" + "init_arg": "(record { logFilter = opt variant { HideAll }})" } ``` - if you deploy your own evm rpc canister, you can use the `EvmRpcCanister` struct to initiate the canister with your own canister id diff --git a/packages/evm-rpc-canister-types/evm_rpc.did b/packages/evm-rpc-canister-types/evm_rpc.did index 8cd1014..dac148e 100644 --- a/packages/evm-rpc-canister-types/evm_rpc.did +++ b/packages/evm-rpc-canister-types/evm_rpc.did @@ -1,14 +1,13 @@ -type Auth = variant { FreeRpc; PriorityRpc; RegisterProvider; Manage }; type Block = record { miner : text; - totalDifficulty : nat; + totalDifficulty : opt nat; receiptsRoot : text; stateRoot : text; hash : text; - difficulty : nat; + difficulty : opt nat; size : nat; uncles : vec text; - baseFeePerGas : nat; + baseFeePerGas : opt nat; extraData : text; transactionsRoot : opt text; sha3Uncles : text; @@ -36,18 +35,21 @@ type EthMainnetService = variant { BlockPi; Cloudflare; PublicNode; + Llama; }; type EthSepoliaService = variant { Alchemy; Ankr; BlockPi; PublicNode; + Sepolia; }; type L2MainnetService = variant { Alchemy; Ankr; BlockPi; PublicNode; + Llama; }; type FeeHistory = record { reward : vec vec nat; @@ -67,6 +69,31 @@ type GetLogsArgs = record { topics : opt vec Topic; }; type GetTransactionCountArgs = record { address : text; block : BlockTag }; +type CallArgs = record { + transaction : TransactionRequest; + block : opt BlockTag; +}; +type TransactionRequest = record { + "type" : opt text; + nonce : opt nat; + to : opt text; + from : opt text; + gas : opt nat; + value : opt nat; + input : opt text; + gasPrice : opt nat; + maxPriorityFeePerGas : opt nat; + maxFeePerGas : opt nat; + maxFeePerBlobGas : opt nat; + accessList: opt vec AccessListEntry; + blobVersionedHashes : opt vec text; + blobs : opt vec text; + chainId : opt nat; +}; +type AccessListEntry = record { + address : text; + storageKeys : vec text; +}; type HttpHeader = record { value : text; name : text }; type HttpOutcallError = variant { IcError : record { code : RejectionCode; message : text }; @@ -76,8 +103,28 @@ type HttpOutcallError = variant { parsingError : opt text; }; }; -type InitArgs = record { - nodesInSubnet : nat32; +type InstallArgs = record { + demo : opt bool; + manageApiKeys : opt vec principal; + logFilter : opt LogFilter; + overrideProvider : opt OverrideProvider; + nodesInSubnet : opt nat32; +}; +type Regex = text; +type LogFilter = variant { + ShowAll; + HideAll; + ShowPattern : Regex; + HidePattern : Regex; +}; +type RegexSubstitution = record { + pattern : Regex; + replacement: text; +}; +// Override resolved provider. +// Useful for testing with a local Ethereum developer environment such as foundry. +type OverrideProvider = record { + overrideUrl : opt RegexSubstitution }; type JsonRpcError = record { code : int64; message : text }; type LogEntry = record { @@ -91,20 +138,12 @@ type LogEntry = record { logIndex : opt nat; removed : bool; }; -type ManageProviderArgs = record { - providerId : nat64; - "service" : opt RpcService; - primary : opt bool; -}; type Metrics = record { requests : vec record { record { text; text }; nat64 }; responses : vec record { record { text; text; text }; nat64 }; inconsistentResponses : vec record { record { text; text }; nat64 }; cyclesCharged : vec record { record { text; text }; nat }; - cyclesWithdrawn : nat; - errNoPermission : nat64; - errHttpOutcall : vec record { record { text; text }; nat64 }; - errHostNotAllowed : vec record { text; nat64 }; + errHttpOutcall : vec record { record { text; text; RejectionCode }; nat64 }; }; type MultiFeeHistoryResult = variant { Consistent : FeeHistoryResult; @@ -130,29 +169,37 @@ type MultiSendRawTransactionResult = variant { Consistent : SendRawTransactionResult; Inconsistent : vec record { RpcService; SendRawTransactionResult }; }; +type MultiCallResult = variant { + Consistent : CallResult; + Inconsistent : vec record { RpcService; CallResult }; +}; type ProviderError = variant { TooFewCycles : record { expected : nat; received : nat }; MissingRequiredProvider; ProviderNotFound; NoPermission; + InvalidRpcConfig : text ; }; type ProviderId = nat64; -type ProviderView = record { - cyclesPerCall : nat64; - owner : principal; - hostname : text; - primary : bool; - chainId : nat64; - cyclesPerMessageByte : nat64; - providerId : nat64; -}; -type RegisterProviderArgs = record { - cyclesPerCall : nat64; - credentialPath : text; - hostname : text; - credentialHeaders : opt vec HttpHeader; - chainId : nat64; - cyclesPerMessageByte : nat64; +type ChainId = nat64; +type Provider = record { + providerId : ProviderId; + chainId : ChainId; + access : RpcAccess; + alias : opt RpcService; +}; +type RpcAccess = variant { + Authenticated : record { + auth : RpcAuth; + publicUrl : opt text; + }; + Unauthenticated : record { + publicUrl : text; + }; +}; +type RpcAuth = variant { + BearerToken : record { url : text }; + UrlParameter : record { urlPattern : text }; }; type RejectionCode = variant { NoError; @@ -163,7 +210,7 @@ type RejectionCode = variant { SysFatal; CanisterReject; }; -type FeeHistoryResult = variant { Ok : opt FeeHistory; Err : RpcError }; +type FeeHistoryResult = variant { Ok : FeeHistory; Err : RpcError }; type GetBlockByNumberResult = variant { Ok : Block; Err : RpcError }; type GetLogsResult = variant { Ok : vec LogEntry; Err : RpcError }; type GetTransactionCountResult = variant { Ok : nat; Err : RpcError }; @@ -175,9 +222,19 @@ type SendRawTransactionResult = variant { Ok : SendRawTransactionStatus; Err : RpcError; }; +type CallResult = variant { Ok : text; Err : RpcError }; type RequestResult = variant { Ok : text; Err : RpcError }; type RequestCostResult = variant { Ok : nat; Err : RpcError }; -type RpcConfig = record { responseSizeEstimate : opt nat64 }; +type RpcConfig = record { responseSizeEstimate : opt nat64; responseConsensus : opt ConsensusStrategy }; +type ConsensusStrategy = variant { + Equality; + Threshold : record { + // Total number of providers to be queried. Can be omitted, if that number can be inferred (e.g., providers are specified in the request). + total : opt nat8; + // Minimum number of providers that must return the same (non-error) result. + min : nat8; + }; +}; type RpcError = variant { JsonRpcError : JsonRpcError; ProviderError : ProviderError; @@ -186,8 +243,7 @@ type RpcError = variant { }; type RpcApi = record { url : text; headers : opt vec HttpHeader }; type RpcService = variant { - Chain : nat64; - Provider : nat64; + Provider : ProviderId; Custom : RpcApi; EthSepolia : EthSepoliaService; EthMainnet : EthMainnetService; @@ -197,7 +253,7 @@ type RpcService = variant { }; type RpcServices = variant { Custom : record { - chainId : nat64; + chainId : ChainId; services : vec RpcApi; }; EthSepolia : opt vec EthSepoliaService; @@ -216,8 +272,8 @@ type SendRawTransactionStatus = variant { // See https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs type Topic = vec text; type TransactionReceipt = record { - to : text; - status : nat; + to : opt text; + status : opt nat; transactionHash : text; blockNumber : nat; from : text; @@ -230,47 +286,26 @@ type TransactionReceipt = record { contractAddress : opt text; gasUsed : nat; }; -type UpdateProviderArgs = record { - cyclesPerCall : opt nat64; - credentialPath : opt text; - hostname : opt text; - credentialHeaders : opt vec HttpHeader; - primary : opt bool; - cyclesPerMessageByte : opt nat64; - providerId : nat64; -}; type ValidationError = variant { Custom : text; - HostNotAllowed : text; - UrlParseError : text; InvalidHex : text; - CredentialPathNotAllowed; - CredentialHeaderNotAllowed; }; -service : (InitArgs) -> { - authorize : (principal, Auth) -> (success : bool); - deauthorize : (principal, Auth) -> (success : bool); +service : (InstallArgs) -> { eth_feeHistory : (RpcServices, opt RpcConfig, FeeHistoryArgs) -> (MultiFeeHistoryResult); eth_getBlockByNumber : (RpcServices, opt RpcConfig, BlockTag) -> (MultiGetBlockByNumberResult); eth_getLogs : (RpcServices, opt RpcConfig, GetLogsArgs) -> (MultiGetLogsResult); - eth_getTransactionCount : (RpcServices, opt RpcConfig, GetTransactionCountArgs) -> ( - MultiGetTransactionCountResult - ); + eth_getTransactionCount : (RpcServices, opt RpcConfig, GetTransactionCountArgs) -> (MultiGetTransactionCountResult); eth_getTransactionReceipt : (RpcServices, opt RpcConfig, hash : text) -> (MultiGetTransactionReceiptResult); eth_sendRawTransaction : (RpcServices, opt RpcConfig, rawSignedTransactionHex : text) -> (MultiSendRawTransactionResult); - getAccumulatedCycleCount : (ProviderId) -> (cycles : nat) query; - getAuthorized : (Auth) -> (vec principal) query; - getMetrics : () -> (Metrics) query; - getNodesInSubnet : () -> (numberOfNodes : nat32) query; - getOpenRpcAccess : () -> (active : bool) query; - getProviders : () -> (vec ProviderView) query; - getServiceProviderMap : () -> (vec record { RpcService; nat64 }) query; - manageProvider : (ManageProviderArgs) -> (); - registerProvider : (RegisterProviderArgs) -> (nat64); + eth_call : (RpcServices, opt RpcConfig, CallArgs) -> (MultiCallResult); request : (RpcService, json : text, maxResponseBytes : nat64) -> (RequestResult); requestCost : (RpcService, json : text, maxResponseBytes : nat64) -> (RequestCostResult) query; - setOpenRpcAccess : (active : bool) -> (); - unregisterProvider : (ProviderId) -> (bool); - updateProvider : (UpdateProviderArgs) -> (); - withdrawAccumulatedCycles : (ProviderId, recipient : principal) -> (); + + // DEBUG endpoint to retrieve metrics accumulated by the EVM RPC canister. + // NOTE: this method exists for debugging purposes, backward compatibility is not guaranteed. + getMetrics : () -> (Metrics) query; + getNodesInSubnet : () -> (numberOfNodes : nat32) query; + getProviders : () -> (vec Provider) query; + getServiceProviderMap : () -> (vec record { RpcService; ProviderId }) query; + updateApiKeys : (vec record { ProviderId; opt text }) -> (); }; diff --git a/packages/evm-rpc-canister-types/src/lib.rs b/packages/evm-rpc-canister-types/src/lib.rs index f1c83e9..89b8e0e 100644 --- a/packages/evm-rpc-canister-types/src/lib.rs +++ b/packages/evm-rpc-canister-types/src/lib.rs @@ -2,17 +2,33 @@ use candid::{self, CandidType, Deserialize, Principal}; use ic_cdk::api::call::{call_with_payment128, CallResult as Result}; +pub type Regex = String; #[derive(CandidType, Deserialize, Debug, Clone)] -pub struct InitArgs { - pub nodesInSubnet: u32, +pub enum LogFilter { + ShowAll, + HideAll, + ShowPattern(Regex), + HidePattern(Regex), } #[derive(CandidType, Deserialize, Debug, Clone)] -pub enum Auth { - RegisterProvider, - FreeRpc, - PriorityRpc, - Manage, +pub struct RegexSubstitution { + pub pattern: Regex, + pub replacement: String, +} + +#[derive(CandidType, Deserialize, Debug, Clone)] +pub struct OverrideProvider { + pub overrideUrl: Option, +} + +#[derive(CandidType, Deserialize, Debug, Clone)] +pub struct InstallArgs { + pub logFilter: Option, + pub demo: Option, + pub manageApiKeys: Option>, + pub overrideProvider: Option, + pub nodesInSubnet: Option, } #[derive(CandidType, Deserialize, Debug, Clone)] @@ -21,16 +37,19 @@ pub enum EthSepoliaService { BlockPi, PublicNode, Ankr, + Sepolia, } #[derive(CandidType, Deserialize, Debug, Clone)] pub enum L2MainnetService { Alchemy, + Llama, BlockPi, PublicNode, Ankr, } +pub type ChainId = u64; #[derive(CandidType, Deserialize, Debug, Clone)] pub struct HttpHeader { pub value: String, @@ -46,6 +65,7 @@ pub struct RpcApi { #[derive(CandidType, Deserialize, Debug, Clone)] pub enum EthMainnetService { Alchemy, + Llama, BlockPi, Cloudflare, PublicNode, @@ -56,17 +76,52 @@ pub enum EthMainnetService { pub enum RpcServices { EthSepolia(Option>), BaseMainnet(Option>), - Custom { chainId: u64, services: Vec }, + Custom { + chainId: ChainId, + services: Vec, + }, OptimismMainnet(Option>), ArbitrumOne(Option>), EthMainnet(Option>), } +#[derive(CandidType, Deserialize, Debug, Clone)] +pub enum ConsensusStrategy { + Equality, + Threshold { min: u8, total: Option }, +} + #[derive(CandidType, Deserialize, Debug, Clone)] pub struct RpcConfig { + pub responseConsensus: Option, pub responseSizeEstimate: Option, } +#[derive(CandidType, Deserialize, Debug, Clone)] +pub struct AccessListEntry { + pub storageKeys: Vec, + pub address: String, +} + +#[derive(CandidType, Deserialize, Debug, Clone, Default)] +pub struct TransactionRequest { + pub to: Option, + pub gas: Option, + pub maxFeePerGas: Option, + pub gasPrice: Option, + pub value: Option, + pub maxFeePerBlobGas: Option, + pub from: Option, + pub r#type: Option, + pub accessList: Option>, + pub nonce: Option, + pub maxPriorityFeePerGas: Option, + pub blobs: Option>, + pub input: Option, + pub chainId: Option, + pub blobVersionedHashes: Option>, +} + #[derive(CandidType, Deserialize, Debug, Clone)] pub enum BlockTag { Earliest, @@ -78,18 +133,9 @@ pub enum BlockTag { } #[derive(CandidType, Deserialize, Debug, Clone)] -pub struct FeeHistoryArgs { - pub blockCount: candid::Nat, - pub newestBlock: BlockTag, - pub rewardPercentiles: Option, -} - -#[derive(CandidType, Deserialize, Debug, Clone)] -pub struct FeeHistory { - pub reward: Vec>, - pub gasUsedRatio: Vec, - pub oldestBlock: candid::Nat, - pub baseFeePerGas: Vec, +pub struct CallArgs { + pub transaction: TransactionRequest, + pub block: Option, } #[derive(CandidType, Deserialize, Debug, Clone)] @@ -104,6 +150,7 @@ pub enum ProviderError { expected: candid::Nat, received: candid::Nat, }, + InvalidRpcConfig(String), MissingRequiredProvider, ProviderNotFound, NoPermission, @@ -111,10 +158,6 @@ pub enum ProviderError { #[derive(CandidType, Deserialize, Debug, Clone)] pub enum ValidationError { - CredentialPathNotAllowed, - HostNotAllowed(String), - CredentialHeaderNotAllowed, - UrlParseError(String), Custom(String), InvalidHex(String), } @@ -152,11 +195,12 @@ pub enum RpcError { } #[derive(CandidType, Deserialize, Debug, Clone)] -pub enum FeeHistoryResult { - Ok(Option), +pub enum CallResult { + Ok(String), Err(RpcError), } +pub type ProviderId = u64; #[derive(CandidType, Deserialize, Debug, Clone)] pub enum RpcService { EthSepolia(EthSepoliaService), @@ -165,8 +209,34 @@ pub enum RpcService { OptimismMainnet(L2MainnetService), ArbitrumOne(L2MainnetService), EthMainnet(EthMainnetService), - Chain(u64), - Provider(u64), + Provider(ProviderId), +} + +#[derive(CandidType, Deserialize, Debug, Clone)] +pub enum MultiCallResult { + Consistent(CallResult), + Inconsistent(Vec<(RpcService, CallResult)>), +} + +#[derive(CandidType, Deserialize, Debug, Clone)] +pub struct FeeHistoryArgs { + pub blockCount: candid::Nat, + pub newestBlock: BlockTag, + pub rewardPercentiles: Option, +} + +#[derive(CandidType, Deserialize, Debug, Clone)] +pub struct FeeHistory { + pub reward: Vec>, + pub gasUsedRatio: Vec, + pub oldestBlock: candid::Nat, + pub baseFeePerGas: Vec, +} + +#[derive(CandidType, Deserialize, Debug, Clone)] +pub enum FeeHistoryResult { + Ok(FeeHistory), + Err(RpcError), } #[derive(CandidType, Deserialize, Debug, Clone)] @@ -178,14 +248,14 @@ pub enum MultiFeeHistoryResult { #[derive(CandidType, Deserialize, Debug, Clone)] pub struct Block { pub miner: String, - pub totalDifficulty: candid::Nat, + pub totalDifficulty: Option, pub receiptsRoot: String, pub stateRoot: String, pub hash: String, - pub difficulty: candid::Nat, + pub difficulty: Option, pub size: candid::Nat, pub uncles: Vec, - pub baseFeePerGas: candid::Nat, + pub baseFeePerGas: Option, pub extraData: String, pub transactionsRoot: Option, pub sha3Uncles: String, @@ -266,8 +336,8 @@ pub enum MultiGetTransactionCountResult { #[derive(CandidType, Deserialize, Debug, Clone)] pub struct TransactionReceipt { - pub to: String, - pub status: candid::Nat, + pub to: Option, + pub status: Option, pub transactionHash: String, pub blockNumber: candid::Nat, pub from: String, @@ -313,45 +383,38 @@ pub enum MultiSendRawTransactionResult { Inconsistent(Vec<(RpcService, SendRawTransactionResult)>), } -pub type ProviderId = u64; #[derive(CandidType, Deserialize, Debug, Clone)] pub struct Metrics { - pub cyclesWithdrawn: candid::Nat, pub responses: Vec<((String, String, String), u64)>, - pub errNoPermission: u64, pub inconsistentResponses: Vec<((String, String), u64)>, pub cyclesCharged: Vec<((String, String), candid::Nat)>, pub requests: Vec<((String, String), u64)>, - pub errHttpOutcall: Vec<((String, String), u64)>, - pub errHostNotAllowed: Vec<(String, u64)>, + pub errHttpOutcall: Vec<((String, String, RejectionCode), u64)>, } #[derive(CandidType, Deserialize, Debug, Clone)] -pub struct ProviderView { - pub cyclesPerCall: u64, - pub owner: Principal, - pub hostname: String, - pub primary: bool, - pub chainId: u64, - pub cyclesPerMessageByte: u64, - pub providerId: u64, +pub enum RpcAuth { + BearerToken { url: String }, + UrlParameter { urlPattern: String }, } #[derive(CandidType, Deserialize, Debug, Clone)] -pub struct ManageProviderArgs { - pub service: Option, - pub primary: Option, - pub providerId: u64, +pub enum RpcAccess { + Authenticated { + publicUrl: Option, + auth: RpcAuth, + }, + Unauthenticated { + publicUrl: String, + }, } #[derive(CandidType, Deserialize, Debug, Clone)] -pub struct RegisterProviderArgs { - pub cyclesPerCall: u64, - pub credentialPath: String, - pub hostname: String, - pub credentialHeaders: Option>, - pub chainId: u64, - pub cyclesPerMessageByte: u64, +pub struct Provider { + pub access: RpcAccess, + pub alias: Option, + pub chainId: ChainId, + pub providerId: ProviderId, } #[derive(CandidType, Deserialize, Debug, Clone)] @@ -366,25 +429,17 @@ pub enum RequestCostResult { Err(RpcError), } -#[derive(CandidType, Deserialize, Debug, Clone)] -pub struct UpdateProviderArgs { - pub cyclesPerCall: Option, - pub credentialPath: Option, - pub hostname: Option, - pub credentialHeaders: Option>, - pub primary: Option, - pub cyclesPerMessageByte: Option, - pub providerId: u64, -} - #[derive(Debug, Clone)] pub struct EvmRpcCanister(pub Principal); impl EvmRpcCanister { - pub async fn authorize(&self, arg0: Principal, arg1: Auth) -> Result<(bool,)> { - ic_cdk::call(self.0, "authorize", (arg0, arg1)).await - } - pub async fn deauthorize(&self, arg0: Principal, arg1: Auth) -> Result<(bool,)> { - ic_cdk::call(self.0, "deauthorize", (arg0, arg1)).await + pub async fn eth_call( + &self, + arg0: RpcServices, + arg1: Option, + arg2: CallArgs, + cycles: u128, + ) -> Result<(MultiCallResult,)> { + call_with_payment128(self.0, "eth_call", (arg0, arg1, arg2), cycles).await } pub async fn eth_fee_history( &self, @@ -452,33 +507,18 @@ impl EvmRpcCanister { ) -> Result<(MultiSendRawTransactionResult,)> { call_with_payment128(self.0, "eth_sendRawTransaction", (arg0, arg1, arg2), cycles).await } - pub async fn get_accumulated_cycle_count(&self, arg0: ProviderId) -> Result<(candid::Nat,)> { - ic_cdk::call(self.0, "getAccumulatedCycleCount", (arg0,)).await - } - pub async fn get_authorized(&self, arg0: Auth) -> Result<(Vec,)> { - ic_cdk::call(self.0, "getAuthorized", (arg0,)).await - } pub async fn get_metrics(&self) -> Result<(Metrics,)> { ic_cdk::call(self.0, "getMetrics", ()).await } pub async fn get_nodes_in_subnet(&self) -> Result<(u32,)> { ic_cdk::call(self.0, "getNodesInSubnet", ()).await } - pub async fn get_open_rpc_access(&self) -> Result<(bool,)> { - ic_cdk::call(self.0, "getOpenRpcAccess", ()).await - } - pub async fn get_providers(&self) -> Result<(Vec,)> { + pub async fn get_providers(&self) -> Result<(Vec,)> { ic_cdk::call(self.0, "getProviders", ()).await } - pub async fn get_service_provider_map(&self) -> Result<(Vec<(RpcService, u64)>,)> { + pub async fn get_service_provider_map(&self) -> Result<(Vec<(RpcService, ProviderId)>,)> { ic_cdk::call(self.0, "getServiceProviderMap", ()).await } - pub async fn manage_provider(&self, arg0: ManageProviderArgs) -> Result<()> { - ic_cdk::call(self.0, "manageProvider", (arg0,)).await - } - pub async fn register_provider(&self, arg0: RegisterProviderArgs) -> Result<(u64,)> { - ic_cdk::call(self.0, "registerProvider", (arg0,)).await - } pub async fn request( &self, arg0: RpcService, @@ -496,21 +536,8 @@ impl EvmRpcCanister { ) -> Result<(RequestCostResult,)> { ic_cdk::call(self.0, "requestCost", (arg0, arg1, arg2)).await } - pub async fn set_open_rpc_access(&self, arg0: bool) -> Result<()> { - ic_cdk::call(self.0, "setOpenRpcAccess", (arg0,)).await - } - pub async fn unregister_provider(&self, arg0: ProviderId) -> Result<(bool,)> { - ic_cdk::call(self.0, "unregisterProvider", (arg0,)).await - } - pub async fn update_provider(&self, arg0: UpdateProviderArgs) -> Result<()> { - ic_cdk::call(self.0, "updateProvider", (arg0,)).await - } - pub async fn withdraw_accumulated_cycles( - &self, - arg0: ProviderId, - arg1: Principal, - ) -> Result<()> { - ic_cdk::call(self.0, "withdrawAccumulatedCycles", (arg0, arg1)).await + pub async fn update_api_keys(&self, arg0: Vec<(ProviderId, Option)>) -> Result<()> { + ic_cdk::call(self.0, "updateApiKeys", (arg0,)).await } } @@ -519,6 +546,7 @@ pub const CANISTER_ID: Principal = pub const EVM_RPC: EvmRpcCanister = EvmRpcCanister(CANISTER_ID); #[test] +// #[ignore = "existing candid mismatch"] fn test_candid_interface() { fn source_to_str(source: &candid_parser::utils::CandidSource) -> String { match source { @@ -555,9 +583,12 @@ fn test_candid_interface() { // fetch public interface from github let client = reqwest::blocking::Client::new(); - let new_interface = client.get("https://github.com/internet-computer-protocol/evm-rpc-canister/releases/latest/download/evm_rpc.did") - .send().unwrap() - .text().unwrap(); + let new_interface = client + .get("https://github.com/dfinity/evm-rpc-canister/releases/latest/download/evm_rpc.did") + .send() + .unwrap() + .text() + .unwrap(); // check the public interface against the actual one let old_interface = diff --git a/packages/ic-evm-utils/CHANGELOG.md b/packages/ic-evm-utils/CHANGELOG.md new file mode 100644 index 0000000..a441c48 --- /dev/null +++ b/packages/ic-evm-utils/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [4.0.0] - 2025-01-23 + +### Added +- updated logic to handle latest `FeeHistory` type changes +- removed `eth_call` function as it's handled by the `EVM RPC Canister` natively and no longer needed \ No newline at end of file diff --git a/packages/ic-evm-utils/Cargo.toml b/packages/ic-evm-utils/Cargo.toml index 674d34d..c87973c 100644 --- a/packages/ic-evm-utils/Cargo.toml +++ b/packages/ic-evm-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ic-evm-utils" -version = "1.0.0" +version = "4.0.0" edition = "2021" readme = "README.md" authors = ["Moritz Fuller moritz.fuller@dfinity.org"] @@ -19,11 +19,11 @@ keywords = [ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +num-traits = "0.2.19" candid.workspace = true ic-cdk.workspace = true serde.workspace = true serde_bytes.workspace = true serde_json.workspace = true ethers-core.workspace = true -num-traits = "0.2.19" evm-rpc-canister-types.workspace = true diff --git a/packages/ic-evm-utils/src/eth_call.rs b/packages/ic-evm-utils/src/eth_call.rs index 7bc350e..acb6148 100644 --- a/packages/ic-evm-utils/src/eth_call.rs +++ b/packages/ic-evm-utils/src/eth_call.rs @@ -5,10 +5,11 @@ use ethers_core::utils::hex; use hex::FromHexError; use serde::{Deserialize, Serialize}; -use evm_rpc_canister_types::{EvmRpcCanister, RequestResult, RpcService}; +use evm_rpc_canister_types::{ + CallArgs, CallResult, EvmRpcCanister, MultiCallResult, RpcServices, TransactionRequest, +}; use crate::eth_send_raw_transaction::{get_data, get_function, ContractDetails}; -use crate::request::{request, JsonRpcResult}; /// Represents the parameters for an Ethereum call. #[derive(Clone, Debug, Serialize, Deserialize)] @@ -26,57 +27,6 @@ pub struct EthCallJsonRpcRequest { pub params: (EthCallParams, String), } -/// Executes an Ethereum call. -/// -/// # Arguments -/// -/// * `contract_details` - The details of the contract to call. -/// * `block_number` - The block number to execute the call on. -/// * `rpc_service` - The RPC service to use for the call. -/// * `max_response_bytes` - The maximum number of response bytes to accept. -/// * `evm_rpc` - The EVM RPC canister. -/// -/// # Returns -/// -/// The decoded output of the call as a vector of tokens. -pub async fn eth_call( - contract_details: ContractDetails<'_>, - block_number: &str, - rpc_service: RpcService, - max_response_bytes: u64, - evm_rpc: EvmRpcCanister, -) -> Vec { - let function = get_function(&contract_details); - let data = get_data(function, &contract_details); - let json_rpc_payload = serde_json::to_string(&EthCallJsonRpcRequest { - id: 1, - jsonrpc: "2.0".to_string(), - method: "eth_call".to_string(), - params: ( - EthCallParams { - to: contract_details.contract_address.clone(), - data: to_hex(&data), - }, - block_number.to_string(), - ), - }) - .expect("Error while encoding JSON-RPC request"); - - let res = request(rpc_service, json_rpc_payload, max_response_bytes, evm_rpc).await; - - match res { - RequestResult::Ok(ok) => { - let json: JsonRpcResult = - serde_json::from_str(&ok).expect("JSON was not well-formatted"); - let result = from_hex(&json.result.expect("Unexpected JSON response")).unwrap(); - function - .decode_output(&result) - .expect("Error decoding output") - } - RequestResult::Err(err) => panic!("Response error: {err:?}"), - } -} - /// Retrieves the balance of an ERC20 token for a given account. /// /// # Arguments @@ -92,10 +42,10 @@ pub async fn eth_call( pub async fn erc20_balance_of( contract_address: String, account: String, - rpc_service: RpcService, + rpc_services: RpcServices, evm_rpc: EvmRpcCanister, ) -> U256 { - let max_response_bytes = 2048; + let cycles = 10_000_000_000; // Define the ABI JSON as a string literal let abi_json = r#" [ @@ -129,19 +79,44 @@ pub async fn erc20_balance_of( account.parse().expect("address should be valid"), )], }; + let function = get_function(&contract_details); + let data = get_data(function, &contract_details); + let transaction_request: TransactionRequest = TransactionRequest { + to: Some(contract_details.contract_address.clone()), + input: Some(to_hex(&data)), + ..Default::default() + }; + + let call_args: CallArgs = CallArgs { + transaction: transaction_request, + block: None, + }; - let Token::Uint(balance) = eth_call( - contract_details, - "latest", - rpc_service, - max_response_bytes, - evm_rpc, - ) - .await - .first() - .unwrap() - .clone() else { - panic!("oops") + let balance = match evm_rpc + .eth_call(rpc_services, None, call_args, cycles) + .await + .expect("Call failed") + .0 + { + MultiCallResult::Consistent(r) => match r { + CallResult::Ok(ok) => { + // this already returns the hex encoded response + let result = from_hex(&ok).unwrap(); + let token = function + .decode_output(&result) + .expect("Error decoding output") + .first() + .unwrap() + .clone(); + if let Token::Uint(value) = token { + value + } else { + panic!("Expected Uint token") + } + } + CallResult::Err(err) => panic!("Response error: {err:?}"), + }, + MultiCallResult::Inconsistent(_) => panic!("Status is inconsistent"), }; balance } @@ -155,7 +130,7 @@ pub async fn erc20_balance_of( /// # Returns /// /// The hexadecimal string representation of the byte slice. -fn to_hex(data: &[u8]) -> String { +pub fn to_hex(data: &[u8]) -> String { format!("0x{}", hex::encode(data)) } @@ -168,6 +143,6 @@ fn to_hex(data: &[u8]) -> String { /// # Returns /// /// The byte slice representation of the hexadecimal string, or an error if the conversion fails. -fn from_hex(data: &str) -> Result, FromHexError> { +pub fn from_hex(data: &str) -> Result, FromHexError> { hex::decode(&data[2..]) } diff --git a/packages/ic-evm-utils/src/eth_get_transaction_count.rs b/packages/ic-evm-utils/src/eth_get_transaction_count.rs new file mode 100644 index 0000000..7f08e1e --- /dev/null +++ b/packages/ic-evm-utils/src/eth_get_transaction_count.rs @@ -0,0 +1,57 @@ +use candid::Nat; +use evm_rpc_canister_types::{ + EvmRpcCanister, GetTransactionCountArgs, GetTransactionCountResult, + MultiGetTransactionCountResult, RpcServices, +}; + +/// Gets the transaction count of an account. +/// +/// # Arguments +/// +/// * `rpc_services` - The RPC services used to interact with the EVM. +/// * `get_transaction_count_args` - The arguments for getting the transaction count. +/// * `evm_rpc` - The EVM RPC canister used to send the transaction. +/// +/// # Returns +/// +/// The transaction count of the account. +/// +/// # Panics +/// +/// If the call fails on the system level, the responses are inconsistent or there is an RPC error. +pub async fn get_transaction_count( + rpc_services: RpcServices, + get_transaction_count_args: GetTransactionCountArgs, + evm_rpc: EvmRpcCanister, +) -> Nat { + let cycles = 10_000_000_000; + let mut retry_counter = 0; + + loop { + match evm_rpc + .eth_get_transaction_count( + rpc_services.clone(), + None, + get_transaction_count_args.clone(), + cycles, + ) + .await + .expect("Call failed") + .0 + { + MultiGetTransactionCountResult::Consistent(r) => match r { + GetTransactionCountResult::Ok(n) => break n, + GetTransactionCountResult::Err(e) => { + ic_cdk::trap(format!("Error: {:?}", e).as_str()) + } + }, + MultiGetTransactionCountResult::Inconsistent(_) => { + if retry_counter == 3 { + ic_cdk::trap("Status is inconsistent"); + } + retry_counter += 1; + continue; + } + } + } +} diff --git a/packages/ic-evm-utils/src/eth_send_raw_transaction.rs b/packages/ic-evm-utils/src/eth_send_raw_transaction.rs index 8099399..ce8c970 100644 --- a/packages/ic-evm-utils/src/eth_send_raw_transaction.rs +++ b/packages/ic-evm-utils/src/eth_send_raw_transaction.rs @@ -3,13 +3,13 @@ //! The transactions are signed using t-ECDSA and sent via the EVM RPC canister. use ethers_core::abi::{Address, Contract, Function, FunctionExt, Token}; use ethers_core::types::{Eip1559TransactionRequest, NameOrAddress, U256, U64}; -use evm_rpc_canister_types::{ - EvmRpcCanister, MultiSendRawTransactionResult, RpcServices, SendRawTransactionResult, - SendRawTransactionStatus, -}; +use evm_rpc_canister_types::{EvmRpcCanister, RpcServices}; +use ic_cdk::api::call::CallResult; use ic_cdk::api::management_canister::ecdsa::EcdsaKeyId; + use std::str::FromStr; +use crate::evm_signer::SignedTransaction; use crate::{ evm_signer::sign_eip1559_transaction, fees::{estimate_transaction_fees, FeeEstimates}, @@ -22,6 +22,8 @@ pub struct TransferArgs { pub gas: Option, } +pub type TransactionHash = String; + /// Transfers ETH from one account to another. /// /// # Warning @@ -47,7 +49,7 @@ pub async fn transfer_eth( derivation_path: Vec>, nonce: U256, evm_rpc: EvmRpcCanister, -) -> SendRawTransactionStatus { +) -> CallResult { // use the user provided gas_limit or fallback to default 210000 let gas = transfer_args.gas.unwrap_or(U256::from(21000)); // estimate the transaction fees by calling eth_feeHistory @@ -151,6 +153,10 @@ pub fn get_data<'a>(function: &Function, contract_details: &'a ContractDetails<' /// * `key_id` - The ID of the ECDSA key used for signing the transaction. /// * `derivation_path` - The derivation path of the ECDSA key. /// * `evm_rpc` - The EVM RPC canister used to send the transaction. +/// +/// # Returns +/// +/// The transaction hash CallResult. pub async fn contract_interaction( contract_details: ContractDetails<'_>, gas: Option, @@ -159,7 +165,7 @@ pub async fn contract_interaction( key_id: EcdsaKeyId, derivation_path: Vec>, evm_rpc: EvmRpcCanister, -) -> SendRawTransactionStatus { +) -> CallResult { let function = get_function(&contract_details); let data = get_data(function, &contract_details); @@ -203,34 +209,23 @@ pub async fn contract_interaction( /// /// # Returns /// -/// The status of the raw transaction send operation. -/// -/// # Panics -/// -/// If there is an error while sending the raw transaction. +/// CallResult containing the transaction hash. pub async fn send_raw_transaction( - tx: String, + tx: SignedTransaction, rpc_services: RpcServices, evm_rpc: EvmRpcCanister, -) -> SendRawTransactionStatus { +) -> CallResult { let cycles = 10_000_000_000; match evm_rpc - .eth_send_raw_transaction(rpc_services, None, tx, cycles) + .eth_send_raw_transaction(rpc_services, None, tx.tx_hex, cycles) .await { - Ok((res,)) => match res { - MultiSendRawTransactionResult::Consistent(status) => match status { - SendRawTransactionResult::Ok(status) => status, - SendRawTransactionResult::Err(e) => { - ic_cdk::trap(format!("Error: {:?}", e).as_str()); - } - }, - MultiSendRawTransactionResult::Inconsistent(_) => { - ic_cdk::trap("Status is inconsistent"); - } - }, - Err(e) => ic_cdk::trap(format!("Error: {:?}", e).as_str()), + Ok((_res,)) => { + ic_cdk::println!("Transaction hash: {}", tx.tx_hash); + Ok(tx.tx_hash) + } + Err(e) => Err(e), } } diff --git a/packages/ic-evm-utils/src/evm_signer.rs b/packages/ic-evm-utils/src/evm_signer.rs index bda59f7..cd88231 100644 --- a/packages/ic-evm-utils/src/evm_signer.rs +++ b/packages/ic-evm-utils/src/evm_signer.rs @@ -10,7 +10,11 @@ use ic_cdk::api::management_canister::ecdsa::{ }; /// A signed transaction. -type SignedTransaction = String; +#[derive(Debug, Clone)] +pub struct SignedTransaction { + pub tx_hex: String, + pub tx_hash: String, +} /// Gets the canister's ECDSA public key. /// @@ -83,7 +87,10 @@ pub async fn sign_eip1559_transaction( let mut signed_tx_bytes = tx.rlp_signed(&signature).to_vec(); signed_tx_bytes.insert(0, EIP1559_TX_ID); - format!("0x{}", hex::encode(&signed_tx_bytes)) + SignedTransaction { + tx_hex: format!("0x{}", hex::encode(&signed_tx_bytes)), + tx_hash: format!("0x{}", hex::encode(keccak256(&signed_tx_bytes))), + } } /// Converts the public key bytes to an Ethereum address with a checksum. diff --git a/packages/ic-evm-utils/src/fees.rs b/packages/ic-evm-utils/src/fees.rs index 5646664..2fa4d95 100644 --- a/packages/ic-evm-utils/src/fees.rs +++ b/packages/ic-evm-utils/src/fees.rs @@ -47,7 +47,7 @@ pub async fn fee_history( { Ok((res,)) => match res { MultiFeeHistoryResult::Consistent(fee_history) => match fee_history { - FeeHistoryResult::Ok(fee_history) => fee_history.unwrap(), + FeeHistoryResult::Ok(fee_history) => fee_history, FeeHistoryResult::Err(e) => { ic_cdk::trap(format!("Error: {:?}", e).as_str()); } diff --git a/packages/ic-evm-utils/src/lib.rs b/packages/ic-evm-utils/src/lib.rs index 7bdc3aa..7c430ab 100644 --- a/packages/ic-evm-utils/src/lib.rs +++ b/packages/ic-evm-utils/src/lib.rs @@ -1,5 +1,6 @@ pub mod conversions; pub mod eth_call; +pub mod eth_get_transaction_count; pub mod eth_send_raw_transaction; pub mod evm_signer; pub mod fees; diff --git a/script/Coprocessor.s.sol b/script/Coprocessor.s.sol index 866b98e..a9e1987 100644 --- a/script/Coprocessor.s.sol +++ b/script/Coprocessor.s.sol @@ -8,15 +8,16 @@ contract MyScript is Script { function run(address chain_fusion_canister_address) external { // the private key of the deployer is the first private key printed by running anvil uint256 deployerPrivateKey = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; + // we use that key to broadcast all following transactions vm.startBroadcast(deployerPrivateKey); - // this creates the contract. it will have the same address every time if we use a + Coprocessor coprocessor = new Coprocessor(); + coprocessor.updateCoprocessor(chain_fusion_canister_address); + // this creates the contract. it will have the same address every time if we use a // new instance of anvil for every deployment. - Coprocessor coprocessor = new Coprocessor(chain_fusion_canister_address); - - // we create 3 jobs + // we create 3 jobs for (uint256 index = 0; index < 3; index++) { coprocessor.newJob{value: 0.1 ether}(); } diff --git a/tests/Cargo.toml b/tests/Cargo.toml new file mode 100644 index 0000000..e2e7c4f --- /dev/null +++ b/tests/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "tests" +version = "0.1.0" +edition = "2021" + +[dev-dependencies] +alloy = { version = "0.12", features = ["full"] } +candid = "0.10" +cargo_metadata = "0.19.1" +ic-cdk = "0.17.1" +ic-test = "0.1.2" +pocket-ic = "7.0.0" +serde = "1.0.219" +serde_bytes = "0.11.17" +tokio = { version = "1", features = ["full"] } +convert_case = "0.8.0" diff --git a/tests/src/bindings/chain_fusion.rs b/tests/src/bindings/chain_fusion.rs new file mode 100644 index 0000000..ffcc1c6 --- /dev/null +++ b/tests/src/bindings/chain_fusion.rs @@ -0,0 +1,121 @@ +// This is an experimental feature used to generate Rust bindings from Candid. +// THIS IS A GENERATED FILE. DO NOT EDIT THIS FILE TO AVOID DATA LOSS. +#![allow(dead_code, unused_imports, non_snake_case)] +use candid::{self, CandidType, Decode, Deserialize, Encode, Principal}; + +#[derive(CandidType, Deserialize)] +pub enum EcdsaCurve { + #[serde(rename = "secp256k1")] + Secp256K1, +} + +#[derive(CandidType, Deserialize)] +pub struct EcdsaKeyId { + pub name: String, + pub curve: EcdsaCurve, +} + +#[derive(CandidType, Deserialize)] +pub enum L2MainnetService { + Alchemy, + BlockPi, + PublicNode, + Ankr, +} + +#[derive(CandidType, Deserialize)] +pub struct HttpHeader { + pub value: String, + pub name: String, +} + +#[derive(CandidType, Deserialize)] +pub struct RpcApi { + pub url: String, + pub headers: Option>, +} + +#[derive(CandidType, Deserialize)] +pub enum EthMainnetService { + Alchemy, + BlockPi, + Cloudflare, + PublicNode, + Ankr, +} + +#[derive(CandidType, Deserialize)] +pub enum RpcService { + EthSepolia(L2MainnetService), + BaseMainnet(L2MainnetService), + Custom(RpcApi), + OptimismMainnet(L2MainnetService), + ArbitrumOne(L2MainnetService), + EthMainnet(EthMainnetService), + Chain(u64), + Provider(u64), +} + +#[derive(CandidType, Deserialize)] +pub struct InitArg { + pub ecdsa_key_id: EcdsaKeyId, + pub rpc_service: RpcService, + pub filter_addresses: Vec, + pub chain_id: u64, + pub coprocessor_evm_address: String, + pub filter_events: Vec, +} + +pub struct ChainFusionCanister { + pub canister_id: Principal, + pub caller: super::Caller, +} + +impl ChainFusionCanister { + pub fn get_evm_address(&self) -> super::CallBuilder> { + let args = Encode!(); + self.caller.call( + self.canister_id, + super::CallMode::Query, + "get_evm_address", + args, + ) + } +} +pub const CANISTER_ID: Principal = Principal::from_slice(&[0, 0, 0, 0, 0, 160, 190, 169, 1, 1]); // 2222s-4iaaa-aaaaf-ax2uq-cai + +pub fn new(caller: &super::Caller, canister_id: Principal) -> ChainFusionCanister { + ChainFusionCanister { + canister_id, + caller: caller.clone(), + } +} + +pub fn deploy( + deployer: &super::Deployer, + arg0: InitArg, +) -> super::DeployBuilder { + let args = Encode!(&arg0); + let result = deployer.deploy(args, new); + let result = if let Some(id) = canister_id() { + result.with_canister_id(id) + } else { + result + }; + if let Some(wasm) = wasm() { + result.with_wasm(wasm) + } else { + result + } +} +pub fn canister_id() -> Option { + Some(Principal::from_text("2222s-4iaaa-aaaaf-ax2uq-cai").unwrap()) +} + +pub fn wasm() -> Option> { + let mut path = std::path::PathBuf::new(); + path.push(".././.dfx/local/canisters/chain_fusion/chain_fusion.wasm"); + let wasm = std::fs::read(path.as_path()) + .unwrap_or_else(|_| panic!("wasm binary not found: {:?}", path)); + Some(wasm) +} diff --git a/tests/src/bindings/evm_rpc.rs b/tests/src/bindings/evm_rpc.rs new file mode 100644 index 0000000..7f66a93 --- /dev/null +++ b/tests/src/bindings/evm_rpc.rs @@ -0,0 +1,640 @@ +// This is an experimental feature used to generate Rust bindings from Candid. +// THIS IS A GENERATED FILE. DO NOT EDIT THIS FILE TO AVOID DATA LOSS. +#![allow(dead_code, unused_imports, non_snake_case)] +use candid::{self, CandidType, Decode, Deserialize, Encode, Principal}; + +pub type Regex = String; +#[derive(CandidType, Deserialize)] +pub enum LogFilter { + ShowAll, + HideAll, + ShowPattern(Regex), + HidePattern(Regex), +} + +#[derive(CandidType, Deserialize)] +pub struct RegexSubstitution { + pub pattern: Regex, + pub replacement: String, +} + +#[derive(CandidType, Deserialize)] +pub struct OverrideProvider { + pub overrideUrl: Option, +} + +#[derive(CandidType, Deserialize)] +pub struct InstallArgs { + pub logFilter: Option, + pub demo: Option, + pub manageApiKeys: Option>, + pub overrideProvider: Option, + pub nodesInSubnet: Option, +} + +#[derive(CandidType, Deserialize)] +pub enum EthSepoliaService { + Alchemy, + BlockPi, + PublicNode, + Ankr, + Sepolia, +} + +#[derive(CandidType, Deserialize)] +pub enum L2MainnetService { + Alchemy, + Llama, + BlockPi, + PublicNode, + Ankr, +} + +pub type ChainId = u64; +#[derive(CandidType, Deserialize)] +pub struct HttpHeader { + pub value: String, + pub name: String, +} + +#[derive(CandidType, Deserialize)] +pub struct RpcApi { + pub url: String, + pub headers: Option>, +} + +#[derive(CandidType, Deserialize)] +pub enum EthMainnetService { + Alchemy, + Llama, + BlockPi, + Cloudflare, + PublicNode, + Ankr, +} + +#[derive(CandidType, Deserialize)] +pub enum RpcServices { + EthSepolia(Option>), + BaseMainnet(Option>), + Custom { + chainId: ChainId, + services: Vec, + }, + OptimismMainnet(Option>), + ArbitrumOne(Option>), + EthMainnet(Option>), +} + +#[derive(CandidType, Deserialize)] +pub enum ConsensusStrategy { + Equality, + Threshold { min: u8, total: Option }, +} + +#[derive(CandidType, Deserialize)] +pub struct RpcConfig { + pub responseConsensus: Option, + pub responseSizeEstimate: Option, +} + +#[derive(CandidType, Deserialize)] +pub struct AccessListEntry { + pub storageKeys: Vec, + pub address: String, +} + +#[derive(CandidType, Deserialize)] +pub struct TransactionRequest { + pub to: Option, + pub gas: Option, + pub maxFeePerGas: Option, + pub gasPrice: Option, + pub value: Option, + pub maxFeePerBlobGas: Option, + pub from: Option, + pub r#type: Option, + pub accessList: Option>, + pub nonce: Option, + pub maxPriorityFeePerGas: Option, + pub blobs: Option>, + pub input: Option, + pub chainId: Option, + pub blobVersionedHashes: Option>, +} + +#[derive(CandidType, Deserialize)] +pub enum BlockTag { + Earliest, + Safe, + Finalized, + Latest, + Number(candid::Nat), + Pending, +} + +#[derive(CandidType, Deserialize)] +pub struct CallArgs { + pub transaction: TransactionRequest, + pub block: Option, +} + +#[derive(CandidType, Deserialize)] +pub struct JsonRpcError { + pub code: i64, + pub message: String, +} + +#[derive(CandidType, Deserialize)] +pub enum ProviderError { + TooFewCycles { + expected: candid::Nat, + received: candid::Nat, + }, + InvalidRpcConfig(String), + MissingRequiredProvider, + ProviderNotFound, + NoPermission, +} + +#[derive(CandidType, Deserialize)] +pub enum ValidationError { + Custom(String), + InvalidHex(String), +} + +#[derive(CandidType, Deserialize)] +pub enum RejectionCode { + NoError, + CanisterError, + SysTransient, + DestinationInvalid, + Unknown, + SysFatal, + CanisterReject, +} + +#[derive(CandidType, Deserialize)] +pub enum HttpOutcallError { + IcError { + code: RejectionCode, + message: String, + }, + InvalidHttpJsonRpcResponse { + status: u16, + body: String, + parsingError: Option, + }, +} + +#[derive(CandidType, Deserialize)] +pub enum RpcError { + JsonRpcError(JsonRpcError), + ProviderError(ProviderError), + ValidationError(ValidationError), + HttpOutcallError(HttpOutcallError), +} + +#[derive(CandidType, Deserialize)] +pub enum CallResult { + Ok(String), + Err(RpcError), +} + +pub type ProviderId = u64; +#[derive(CandidType, Deserialize)] +pub enum RpcService { + EthSepolia(EthSepoliaService), + BaseMainnet(L2MainnetService), + Custom(RpcApi), + OptimismMainnet(L2MainnetService), + ArbitrumOne(L2MainnetService), + EthMainnet(EthMainnetService), + Provider(ProviderId), +} + +#[derive(CandidType, Deserialize)] +pub enum MultiCallResult { + Consistent(CallResult), + Inconsistent(Vec<(RpcService, CallResult)>), +} + +#[derive(CandidType, Deserialize)] +pub struct FeeHistoryArgs { + pub blockCount: candid::Nat, + pub newestBlock: BlockTag, + pub rewardPercentiles: Option, +} + +#[derive(CandidType, Deserialize)] +pub struct FeeHistory { + pub reward: Vec>, + pub gasUsedRatio: Vec, + pub oldestBlock: candid::Nat, + pub baseFeePerGas: Vec, +} + +#[derive(CandidType, Deserialize)] +pub enum FeeHistoryResult { + Ok(FeeHistory), + Err(RpcError), +} + +#[derive(CandidType, Deserialize)] +pub enum MultiFeeHistoryResult { + Consistent(FeeHistoryResult), + Inconsistent(Vec<(RpcService, FeeHistoryResult)>), +} + +#[derive(CandidType, Deserialize)] +pub struct Block { + pub miner: String, + pub totalDifficulty: Option, + pub receiptsRoot: String, + pub stateRoot: String, + pub hash: String, + pub difficulty: Option, + pub size: candid::Nat, + pub uncles: Vec, + pub baseFeePerGas: Option, + pub extraData: String, + pub transactionsRoot: Option, + pub sha3Uncles: String, + pub nonce: candid::Nat, + pub number: candid::Nat, + pub timestamp: candid::Nat, + pub transactions: Vec, + pub gasLimit: candid::Nat, + pub logsBloom: String, + pub parentHash: String, + pub gasUsed: candid::Nat, + pub mixHash: String, +} + +#[derive(CandidType, Deserialize)] +pub enum GetBlockByNumberResult { + Ok(Block), + Err(RpcError), +} + +#[derive(CandidType, Deserialize)] +pub enum MultiGetBlockByNumberResult { + Consistent(GetBlockByNumberResult), + Inconsistent(Vec<(RpcService, GetBlockByNumberResult)>), +} + +pub type Topic = Vec; +#[derive(CandidType, Deserialize)] +pub struct GetLogsArgs { + pub fromBlock: Option, + pub toBlock: Option, + pub addresses: Vec, + pub topics: Option>, +} + +#[derive(CandidType, Deserialize)] +pub struct LogEntry { + pub transactionHash: Option, + pub blockNumber: Option, + pub data: String, + pub blockHash: Option, + pub transactionIndex: Option, + pub topics: Vec, + pub address: String, + pub logIndex: Option, + pub removed: bool, +} + +#[derive(CandidType, Deserialize)] +pub enum GetLogsResult { + Ok(Vec), + Err(RpcError), +} + +#[derive(CandidType, Deserialize)] +pub enum MultiGetLogsResult { + Consistent(GetLogsResult), + Inconsistent(Vec<(RpcService, GetLogsResult)>), +} + +#[derive(CandidType, Deserialize)] +pub struct GetTransactionCountArgs { + pub address: String, + pub block: BlockTag, +} + +#[derive(CandidType, Deserialize)] +pub enum GetTransactionCountResult { + Ok(candid::Nat), + Err(RpcError), +} + +#[derive(CandidType, Deserialize)] +pub enum MultiGetTransactionCountResult { + Consistent(GetTransactionCountResult), + Inconsistent(Vec<(RpcService, GetTransactionCountResult)>), +} + +#[derive(CandidType, Deserialize)] +pub struct TransactionReceipt { + pub to: Option, + pub status: Option, + pub transactionHash: String, + pub blockNumber: candid::Nat, + pub from: String, + pub logs: Vec, + pub blockHash: String, + pub r#type: String, + pub transactionIndex: candid::Nat, + pub effectiveGasPrice: candid::Nat, + pub logsBloom: String, + pub contractAddress: Option, + pub gasUsed: candid::Nat, +} + +#[derive(CandidType, Deserialize)] +pub enum GetTransactionReceiptResult { + Ok(Option), + Err(RpcError), +} + +#[derive(CandidType, Deserialize)] +pub enum MultiGetTransactionReceiptResult { + Consistent(GetTransactionReceiptResult), + Inconsistent(Vec<(RpcService, GetTransactionReceiptResult)>), +} + +#[derive(CandidType, Deserialize)] +pub enum SendRawTransactionStatus { + Ok(Option), + NonceTooLow, + NonceTooHigh, + InsufficientFunds, +} + +#[derive(CandidType, Deserialize)] +pub enum SendRawTransactionResult { + Ok(SendRawTransactionStatus), + Err(RpcError), +} + +#[derive(CandidType, Deserialize)] +pub enum MultiSendRawTransactionResult { + Consistent(SendRawTransactionResult), + Inconsistent(Vec<(RpcService, SendRawTransactionResult)>), +} + +#[derive(CandidType, Deserialize)] +pub struct Metrics { + pub responses: Vec<((String, String, String), u64)>, + pub inconsistentResponses: Vec<((String, String), u64)>, + pub cyclesCharged: Vec<((String, String), candid::Nat)>, + pub requests: Vec<((String, String), u64)>, + pub errHttpOutcall: Vec<((String, String, RejectionCode), u64)>, +} + +#[derive(CandidType, Deserialize)] +pub enum RpcAuth { + BearerToken { url: String }, + UrlParameter { urlPattern: String }, +} + +#[derive(CandidType, Deserialize)] +pub enum RpcAccess { + Authenticated { + publicUrl: Option, + auth: RpcAuth, + }, + Unauthenticated { + publicUrl: String, + }, +} + +#[derive(CandidType, Deserialize)] +pub struct Provider { + pub access: RpcAccess, + pub alias: Option, + pub chainId: ChainId, + pub providerId: ProviderId, +} + +#[derive(CandidType, Deserialize)] +pub enum RequestResult { + Ok(String), + Err(RpcError), +} + +#[derive(CandidType, Deserialize)] +pub enum RequestCostResult { + Ok(candid::Nat), + Err(RpcError), +} + +pub struct EvmRpcCanister { + pub canister_id: Principal, + pub caller: super::Caller, +} + +impl EvmRpcCanister { + pub fn eth_call( + &self, + arg0: RpcServices, + arg1: Option, + arg2: CallArgs, + ) -> super::CallBuilder { + let args = Encode!(&arg0, &arg1, &arg2); + self.caller + .call(self.canister_id, super::CallMode::Update, "eth_call", args) + } + pub fn eth_fee_history( + &self, + arg0: RpcServices, + arg1: Option, + arg2: FeeHistoryArgs, + ) -> super::CallBuilder { + let args = Encode!(&arg0, &arg1, &arg2); + self.caller.call( + self.canister_id, + super::CallMode::Update, + "eth_feeHistory", + args, + ) + } + pub fn eth_get_block_by_number( + &self, + arg0: RpcServices, + arg1: Option, + arg2: BlockTag, + ) -> super::CallBuilder { + let args = Encode!(&arg0, &arg1, &arg2); + self.caller.call( + self.canister_id, + super::CallMode::Update, + "eth_getBlockByNumber", + args, + ) + } + pub fn eth_get_logs( + &self, + arg0: RpcServices, + arg1: Option, + arg2: GetLogsArgs, + ) -> super::CallBuilder { + let args = Encode!(&arg0, &arg1, &arg2); + self.caller.call( + self.canister_id, + super::CallMode::Update, + "eth_getLogs", + args, + ) + } + pub fn eth_get_transaction_count( + &self, + arg0: RpcServices, + arg1: Option, + arg2: GetTransactionCountArgs, + ) -> super::CallBuilder { + let args = Encode!(&arg0, &arg1, &arg2); + self.caller.call( + self.canister_id, + super::CallMode::Update, + "eth_getTransactionCount", + args, + ) + } + pub fn eth_get_transaction_receipt( + &self, + arg0: RpcServices, + arg1: Option, + arg2: String, + ) -> super::CallBuilder { + let args = Encode!(&arg0, &arg1, &arg2); + self.caller.call( + self.canister_id, + super::CallMode::Update, + " + eth_getTransactionReceipt + ", + args, + ) + } + pub fn eth_send_raw_transaction( + &self, + arg0: RpcServices, + arg1: Option, + arg2: String, + ) -> super::CallBuilder { + let args = Encode!(&arg0, &arg1, &arg2); + self.caller.call( + self.canister_id, + super::CallMode::Update, + "eth_sendRawTransaction", + args, + ) + } + pub fn get_metrics(&self) -> super::CallBuilder { + let args = Encode!(); + self.caller + .call(self.canister_id, super::CallMode::Query, "getMetrics", args) + } + pub fn get_nodes_in_subnet(&self) -> super::CallBuilder { + let args = Encode!(); + self.caller.call( + self.canister_id, + super::CallMode::Query, + "getNodesInSubnet", + args, + ) + } + pub fn get_providers(&self) -> super::CallBuilder> { + let args = Encode!(); + self.caller.call( + self.canister_id, + super::CallMode::Query, + "getProviders", + args, + ) + } + pub fn get_service_provider_map(&self) -> super::CallBuilder> { + let args = Encode!(); + self.caller.call( + self.canister_id, + super::CallMode::Query, + "getServiceProviderMap", + args, + ) + } + pub fn request( + &self, + arg0: RpcService, + arg1: String, + arg2: u64, + ) -> super::CallBuilder { + let args = Encode!(&arg0, &arg1, &arg2); + self.caller + .call(self.canister_id, super::CallMode::Update, "request", args) + } + pub fn request_cost( + &self, + arg0: RpcService, + arg1: String, + arg2: u64, + ) -> super::CallBuilder { + let args = Encode!(&arg0, &arg1, &arg2); + self.caller.call( + self.canister_id, + super::CallMode::Query, + "requestCost", + args, + ) + } + pub fn update_api_keys( + &self, + arg0: Vec<(ProviderId, Option)>, + ) -> super::CallBuilder<()> { + let args = Encode!(&arg0); + self.caller.call( + self.canister_id, + super::CallMode::Update, + "updateApiKeys", + args, + ) + } +} +pub const CANISTER_ID: Principal = Principal::from_slice(&[0, 0, 0, 0, 2, 48, 0, 204, 1, 1]); // 7hfb6-caaaa-aaaar-qadga-cai + +pub fn new(caller: &super::Caller, canister_id: Principal) -> EvmRpcCanister { + EvmRpcCanister { + canister_id, + caller: caller.clone(), + } +} + +pub fn deploy( + deployer: &super::Deployer, + arg0: InstallArgs, +) -> super::DeployBuilder { + let args = Encode!(&arg0); + let result = deployer.deploy(args, new); + let result = if let Some(id) = canister_id() { + result.with_canister_id(id) + } else { + result + }; + if let Some(wasm) = wasm() { + result.with_wasm(wasm) + } else { + result + } +} +pub fn canister_id() -> Option { + Some(Principal::from_text("7hfb6-caaaa-aaaar-qadga-cai").unwrap()) +} + +pub fn wasm() -> Option> { + let mut path = std::path::PathBuf::new(); + path.push(".././.dfx/local/canisters/evm_rpc/evm_rpc.wasm.gz"); + let wasm = std::fs::read(path.as_path()) + .unwrap_or_else(|_| panic!("wasm binary not found: {:?}", path)); + Some(wasm) +} diff --git a/tests/src/bindings/mod.rs b/tests/src/bindings/mod.rs new file mode 100644 index 0000000..d88eb6f --- /dev/null +++ b/tests/src/bindings/mod.rs @@ -0,0 +1,30 @@ +// THIS IS A GENERATED FILE, DO NOT EDIT! + +#![allow(dead_code, unused_imports, non_snake_case)] + +type CallMode = ic_test::CallMode; +type Caller = ic_test::IcpUser; +type CallBuilder = ic_test::CallBuilder; +type DeployMode = ic_test::DeployMode; +type Deployer = ic_test::IcpUser; +type DeployBuilder = ic_test::DeployBuilder; + + +// candid: .dfx/local/canisters/evm_rpc/constructor.did +pub mod evm_rpc; + +// candid: .dfx/local/canisters/chain_fusion/constructor.did +pub mod chain_fusion; + + + +pub mod evm { + use alloy::sol; + + sol!( + #[sol(rpc)] + Coprocessor, + "../out/Coprocessor.sol/Coprocessor.json", + ); + +} diff --git a/tests/src/lib.rs b/tests/src/lib.rs new file mode 100644 index 0000000..5809ec3 --- /dev/null +++ b/tests/src/lib.rs @@ -0,0 +1,4 @@ +#![cfg(test)] + +mod bindings; +mod tests; \ No newline at end of file diff --git a/tests/src/tests.rs b/tests/src/tests.rs new file mode 100644 index 0000000..49840fd --- /dev/null +++ b/tests/src/tests.rs @@ -0,0 +1,133 @@ +use std::path::PathBuf; + +use alloy::{ + hex::FromHex, + primitives::{utils::parse_ether, Address, Uint, U256}, +}; +use candid::Principal; +use ic_test::{EvmUser, IcpTest, IcpUser}; + +use crate::bindings::{ + chain_fusion::{self, ChainFusionCanister}, + evm::Coprocessor::{self, CoprocessorInstance}, + evm_rpc::{self, EvmRpcCanister}, +}; + +struct Env { + test: IcpTest, + evm_rpc: EvmRpcCanister, + chain_fusion: ChainFusionCanister, + coprocessor: CoprocessorInstance<(), EvmUser>, + evm_user: EvmUser, +} + +async fn setup(test: IcpTest) -> Env { + let evm_user = test.evm.test_user(0); + let icp_user = test.icp.test_user(0); + + let coprocessor = Coprocessor::deploy(evm_user.clone()).await.unwrap(); + + let evm_rpc = evm_rpc::deploy( + &icp_user, + evm_rpc::InstallArgs { + logFilter: None, + demo: None, + manageApiKeys: None, + overrideProvider: None, + nodesInSubnet: None, + }, + ) + .call() + .await; + + let chain_fusion = chain_fusion::deploy( + &icp_user, + chain_fusion::InitArg { + ecdsa_key_id: chain_fusion::EcdsaKeyId { + curve: chain_fusion::EcdsaCurve::Secp256K1, + name: "dfx_test_key".to_string(), + }, + rpc_service: chain_fusion::RpcService::Custom(chain_fusion::RpcApi { + url: test.evm.rpc_url().to_string(), + headers: None, + }), + chain_id: test.evm.chain_id(), + filter_addresses: vec![coprocessor.address().to_string()], + coprocessor_evm_address: coprocessor.address().to_string(), + filter_events: vec!["NewJob(uint256)".to_string()], + }, + ) + .call() + .await; + + while chain_fusion.get_evm_address().call().await.is_none() { + test.tick().await; + } + + let canister_evm_address = + Address::from_hex(chain_fusion.get_evm_address().call().await.unwrap()).unwrap(); + + let receipt = coprocessor + .updateCoprocessor(canister_evm_address) + .send() + .await + .unwrap() + .get_receipt() + .await + .unwrap(); + assert!(receipt.status()); + + test.evm + .transfer( + &evm_user, + canister_evm_address, + parse_ether("0.01").unwrap(), + ) + .await; + + Env { + test, + evm_user, + evm_rpc, + chain_fusion, + coprocessor, + } +} + +#[tokio::test] +async fn test_coprocessor_job() { + let Env { + test, + evm_user, + evm_rpc, + chain_fusion, + coprocessor, + } = setup(IcpTest::new().await).await; + + let user_balance_before = test.evm.get_balance(evm_user.address).await; + + let payment = parse_ether("0.1").unwrap(); + + let receipt = coprocessor + .newJob() + .value(payment) + .send() + .await + .unwrap() + .get_receipt() + .await + .unwrap(); + assert!(receipt.status()); + + let user_balance_after = test.evm.get_balance(evm_user.address).await; + + // This is not a strict equality because of gas cost payments. + assert!(user_balance_before - payment >= user_balance_after); + + for _ in 0..100 { + test.icp.tick().await; + } + + let result = coprocessor.getResult(Uint::from(0)).call().await.unwrap(); + assert_eq!(result._0, "6765"); +}