[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10639":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},10639,"alloy","alloy-rs\u002Falloy","alloy-rs","Transports, Middleware, and Networks for the Alloy project","https:\u002F\u002Falloy.rs",null,"Rust",1280,633,20,52,0,1,6,57.51,"Apache License 2.0",false,"main",true,[25,26],"blockchain","ethereum","2026-06-12 04:00:51","# Alloy\n\nAlloy connects applications to blockchains.\n\nAlloy is a rewrite of [`ethers-rs`] from the ground up, with exciting new\nfeatures, high performance, and excellent [docs](https:\u002F\u002Fdocs.rs\u002Falloy).\n\nWe also have a [book](https:\u002F\u002Falloy.rs\u002F) on all things Alloy and many [examples](https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Fexamples) to help you get started.\n\n[![Telegram chat][telegram-badge]][telegram-url]\n\n[`ethers-rs`]: https:\u002F\u002Fgithub.com\u002Fgakonst\u002Fethers-rs\n[telegram-badge]: https:\u002F\u002Fimg.shields.io\u002Fendpoint?color=neon&style=for-the-badge&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fethers_rs\n[telegram-url]: https:\u002F\u002Ft.me\u002Fethers_rs\n\n## Installation\n\nAlloy consists of a number of crates that provide a range of functionality essential for interfacing with any Ethereum-based blockchain.\n\nThe easiest way to get started is to add the `alloy` crate with the `full` feature flag from the command-line using Cargo:\n\n```sh\ncargo add alloy --features full\n```\n\nAlternatively, you can add the following to your `Cargo.toml` file:\n\n```toml\nalloy = { version = \"2\", features = [\"full\"] }\n```\n\nFor a more fine-grained control over the features you wish to include, you can add the individual crates to your `Cargo.toml` file, or use the `alloy` crate with the features you need.\n\nA comprehensive list of available features can be found on [docs.rs](https:\u002F\u002Fdocs.rs\u002Fcrate\u002Falloy\u002Flatest\u002Ffeatures) or in the [`alloy` crate's `Cargo.toml`](https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Fblob\u002Fmain\u002Fcrates\u002Falloy\u002FCargo.toml).\n\nIf you want to use `ProviderBuilder::connect_anvil*` helpers from the `alloy` meta-crate,\nenable the `provider-anvil-node` feature:\n\n```sh\ncargo add alloy --features provider-anvil-node\n```\n\nIf you only need the `alloy::node_bindings` re-export, enable the `node-bindings` feature:\n\n```sh\ncargo add alloy --features node-bindings\n```\n\nIf you are already using `full`, add `node-bindings` explicitly because `full` does not include it:\n\n```sh\ncargo add alloy --features \"full,node-bindings\"\n```\n\nIf you depend on `alloy-provider` directly instead of the `alloy` meta-crate, enable the\n`anvil-node` feature there.\n\n## Examples\n\n### Connecting to a Provider\n\nHere's a simple example of connecting to an Ethereum node and querying the latest block:\n\n```rust\nuse alloy::providers::{Provider, ProviderBuilder};\n\n# async fn example() -> Result\u003C(), Box\u003Cdyn std::error::Error>> {\n\u002F\u002F Create a provider with the HTTP transport using the `reqwest` crate.\nlet rpc_url = \"https:\u002F\u002Feth.llamarpc.com\";\nlet provider = ProviderBuilder::new().connect(rpc_url).await?;\n\n\u002F\u002F Get the latest block number.\nlet latest_block = provider.get_block_number().await?;\nprintln!(\"Latest block number: {latest_block}\");\n\n\u002F\u002F Get chain ID.\nlet chain_id = provider.get_chain_id().await?;\nprintln!(\"Chain ID: {chain_id}\");\n# Ok(())\n# }\n```\n\n### Network generic\n\nAlloy is network-generic, allowing you to work with any Ethereum-compatible chain. Here's an example using Optimism (see [`op-alloy`](https:\u002F\u002Fdocs.rs\u002Fop-alloy)) to demonstrate this capability:\n\n```rust,ignore\nuse alloy::providers::{Provider, ProviderBuilder};\nuse op_alloy::network::Optimism;\n\n# async fn example() -> Result\u003C(), Box\u003Cdyn std::error::Error>> {\n\u002F\u002F Connect to Optimism mainnet.\nlet rpc_url = \"https:\u002F\u002Fmainnet.optimism.io\";\nlet provider = ProviderBuilder::new_with_network::\u003COptimism>().connect(rpc_url).await?;\n# Ok(())\n# }\n```\n\nFor more examples, check out the [Alloy examples repository](https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Fexamples).\n\n## Overview\n\nThis repository contains the following crates:\n\n- [`alloy`]: Meta-crate for the entire project, including [`alloy-core`]\n- [`alloy-consensus`] - Ethereum consensus interface\n  - [`alloy-consensus-any`] - Catch-all consensus interface for multiple networks\n- [`alloy-contract`] - Interact with on-chain contracts\n- [`alloy-eip5792`] - Types for the `wallet_` Ethereum JSON-RPC namespace\n- [`alloy-eip7547`] - EIP-7547: Inclusion Lists types\n- [`alloy-eips`] - Ethereum Improvement Proposal (EIP) implementations\n- [`alloy-genesis`] - Ethereum genesis file definitions\n- [`alloy-json-rpc`] - Core data types for JSON-RPC 2.0 clients\n- [`alloy-ens`] - Ethereum Name Service (ENS) utilities\n- [`alloy-network`] - Network abstraction for RPC types\n  - [`alloy-network-primitives`] - Primitive types for the network abstraction\n- [`alloy-node-bindings`] - Ethereum execution-layer client bindings\n- [`alloy-provider`] - Interface with an Ethereum blockchain\n- [`alloy-pubsub`] - Ethereum JSON-RPC [publish-subscribe] tower service and type definitions\n- [`alloy-rpc-client`] - Low-level Ethereum JSON-RPC client implementation\n- [`alloy-rpc-types`] - Meta-crate for all Ethereum JSON-RPC types\n  - [`alloy-rpc-types-admin`] - Types for the `admin` Ethereum JSON-RPC namespace\n  - [`alloy-rpc-types-anvil`] - Types for the [Anvil] development node's Ethereum JSON-RPC namespace\n  - [`alloy-rpc-types-any`] - Types for JSON-RPC namespaces across multiple networks\n  - [`alloy-rpc-types-beacon`] - Types for the [Ethereum Beacon Node API][beacon-apis]\n  - [`alloy-rpc-types-debug`] - Types for the `debug` Ethereum JSON-RPC namespace\n  - [`alloy-rpc-types-engine`] - Types for the `engine` Ethereum JSON-RPC namespace\n  - [`alloy-rpc-types-eth`] - Types for the `eth` Ethereum JSON-RPC namespace\n  - [`alloy-rpc-types-mev`] - Types for the MEV bundle JSON-RPC namespace\n  - [`alloy-rpc-types-tenderly`] - Types for the Tenderly node's Ethereum JSON-RPC namespace\n  - [`alloy-rpc-types-trace`] - Types for the `trace` Ethereum JSON-RPC namespace\n  - [`alloy-rpc-types-txpool`] - Types for the `txpool` Ethereum JSON-RPC namespace\n- [`alloy-serde`] - [Serde]-related utilities\n- [`alloy-signer`] - Ethereum signer abstraction\n  - [`alloy-signer-aws`] - [AWS KMS] signer implementation\n  - [`alloy-signer-gcp`] - [GCP KMS] signer implementation\n  - [`alloy-signer-ledger`] - [Ledger] signer implementation\n  - [`alloy-signer-local`] - Local (private key, keystore, mnemonic, YubiHSM) signer implementations\n  - [`alloy-signer-trezor`] - [Trezor] signer implementation\n  - [`alloy-signer-turnkey`] - [Turnkey] signer implementation\n- [`alloy-transport`] - Low-level Ethereum JSON-RPC transport abstraction\n  - [`alloy-transport-http`] - HTTP transport implementation\n  - [`alloy-transport-ipc`] - IPC transport implementation\n  - [`alloy-transport-ws`] - WS transport implementation\n- [`alloy-tx-macros`] - Derive macro for transaction envelopes\n\n[`alloy`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Falloy\n[`alloy-core`]: https:\u002F\u002Fdocs.rs\u002Falloy-core\n[`alloy-consensus`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fconsensus\n[`alloy-consensus-any`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fconsensus-any\n[`alloy-contract`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fcontract\n[`alloy-eip5792`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Feip5792\n[`alloy-eip7547`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Feip7547\n[`alloy-eips`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Feips\n[`alloy-genesis`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fgenesis\n[`alloy-json-rpc`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fjson-rpc\n[`alloy-network`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fnetwork\n[`alloy-network-primitives`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fnetwork-primitives\n[`alloy-node-bindings`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fnode-bindings\n[`alloy-provider`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fprovider\n[`alloy-pubsub`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fpubsub\n[`alloy-rpc-client`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-client\n[`alloy-rpc-types`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types\n[`alloy-rpc-types-admin`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-admin\n[`alloy-rpc-types-anvil`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-anvil\n[`alloy-rpc-types-any`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-any\n[`alloy-rpc-types-beacon`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-beacon\n[`alloy-rpc-types-debug`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-debug\n[`alloy-rpc-types-engine`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-engine\n[`alloy-rpc-types-eth`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-eth\n[`alloy-rpc-types-mev`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-mev\n[`alloy-rpc-types-tenderly`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-tenderly\n[`alloy-rpc-types-trace`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-trace\n[`alloy-rpc-types-txpool`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Frpc-types-txpool\n[`alloy-serde`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fserde\n[`alloy-signer`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fsigner\n[`alloy-signer-aws`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fsigner-aws\n[`alloy-signer-gcp`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fsigner-gcp\n[`alloy-signer-ledger`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fsigner-ledger\n[`alloy-signer-local`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fsigner-local\n[`alloy-signer-trezor`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fsigner-trezor\n[`alloy-signer-turnkey`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fsigner-turnkey\n[`alloy-transport`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Ftransport\n[`alloy-transport-http`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Ftransport-http\n[`alloy-transport-ipc`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Ftransport-ipc\n[`alloy-transport-ws`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Ftransport-ws\n[`alloy-tx-macros`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Ftx-macros\n[`alloy-ens`]: https:\u002F\u002Fgithub.com\u002Falloy-rs\u002Falloy\u002Ftree\u002Fmain\u002Fcrates\u002Fens\n[publish-subscribe]: https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FPublish%E2%80%93subscribe_pattern\n[AWS KMS]: https:\u002F\u002Faws.amazon.com\u002Fkms\n[GCP KMS]: https:\u002F\u002Fcloud.google.com\u002Fkms\n[Ledger]: https:\u002F\u002Fwww.ledger.com\n[Trezor]: https:\u002F\u002Ftrezor.io\n[Turnkey]: https:\u002F\u002Fwww.turnkey.com\n[Serde]: https:\u002F\u002Fserde.rs\n[beacon-apis]: https:\u002F\u002Fethereum.github.io\u002Fbeacon-APIs\n[Anvil]: https:\u002F\u002Fgithub.com\u002Ffoundry-rs\u002Ffoundry\n\n## Supported Rust Versions (MSRV)\n\n\u003C!--\nWhen updating this, also update:\n- clippy.toml\n- Cargo.toml\n- .github\u002Fworkflows\u002Fci.yml\n-->\n\nThe current MSRV (minimum supported rust version) is 1.91.\n\nAlloy will keep a rolling MSRV policy of **at least** two versions behind the\nlatest stable release (so if the latest stable release is 1.58, we would\nsupport 1.56).\n\nNote that the MSRV is not increased automatically, and only as part of a patch\n(pre-1.0) or minor (post-1.0) release.\n\n## Contributing\n\nThanks for your help improving the project! We are so happy to have you! We have\n[a contributing guide](.\u002FCONTRIBUTING.md) to help you get involved in the\nAlloy project.\n\nPull requests will not be merged unless CI passes, so please ensure that your\ncontribution follows the linting rules and passes clippy.\n\n## Note on `no_std`\n\nBecause these crates are primarily network-focused, we do not intend to support\n`no_std` for most of them at this time.\n\nThe following crates support `no_std`:\n\n| Crate               | Version Badge                                                                                                 |\n| ------------------- | ------------------------------------------------------------------------------------------------------------- |\n| **alloy-eips**      | [![Crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Falloy-eips.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Falloy-eips)           |\n| **alloy-genesis**   | [![Crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Falloy-genesis.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Falloy-genesis)     |\n| **alloy-serde**     | [![Crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Falloy-serde.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Falloy-serde)         |\n| **alloy-consensus** | [![Crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Falloy-consensus.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Falloy-consensus) |\n\nIf you would like to add `no_std` support to a crate, please make sure to update\n`scripts\u002Fcheck_no_std.sh` as well.\n\n## Credits\n\nNone of these crates would have been possible without the great work done in:\n\n| Project | Description |\n|------------|-------------|\n| [`ethers.js`](https:\u002F\u002Fgithub.com\u002Fethers-io\u002Fethers.js\u002F) | A complete and compact JavaScript library for interacting with the Ethereum blockchain. |\n| [`rust-web3`](https:\u002F\u002Fgithub.com\u002Ftomusdrw\u002Frust-web3\u002F) | Rust library for Ethereum JSON-RPC client communication, including support for async and WASM. |\n| [`ruint`](https:\u002F\u002Fgithub.com\u002Frecmo\u002Fuint) | A fast, no-std, const-friendly implementation of fixed-size unsigned integers in Rust. |\n| [`ethabi`](https:\u002F\u002Fgithub.com\u002Frust-ethereum\u002Fethabi) | Ethereum ABI encoding\u002Fdecoding in Rust for contracts and transactions. |\n| [`ethcontract-rs`](https:\u002F\u002Fgithub.com\u002Fgnosis\u002Fethcontract-rs\u002F) | Rust library to generate type-safe bindings to Ethereum smart contracts. |\n| [`guac_rs`](https:\u002F\u002Fgithub.com\u002Falthea-net\u002Fguac_rs\u002F) | Rust implementation of the GUAC protocol for Ethereum state channels. |\n\n\n\n#### License\n\n\u003Csup>\nLicensed under either of \u003Ca href=\"LICENSE-APACHE\">Apache License, Version\n2.0\u003C\u002Fa> or \u003Ca href=\"LICENSE-MIT\">MIT license\u003C\u002Fa> at your option.\n\u003C\u002Fsup>\n\n\u003Cbr>\n\n\u003Csub>\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in these crates by you, as defined in the Apache-2.0 license,\nshall be dual licensed as above, without any additional terms or conditions.\n\u003C\u002Fsub>\n","Alloy 是一个用于连接应用程序与区块链的 Rust 项目。它从底层重写了 `ethers-rs`，引入了新特性、高性能以及优秀的文档支持。核心功能包括提供一系列用于与以太坊兼容区块链交互的库，支持多种传输协议和中间件，并且具备高度的网络通用性，能够适应不同类型的以太坊链。适用于需要构建跨链应用或与特定以太坊兼容链进行高效交互的场景。",2,"2026-06-11 03:29:30","top_topic"]