Skip to content

Commit 0314426

Browse files
authored
chore(deps): core 1.0 (#2184)
* feat(`contract`): remove fake transport and provider traits (#1996) * rm fake traits from alloy-contract * rm fake transports from CallBuilder, Event, Instance * use core patch * nit * fix * address breaking changes except contract crate * address breaking changes in contract * breaking: rm `validate` from `CallDecoder` and `Interface` * fmt * fix doctests * bump to 85850de * update core * bump ssz * bump tree_hash * nit * bump chains * bump trie, eips, hardforks
1 parent 8abd117 commit 0314426

File tree

36 files changed

+134
-186
lines changed

36 files changed

+134
-186
lines changed

Cargo.toml

+16-16
Original file line numberDiff line numberDiff line change
@@ -70,30 +70,30 @@ alloy-transport-ipc = { version = "0.13", path = "crates/transport-ipc", default
7070
alloy-transport-ws = { version = "0.13", path = "crates/transport-ws", default-features = false }
7171
alloy-eip5792 = { version = "0.13", path = "crates/eip5792", default-features = false }
7272

73-
alloy-core = { version = "0.8.22", default-features = false }
74-
alloy-dyn-abi = { version = "0.8.22", default-features = false }
75-
alloy-json-abi = { version = "0.8.22", default-features = false }
76-
alloy-primitives = { version = "0.8.22", default-features = false }
77-
alloy-sol-types = { version = "0.8.22", default-features = false }
73+
alloy-core = { version = "1.0.0", default-features = false }
74+
alloy-dyn-abi = { version = "1.0.0", default-features = false }
75+
alloy-json-abi = { version = "1.0.0", default-features = false }
76+
alloy-primitives = { version = "1.0.0", default-features = false }
77+
alloy-sol-types = { version = "1.0.0", default-features = false }
7878

7979
alloy-rlp = { version = "0.3.9", default-features = false }
80-
alloy-trie = { version = "0.7.6", default-features = false }
80+
alloy-trie = { version = "0.8.0", default-features = false }
8181

82-
alloy-chains = { version = "0.1.18", default-features = false }
82+
alloy-chains = { version = "0.2", default-features = false }
8383

8484
# eips
85-
alloy-eip2124 = { version = "0.1.0", default-features = false }
86-
alloy-eip2930 = { version = "0.1.0", default-features = false }
87-
alloy-eip7702 = { version = "0.5.1", default-features = false }
85+
alloy-eip2124 = { version = "0.2.0", default-features = false }
86+
alloy-eip2930 = { version = "0.2.0", default-features = false }
87+
alloy-eip7702 = { version = "0.6.0", default-features = false }
8888

8989
# hardforks
90-
alloy-hardforks = "0.1.0"
90+
alloy-hardforks = "0.2.0"
9191

9292
# ethereum
93-
ethereum_ssz_derive = "0.8"
94-
ethereum_ssz = "0.8"
95-
tree_hash = "0.9.1"
96-
tree_hash_derive = "0.9.1"
93+
ethereum_ssz_derive = "0.9"
94+
ethereum_ssz = "0.9"
95+
tree_hash = "0.10.0"
96+
tree_hash_derive = "0.10.0"
9797

9898
# crypto
9999
c-kzg = { version = "2.1", default-features = false }
@@ -174,4 +174,4 @@ ci_info = "0.14.14"
174174
serial_test = "3.0"
175175
similar-asserts = "1.5"
176176
tempfile = "3.10"
177-
tower-http = "0.6.1"
177+
tower-http = "0.6.1"

crates/consensus/src/signed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::transaction::{RlpEcdsaDecodableTx, RlpEcdsaEncodableTx, SignableTransaction};
22
use alloy_eips::eip2718::Eip2718Result;
3-
use alloy_primitives::{PrimitiveSignature as Signature, B256};
3+
use alloy_primitives::{Signature, B256};
44
use alloy_rlp::BufMut;
55
use core::hash::{Hash, Hasher};
66
#[cfg(not(feature = "std"))]

crates/consensus/src/transaction/eip1559.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{SignableTransaction, Transaction, TxType};
22
use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization, Typed2718};
3-
use alloy_primitives::{Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256};
3+
use alloy_primitives::{Bytes, ChainId, Signature, TxKind, B256, U256};
44
use alloy_rlp::{BufMut, Decodable, Encodable};
55
use core::mem;
66

@@ -421,9 +421,7 @@ mod tests {
421421
SignableTransaction,
422422
};
423423
use alloy_eips::eip2930::AccessList;
424-
use alloy_primitives::{
425-
address, b256, hex, Address, PrimitiveSignature as Signature, B256, U256,
426-
};
424+
use alloy_primitives::{address, b256, hex, Address, Signature, B256, U256};
427425

428426
#[test]
429427
fn recover_signer_eip1559() {

crates/consensus/src/transaction/eip2930.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{SignableTransaction, Transaction, TxType};
22
use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization, Typed2718};
3-
use alloy_primitives::{Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256};
3+
use alloy_primitives::{Bytes, ChainId, Signature, TxKind, B256, U256};
44
use alloy_rlp::{BufMut, Decodable, Encodable};
55
use core::mem;
66

@@ -251,7 +251,7 @@ impl Decodable for TxEip2930 {
251251
mod tests {
252252
use super::*;
253253
use crate::{SignableTransaction, TxEnvelope};
254-
use alloy_primitives::{Address, PrimitiveSignature as Signature, TxKind, U256};
254+
use alloy_primitives::{Address, Signature, TxKind, U256};
255255
use alloy_rlp::{Decodable, Encodable};
256256

257257
#[test]

crates/consensus/src/transaction/eip4844.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ use alloc::vec::Vec;
44
use alloy_eips::{
55
eip2930::AccessList, eip4844::DATA_GAS_PER_BLOB, eip7702::SignedAuthorization, Typed2718,
66
};
7-
use alloy_primitives::{
8-
Address, Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256,
9-
};
7+
use alloy_primitives::{Address, Bytes, ChainId, Signature, TxKind, B256, U256};
108
use alloy_rlp::{BufMut, Decodable, Encodable, Header};
119
use core::mem;
1210

@@ -1005,7 +1003,7 @@ mod tests {
10051003
use super::{BlobTransactionSidecar, TxEip4844, TxEip4844WithSidecar};
10061004
use crate::{transaction::eip4844::TxEip4844Variant, SignableTransaction, TxEnvelope};
10071005
use alloy_eips::eip2930::AccessList;
1008-
use alloy_primitives::{address, b256, bytes, PrimitiveSignature as Signature, U256};
1006+
use alloy_primitives::{address, b256, bytes, Signature, U256};
10091007
use alloy_rlp::{Decodable, Encodable};
10101008

10111009
#[test]

crates/consensus/src/transaction/eip7702.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ use alloy_eips::{
55
eip7702::{constants::EIP7702_TX_TYPE_ID, SignedAuthorization},
66
Typed2718,
77
};
8-
use alloy_primitives::{
9-
Address, Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256,
10-
};
8+
use alloy_primitives::{Address, Bytes, ChainId, Signature, TxKind, B256, U256};
119
use alloy_rlp::{BufMut, Decodable, Encodable};
1210
use core::mem;
1311

@@ -415,7 +413,7 @@ mod tests {
415413
use super::*;
416414
use crate::SignableTransaction;
417415
use alloy_eips::eip2930::AccessList;
418-
use alloy_primitives::{address, b256, hex, Address, PrimitiveSignature as Signature, U256};
416+
use alloy_primitives::{address, b256, hex, Address, Signature, U256};
419417

420418
#[test]
421419
fn encode_decode_eip7702() {

crates/consensus/src/transaction/envelope.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ use alloy_eips::{
1111
eip2930::AccessList,
1212
Typed2718,
1313
};
14-
use alloy_primitives::{
15-
Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256, U64, U8,
16-
};
14+
use alloy_primitives::{Bytes, ChainId, Signature, TxKind, B256, U256, U64, U8};
1715
use alloy_rlp::{Decodable, Encodable};
1816
use core::{
1917
fmt::{self, Debug},
@@ -1074,7 +1072,7 @@ mod serde_from {
10741072
pub mod serde_bincode_compat {
10751073
use crate::{EthereumTypedTransaction, Signed};
10761074
use alloc::borrow::Cow;
1077-
use alloy_primitives::PrimitiveSignature as Signature;
1075+
use alloy_primitives::Signature;
10781076
use serde::{Deserialize, Deserializer, Serialize, Serializer};
10791077
use serde_with::{DeserializeAs, SerializeAs};
10801078

@@ -1230,9 +1228,9 @@ mod tests {
12301228
eip4844::BlobTransactionSidecar,
12311229
eip7702::Authorization,
12321230
};
1233-
use alloy_primitives::{
1234-
b256, hex, Address, Bytes, PrimitiveSignature as Signature, TxKind, U256,
1235-
};
1231+
#[allow(unused_imports)]
1232+
use alloy_primitives::{b256, Bytes, TxKind};
1233+
use alloy_primitives::{hex, Address, Signature, U256};
12361234
use std::{fs, path::PathBuf, str::FromStr, vec};
12371235

12381236
#[test]

crates/consensus/src/transaction/legacy.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ use crate::{
44
};
55
use alloc::vec::Vec;
66
use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization, Typed2718};
7-
use alloy_primitives::{
8-
keccak256, Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256,
9-
};
7+
use alloy_primitives::{keccak256, Bytes, ChainId, Signature, TxKind, B256, U256};
108
use alloy_rlp::{length_of_length, BufMut, Decodable, Encodable, Header, Result};
119
use core::mem;
1210

@@ -650,9 +648,7 @@ mod tests {
650648
transaction::{from_eip155_value, to_eip155_value},
651649
SignableTransaction, TxLegacy,
652650
};
653-
use alloy_primitives::{
654-
address, b256, hex, Address, PrimitiveSignature as Signature, TxKind, B256, U256,
655-
};
651+
use alloy_primitives::{address, b256, hex, Address, Signature, TxKind, B256, U256};
656652

657653
#[test]
658654
fn recover_signer_legacy() {

crates/consensus/src/transaction/rlp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use alloy_eips::{
44
eip2718::{Eip2718Error, Eip2718Result},
55
Typed2718,
66
};
7-
use alloy_primitives::{keccak256, PrimitiveSignature as Signature, TxHash};
7+
use alloy_primitives::{keccak256, Signature, TxHash};
88
use alloy_rlp::{Buf, BufMut, Decodable, Encodable, Header};
99

1010
/// Helper trait for managing RLP encoding of transactions inside 2718

crates/consensus/src/transaction/typed.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ use crate::{
77
TxLegacy, TxType,
88
};
99
use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization, Typed2718};
10-
use alloy_primitives::{
11-
bytes::BufMut, Bytes, ChainId, PrimitiveSignature as Signature, TxHash, TxKind, B256, U256,
12-
};
10+
use alloy_primitives::{bytes::BufMut, Bytes, ChainId, Signature, TxHash, TxKind, B256, U256};
1311

1412
/// Basic typed transaction which can contain both [`TxEip4844`] and [`TxEip4844WithSidecar`].
1513
pub type TypedTransaction = EthereumTypedTransaction<TxEip4844Variant>;

0 commit comments

Comments
 (0)