Introduction
Getting Started
1.
Installation
2.
First steps with Alloy
Migrating from ethers-rs
3.
Reference
Building with Alloy
4.
Basic building blocks
❱
4.1.
Using big numbers
4.2.
Basic hash and address types
4.3.
Common conversions
4.4.
Creating instances
4.5.
Comparisons and equivalence
5.
Connecting to a blockchain
❱
5.1.
Setting up a Provider
5.2.
Creating an HTTP provider
5.3.
Creating a WS provider
5.4.
Creating an IPC provider
6.
Understanding Fillers
7.
Queries
8.
Transactions
❱
8.1.
Using the Transaction Builder
8.2.
Sending an EIP-1559 transaction
8.3.
Sending a legacy transaction
8.4.
Sending an EIP-4844 transaction
8.5.
Using access lists
Highlights
9.
The sol! procedural macro
10.
The transaction lifecycle
Examples
11.
Anvil
❱
11.1.
Deploy contract
11.2.
Fork
11.3.
Local
12.
Big numbers
❱
12.1.
Comparison and equivalence
12.2.
Conversion
12.3.
Creating instances
12.4.
Math operations
12.5.
Math utilities
13.
Contracts
❱
13.1.
Deploy from artifact
13.2.
Deploy from bytecode
13.3.
Deploy from contract
13.4.
Interact with ABI
14.
Fillers
❱
14.1.
Gas estimation filler
14.2.
Nonce management filler
14.3.
Recommended fillers
14.4.
Wallet management filler
15.
Layers
❱
15.1.
Request / response logging layer
16.
Primitives
❱
16.1.
Bytes and address types
16.2.
Hashing functions
17.
Providers
❱
17.1.
Builder
17.2.
Builtin
17.3.
HTTP
17.4.
WS
17.5.
WS with authentication
17.6.
IPC
18.
Queries
❱
18.1.
Query contract storage
18.2.
Query contract deployed bytecode
18.3.
Query logs
19.
The sol! macro
❱
19.1.
Contract
19.2.
Decode returns
19.3.
Events and errors
19.4.
Structs and enums
19.5.
User defined types
20.
Subscriptions
❱
20.1.
Watch and poll for contract event logs
20.2.
Subscribe and watch blocks
20.3.
Subscribe and listen for specific contract event logs
20.4.
Subscribe and listen for all contract event logs
20.5.
Subscribe and listen to pending transactions in the public mempool
20.6.
Event multiplexer
21.
Transactions
❱
21.1.
Decode input
21.2.
Encode and decode EIP-1559 transaction
21.3.
Get gas price in USD
21.4.
Trace call
21.5.
Trace transaction
21.6.
Transfer ERC20 token
21.7.
Transfer ETH
21.8.
Sign and send a raw transaction
21.9.
Send transaction with access list
21.10.
Send EIP-1559 transaction
21.11.
Send legacy transaction
21.12.
Send EIP-4844 transaction
21.13.
Send private transaction using Flashbots Protect
22.
Wallets
❱
22.1.
AWS signer
22.2.
Ledger signer
22.3.
Private key signer
22.4.
Mnemonic signer
22.5.
Sign message
22.6.
Verify message
22.7.
Sign permit hash
22.8.
Trezor signer
22.9.
Yubi signer
22.10.
Keystore signer
22.11.
Create keystore
Appendix
23.
Help us improve Alloy
Light
Rust
Coal
Navy
Ayu
Alloy Book
Big numbers
Comparison and equivalence
Conversion
Creating instances
Math operations
Math utilities