Skip to content

Commit c4d81b9

Browse files
authored
chore(deps): alloy 0.7 (#9447)
* bump deps * fix: receipts * bump core * fix
1 parent ddb19d0 commit c4d81b9

File tree

16 files changed

+212
-145
lines changed

16 files changed

+212
-145
lines changed

Cargo.lock

Lines changed: 125 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -170,63 +170,63 @@ foundry-linking = { path = "crates/linking" }
170170
# solc & compilation utilities
171171
foundry-block-explorers = { version = "0.9.0", default-features = false }
172172
foundry-compilers = { version = "0.12.3", default-features = false }
173-
foundry-fork-db = "0.7.0"
173+
foundry-fork-db = "0.8.0"
174174
solang-parser = "=0.3.3"
175175
solar-ast = { version = "=0.1.0", default-features = false }
176176
solar-parse = { version = "=0.1.0", default-features = false }
177177

178178
## revm
179179
revm = { version = "18.0.0", default-features = false }
180180
revm-primitives = { version = "14.0.0", default-features = false }
181-
revm-inspectors = { version = "0.11.0", features = ["serde"] }
181+
revm-inspectors = { version = "0.12.0", features = ["serde"] }
182182

183183
## ethers
184184
ethers-contract-abigen = { version = "2.0.14", default-features = false }
185185

186186
## alloy
187-
alloy-consensus = { version = "0.6.4", default-features = false }
188-
alloy-contract = { version = "0.6.4", default-features = false }
189-
alloy-eips = { version = "0.6.4", default-features = false }
190-
alloy-genesis = { version = "0.6.4", default-features = false }
191-
alloy-json-rpc = { version = "0.6.4", default-features = false }
192-
alloy-network = { version = "0.6.4", default-features = false }
193-
alloy-provider = { version = "0.6.4", default-features = false }
194-
alloy-pubsub = { version = "0.6.4", default-features = false }
195-
alloy-rpc-client = { version = "0.6.4", default-features = false }
196-
alloy-rpc-types = { version = "0.6.4", default-features = true }
197-
alloy-serde = { version = "0.6.4", default-features = false }
198-
alloy-signer = { version = "0.6.4", default-features = false }
199-
alloy-signer-aws = { version = "0.6.4", default-features = false }
200-
alloy-signer-gcp = { version = "0.6.4", default-features = false }
201-
alloy-signer-ledger = { version = "0.6.4", default-features = false }
202-
alloy-signer-local = { version = "0.6.4", default-features = false }
203-
alloy-signer-trezor = { version = "0.6.4", default-features = false }
204-
alloy-transport = { version = "0.6.4", default-features = false }
205-
alloy-transport-http = { version = "0.6.4", default-features = false }
206-
alloy-transport-ipc = { version = "0.6.4", default-features = false }
207-
alloy-transport-ws = { version = "0.6.4", default-features = false }
208-
alloy-node-bindings = { version = "0.6.4", default-features = false }
187+
alloy-consensus = { version = "0.7.0", default-features = false }
188+
alloy-contract = { version = "0.7.0", default-features = false }
189+
alloy-eips = { version = "0.7.0", default-features = false }
190+
alloy-genesis = { version = "0.7.0", default-features = false }
191+
alloy-json-rpc = { version = "0.7.0", default-features = false }
192+
alloy-network = { version = "0.7.0", default-features = false }
193+
alloy-provider = { version = "0.7.0", default-features = false }
194+
alloy-pubsub = { version = "0.7.0", default-features = false }
195+
alloy-rpc-client = { version = "0.7.0", default-features = false }
196+
alloy-rpc-types = { version = "0.7.0", default-features = true }
197+
alloy-serde = { version = "0.7.0", default-features = false }
198+
alloy-signer = { version = "0.7.0", default-features = false }
199+
alloy-signer-aws = { version = "0.7.0", default-features = false }
200+
alloy-signer-gcp = { version = "0.7.0", default-features = false }
201+
alloy-signer-ledger = { version = "0.7.0", default-features = false }
202+
alloy-signer-local = { version = "0.7.0", default-features = false }
203+
alloy-signer-trezor = { version = "0.7.0", default-features = false }
204+
alloy-transport = { version = "0.7.0", default-features = false }
205+
alloy-transport-http = { version = "0.7.0", default-features = false }
206+
alloy-transport-ipc = { version = "0.7.0", default-features = false }
207+
alloy-transport-ws = { version = "0.7.0", default-features = false }
208+
alloy-node-bindings = { version = "0.7.0", default-features = false }
209209

210210
## alloy-core
211-
alloy-dyn-abi = "0.8.11"
212-
alloy-json-abi = "0.8.11"
213-
alloy-primitives = { version = "0.8.11", features = [
211+
alloy-dyn-abi = "0.8.14"
212+
alloy-json-abi = "0.8.14"
213+
alloy-primitives = { version = "0.8.14", features = [
214214
"getrandom",
215215
"rand",
216216
"map-foldhash",
217217
] }
218-
alloy-sol-macro-expander = "0.8.11"
219-
alloy-sol-macro-input = "0.8.11"
220-
alloy-sol-types = "0.8.11"
221-
syn-solidity = "0.8.11"
218+
alloy-sol-macro-expander = "0.8.14"
219+
alloy-sol-macro-input = "0.8.14"
220+
alloy-sol-types = "0.8.14"
221+
syn-solidity = "0.8.14"
222222

223223
alloy-chains = "0.1"
224224
alloy-rlp = "0.3"
225225
alloy-trie = "0.6.0"
226226

227227
## op-alloy
228-
op-alloy-rpc-types = "0.6.5"
229-
op-alloy-consensus = "0.6.5"
228+
op-alloy-rpc-types = "0.7.1"
229+
op-alloy-consensus = "0.7.1"
230230

231231
## cli
232232
anstream = "0.6"

crates/anvil/core/src/eth/block.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ impl Block {
6565
nonce: partial_header.nonce,
6666
base_fee_per_gas: partial_header.base_fee,
6767
requests_hash: partial_header.requests_hash,
68+
target_blobs_per_block: None,
6869
},
6970
transactions,
7071
ommers: vec![],
@@ -157,6 +158,7 @@ mod tests {
157158
parent_beacon_block_root: Default::default(),
158159
base_fee_per_gas: None,
159160
requests_hash: None,
161+
target_blobs_per_block: None,
160162
};
161163

162164
let encoded = alloy_rlp::encode(&header);
@@ -198,6 +200,7 @@ mod tests {
198200
nonce: B64::ZERO,
199201
base_fee_per_gas: None,
200202
requests_hash: None,
203+
target_blobs_per_block: None,
201204
};
202205

203206
header.encode(&mut data);
@@ -231,6 +234,7 @@ mod tests {
231234
parent_beacon_block_root: None,
232235
base_fee_per_gas: None,
233236
requests_hash: None,
237+
target_blobs_per_block: None,
234238
};
235239
let header = Header::decode(&mut data.as_slice()).unwrap();
236240
assert_eq!(header, expected);
@@ -263,6 +267,7 @@ mod tests {
263267
excess_blob_gas: None,
264268
parent_beacon_block_root: None,
265269
requests_hash: None,
270+
target_blobs_per_block: None,
266271
};
267272
assert_eq!(header.hash_slow(), expected_hash);
268273
}

crates/anvil/core/src/eth/transaction/mod.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ use alloy_consensus::{
66
eip4844::{TxEip4844, TxEip4844Variant, TxEip4844WithSidecar},
77
TxEip7702,
88
},
9-
AnyReceiptEnvelope, Receipt, ReceiptEnvelope, ReceiptWithBloom, Signed, Transaction, TxEip1559,
10-
TxEip2930, TxEnvelope, TxLegacy, TxReceipt,
9+
Receipt, ReceiptEnvelope, ReceiptWithBloom, Signed, Transaction, TxEip1559, TxEip2930,
10+
TxEnvelope, TxLegacy, TxReceipt,
1111
};
1212
use alloy_eips::eip2718::{Decodable2718, Eip2718Error, Encodable2718};
13-
use alloy_network::{AnyRpcTransaction, AnyTxEnvelope};
13+
use alloy_network::{AnyReceiptEnvelope, AnyRpcTransaction, AnyTransactionReceipt, AnyTxEnvelope};
1414
use alloy_primitives::{
1515
Address, Bloom, Bytes, Log, PrimitiveSignature, TxHash, TxKind, B256, U256, U64,
1616
};
1717
use alloy_rlp::{length_of_length, Decodable, Encodable, Header};
1818
use alloy_rpc_types::{
19-
request::TransactionRequest, trace::otterscan::OtsReceipt, AccessList, AnyTransactionReceipt,
20-
ConversionError, Transaction as RpcTransaction, TransactionReceipt,
19+
request::TransactionRequest, trace::otterscan::OtsReceipt, AccessList, ConversionError,
20+
Transaction as RpcTransaction, TransactionReceipt,
2121
};
2222
use alloy_serde::{OtherFields, WithOtherFields};
2323
use bytes::BufMut;
@@ -1109,7 +1109,7 @@ pub struct TransactionInfo {
11091109

11101110
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
11111111
#[serde(rename_all = "camelCase")]
1112-
pub struct DepositReceipt<T = alloy_primitives::Log> {
1112+
pub struct DepositReceipt<T = Receipt<alloy_primitives::Log>> {
11131113
#[serde(flatten)]
11141114
pub inner: ReceiptWithBloom<T>,
11151115
#[serde(default, with = "alloy_serde::quantity::opt")]
@@ -1136,7 +1136,7 @@ impl DepositReceipt {
11361136
/// Encodes the receipt data.
11371137
fn encode_fields(&self, out: &mut dyn BufMut) {
11381138
self.receipt_rlp_header().encode(out);
1139-
self.inner.receipt.status.encode(out);
1139+
self.inner.status().encode(out);
11401140
self.inner.receipt.cumulative_gas_used.encode(out);
11411141
self.inner.logs_bloom.encode(out);
11421142
self.inner.receipt.logs.encode(out);
@@ -1161,7 +1161,7 @@ impl DepositReceipt {
11611161
let status = Decodable::decode(b)?;
11621162
let cumulative_gas_used = Decodable::decode(b)?;
11631163
let logs_bloom = Decodable::decode(b)?;
1164-
let logs = Decodable::decode(b)?;
1164+
let logs: Vec<Log> = Decodable::decode(b)?;
11651165
let deposit_nonce = remaining(b).then(|| alloy_rlp::Decodable::decode(b)).transpose()?;
11661166
let deposit_nonce_version =
11671167
remaining(b).then(|| alloy_rlp::Decodable::decode(b)).transpose()?;
@@ -1207,7 +1207,7 @@ impl alloy_rlp::Decodable for DepositReceipt {
12071207

12081208
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
12091209
#[serde(tag = "type")]
1210-
pub enum TypedReceipt<T = alloy_primitives::Log> {
1210+
pub enum TypedReceipt<T = Receipt<alloy_primitives::Log>> {
12111211
#[serde(rename = "0x0", alias = "0x00")]
12121212
Legacy(ReceiptWithBloom<T>),
12131213
#[serde(rename = "0x1", alias = "0x01")]
@@ -1248,8 +1248,8 @@ impl<T> From<TypedReceipt<T>> for ReceiptWithBloom<T> {
12481248
}
12491249
}
12501250

1251-
impl From<TypedReceipt<alloy_rpc_types::Log>> for OtsReceipt {
1252-
fn from(value: TypedReceipt<alloy_rpc_types::Log>) -> Self {
1251+
impl From<TypedReceipt<Receipt<alloy_rpc_types::Log>>> for OtsReceipt {
1252+
fn from(value: TypedReceipt<Receipt<alloy_rpc_types::Log>>) -> Self {
12531253
let r#type = match value {
12541254
TypedReceipt::Legacy(_) => 0x00,
12551255
TypedReceipt::EIP2930(_) => 0x01,
@@ -1258,7 +1258,7 @@ impl From<TypedReceipt<alloy_rpc_types::Log>> for OtsReceipt {
12581258
TypedReceipt::EIP7702(_) => 0x04,
12591259
TypedReceipt::Deposit(_) => 0x7E,
12601260
} as u8;
1261-
let receipt = ReceiptWithBloom::<alloy_rpc_types::Log>::from(value);
1261+
let receipt = ReceiptWithBloom::<Receipt<alloy_rpc_types::Log>>::from(value);
12621262
let status = receipt.status();
12631263
let cumulative_gas_used = receipt.cumulative_gas_used() as u64;
12641264
let logs = receipt.logs().to_vec();
@@ -1282,7 +1282,7 @@ impl TypedReceipt {
12821282
}
12831283
}
12841284

1285-
impl From<ReceiptEnvelope<alloy_rpc_types::Log>> for TypedReceipt<alloy_rpc_types::Log> {
1285+
impl From<ReceiptEnvelope<alloy_rpc_types::Log>> for TypedReceipt<Receipt<alloy_rpc_types::Log>> {
12861286
fn from(value: ReceiptEnvelope<alloy_rpc_types::Log>) -> Self {
12871287
match value {
12881288
ReceiptEnvelope::Legacy(r) => Self::Legacy(r),
@@ -1439,7 +1439,7 @@ impl Decodable2718 for TypedReceipt {
14391439
}
14401440
}
14411441

1442-
pub type ReceiptResponse = TransactionReceipt<TypedReceipt<alloy_rpc_types::Log>>;
1442+
pub type ReceiptResponse = TransactionReceipt<TypedReceipt<Receipt<alloy_rpc_types::Log>>>;
14431443

14441444
pub fn convert_to_anvil_receipt(receipt: AnyTransactionReceipt) -> Option<ReceiptResponse> {
14451445
let WithOtherFields {

crates/anvil/src/eth/backend/mem/storage.rs

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -555,15 +555,12 @@ impl MinedTransaction {
555555
}
556556
GethDebugBuiltInTracerType::CallTracer => {
557557
return match tracer_config.into_call_config() {
558-
Ok(call_config) => Ok(GethTraceBuilder::new(
559-
self.info.traces.clone(),
560-
TracingInspectorConfig::from_geth_config(&config),
561-
)
562-
.geth_call_traces(
563-
call_config,
564-
self.receipt.cumulative_gas_used() as u64,
565-
)
566-
.into()),
558+
Ok(call_config) => Ok(GethTraceBuilder::new(self.info.traces.clone())
559+
.geth_call_traces(
560+
call_config,
561+
self.receipt.cumulative_gas_used() as u64,
562+
)
563+
.into()),
567564
Err(e) => Err(RpcError::invalid_params(e.to_string()).into()),
568565
};
569566
}
@@ -579,16 +576,13 @@ impl MinedTransaction {
579576
}
580577

581578
// default structlog tracer
582-
Ok(GethTraceBuilder::new(
583-
self.info.traces.clone(),
584-
TracingInspectorConfig::from_geth_config(&config),
585-
)
586-
.geth_traces(
587-
self.receipt.cumulative_gas_used() as u64,
588-
self.info.out.clone().unwrap_or_default(),
589-
opts.config,
590-
)
591-
.into())
579+
Ok(GethTraceBuilder::new(self.info.traces.clone())
580+
.geth_traces(
581+
self.receipt.cumulative_gas_used() as u64,
582+
self.info.out.clone().unwrap_or_default(),
583+
config,
584+
)
585+
.into())
592586
}
593587
}
594588

crates/cast/tests/cli/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ totalDifficulty [..]
104104
blobGasUsed [..]
105105
excessBlobGas [..]
106106
requestsHash [..]
107+
targetBlobsPerBlock [..]
107108
transactions: [
108109
...
109110
]

crates/cheatcodes/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ alloy-signer-local = { workspace = true, features = [
4545
] }
4646
parking_lot.workspace = true
4747
alloy-consensus = { workspace = true, features = ["k256"] }
48+
alloy-network.workspace = true
4849
alloy-rlp.workspace = true
4950

5051
base64.workspace = true

crates/cheatcodes/src/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use super::string::parse;
44
use crate::{Cheatcode, Cheatcodes, CheatcodesExecutor, CheatsCtxt, Result, Vm::*};
55
use alloy_dyn_abi::DynSolType;
66
use alloy_json_abi::ContractObject;
7+
use alloy_network::AnyTransactionReceipt;
78
use alloy_primitives::{hex, map::Entry, Bytes, U256};
89
use alloy_provider::network::ReceiptResponse;
9-
use alloy_rpc_types::AnyTransactionReceipt;
1010
use alloy_sol_types::SolValue;
1111
use dialoguer::{Input, Password};
1212
use forge_script_sequence::{BroadcastReader, TransactionWithMetadata};

crates/common/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ alloy-transport-ipc.workspace = true
4343
alloy-transport-ws.workspace = true
4444
alloy-transport.workspace = true
4545
alloy-consensus = { workspace = true, features = ["k256"] }
46+
alloy-network.workspace = true
4647

4748
tower.workspace = true
4849

crates/common/fmt/src/ui.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
//! Helper trait and functions to format Ethereum types.
22
33
use alloy_consensus::{
4-
AnyReceiptEnvelope, Eip658Value, Receipt, ReceiptWithBloom, Transaction as TxTrait, TxEnvelope,
5-
TxType,
4+
Eip658Value, Receipt, ReceiptWithBloom, Transaction as TxTrait, TxEnvelope, TxType,
5+
};
6+
use alloy_network::{
7+
AnyHeader, AnyReceiptEnvelope, AnyRpcBlock, AnyTransactionReceipt, AnyTxEnvelope,
8+
ReceiptResponse,
69
};
7-
use alloy_network::{AnyHeader, AnyRpcBlock, AnyTxEnvelope, ReceiptResponse};
810
use alloy_primitives::{hex, Address, Bloom, Bytes, FixedBytes, Uint, I256, U256, U64, U8};
911
use alloy_rpc_types::{
10-
AccessListItem, AnyTransactionReceipt, Block, BlockTransactions, Header, Log, Transaction,
11-
TransactionReceipt,
12+
AccessListItem, Block, BlockTransactions, Header, Log, Transaction, TransactionReceipt,
1213
};
1314
use alloy_serde::{OtherFields, WithOtherFields};
1415
use serde::Deserialize;
@@ -900,6 +901,7 @@ fn pretty_block_basics<T>(block: &Block<T, alloy_rpc_types::Header<AnyHeader>>)
900901
excess_blob_gas,
901902
parent_beacon_block_root,
902903
requests_hash,
904+
target_blobs_per_block,
903905
},
904906
},
905907
uncles: _,
@@ -931,7 +933,8 @@ withdrawalsRoot {}
931933
totalDifficulty {}
932934
blobGasUsed {}
933935
excessBlobGas {}
934-
requestsHash {}",
936+
requestsHash {}
937+
targetBlobsPerBlock {}",
935938
base_fee_per_gas.pretty(),
936939
difficulty.pretty(),
937940
extra_data.pretty(),
@@ -959,6 +962,7 @@ requestsHash {}",
959962
blob_gas_used.pretty(),
960963
excess_blob_gas.pretty(),
961964
requests_hash.pretty(),
965+
target_blobs_per_block.pretty(),
962966
)
963967
}
964968

0 commit comments

Comments
 (0)