Skip to content

Commit

Permalink
patch core
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr committed Oct 30, 2024
1 parent 21765f2 commit 58d4cc4
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 32 deletions.
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,9 @@ tempfile = "3.10"
tower-http = "0.6.1"

[patch.crates-io]
alloy-eip7702 = { git = "https://github.com/alloy-rs/eips", rev = "c3ab112" }
alloy-eip7702 = { git = "https://github.com/alloy-rs/eips", rev = "9e6fcee" }
alloy-core = { git = "https://github.com/alloy-rs/core", rev = "237cfc4" }
alloy-dyn-abi = { git = "https://github.com/alloy-rs/core", rev = "237cfc4" }
alloy-json-abi = { git = "https://github.com/alloy-rs/core", rev = "237cfc4" }
alloy-primitives = { git = "https://github.com/alloy-rs/core", rev = "237cfc4" }
alloy-sol-types = { git = "https://github.com/alloy-rs/core", rev = "237cfc4" }
2 changes: 1 addition & 1 deletion crates/consensus/src/signed.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::transaction::{RlpEcdsaTx, SignableTransaction};
use alloy_eips::eip2718::Eip2718Result;
use alloy_primitives::{PrimitiveSignature as Signature, B256};
use alloy_primitives::{Signature, B256};
use alloy_rlp::BufMut;

/// A transaction with a signature and hash seal.
Expand Down
6 changes: 2 additions & 4 deletions crates/consensus/src/transaction/eip1559.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{transaction::RlpEcdsaTx, SignableTransaction, Signed, Transaction, TxType};
use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization};
use alloy_primitives::{Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256};
use alloy_primitives::{Bytes, ChainId, Signature, TxKind, B256, U256};
use alloy_rlp::{BufMut, Decodable, Encodable};
use core::mem;

Expand Down Expand Up @@ -394,9 +394,7 @@ mod tests {
use super::TxEip1559;
use crate::{transaction::RlpEcdsaTx, SignableTransaction};
use alloy_eips::eip2930::AccessList;
use alloy_primitives::{
address, b256, hex, Address, PrimitiveSignature as Signature, B256, U256,
};
use alloy_primitives::{address, b256, hex, Address, Signature, B256, U256};

#[test]
fn recover_signer_eip1559() {
Expand Down
4 changes: 2 additions & 2 deletions crates/consensus/src/transaction/eip2930.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{SignableTransaction, Signed, Transaction, TxType};
use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization};
use alloy_primitives::{Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256};
use alloy_primitives::{Bytes, ChainId, Signature, TxKind, B256, U256};
use alloy_rlp::{BufMut, Decodable, Encodable};
use core::mem;

Expand Down Expand Up @@ -223,7 +223,7 @@ impl Decodable for TxEip2930 {
mod tests {
use super::TxEip2930;
use crate::{transaction::RlpEcdsaTx, SignableTransaction, TxEnvelope};
use alloy_primitives::{Address, PrimitiveSignature as Signature, TxKind, U256};
use alloy_primitives::{Address, Signature, TxKind, U256};
use alloy_rlp::{Decodable, Encodable};

#[test]
Expand Down
6 changes: 2 additions & 4 deletions crates/consensus/src/transaction/eip4844.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ use crate::{SignableTransaction, Signed, Transaction, TxType};

use alloc::vec::Vec;
use alloy_eips::{eip2930::AccessList, eip4844::DATA_GAS_PER_BLOB, eip7702::SignedAuthorization};
use alloy_primitives::{
Address, Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256,
};
use alloy_primitives::{Address, Bytes, ChainId, Signature, TxKind, B256, U256};
use alloy_rlp::{Buf, BufMut, Decodable, Encodable, Header};
use core::mem;

Expand Down Expand Up @@ -897,7 +895,7 @@ mod tests {
use super::{BlobTransactionSidecar, TxEip4844, TxEip4844WithSidecar};
use crate::{transaction::eip4844::TxEip4844Variant, SignableTransaction, TxEnvelope};
use alloy_eips::eip2930::AccessList;
use alloy_primitives::{address, b256, bytes, PrimitiveSignature as Signature, U256};
use alloy_primitives::{address, b256, bytes, Signature, U256};
use alloy_rlp::{Decodable, Encodable};

#[test]
Expand Down
6 changes: 2 additions & 4 deletions crates/consensus/src/transaction/eip7702.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ use alloy_eips::{
eip2930::AccessList,
eip7702::{constants::EIP7702_TX_TYPE_ID, SignedAuthorization},
};
use alloy_primitives::{
Address, Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256,
};
use alloy_primitives::{Address, Bytes, ChainId, Signature, TxKind, B256, U256};
use alloy_rlp::{BufMut, Decodable, Encodable};
use core::mem;

Expand Down Expand Up @@ -395,7 +393,7 @@ mod tests {
use super::*;
use crate::SignableTransaction;
use alloy_eips::eip2930::AccessList;
use alloy_primitives::{address, b256, hex, Address, PrimitiveSignature as Signature, U256};
use alloy_primitives::{address, b256, hex, Address, Signature, U256};

#[test]
fn encode_decode_eip7702() {
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ mod tests {
};
#[allow(unused_imports)]
use alloy_primitives::{b256, Bytes, TxKind};
use alloy_primitives::{hex, Address, PrimitiveSignature as Signature, U256};
use alloy_primitives::{hex, Address, Signature, U256};
use std::{fs, path::PathBuf, str::FromStr, vec};

#[cfg(not(feature = "std"))]
Expand Down
8 changes: 2 additions & 6 deletions crates/consensus/src/transaction/legacy.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use crate::{transaction::RlpEcdsaTx, SignableTransaction, Signed, Transaction, TxType};
use alloc::vec::Vec;
use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization};
use alloy_primitives::{
keccak256, Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256,
};
use alloy_primitives::{keccak256, Bytes, ChainId, Signature, TxKind, B256, U256};
use alloy_rlp::{length_of_length, BufMut, Decodable, Encodable, Header, Result};
use core::mem;

Expand Down Expand Up @@ -605,9 +603,7 @@ pub(super) mod serde_bincode_compat {
#[cfg(all(test, feature = "k256"))]
mod tests {
use crate::{SignableTransaction, TxLegacy};
use alloy_primitives::{
address, b256, hex, Address, PrimitiveSignature as Signature, TxKind, B256, U256,
};
use alloy_primitives::{address, b256, hex, Address, Signature, TxKind, B256, U256};

#[test]
fn recover_signer_legacy() {
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/rlp.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{SignableTransaction, Signed};
use alloc::vec::Vec;
use alloy_eips::eip2718::{Eip2718Error, Eip2718Result};
use alloy_primitives::{keccak256, PrimitiveSignature as Signature, TxHash};
use alloy_primitives::{keccak256, Signature, TxHash};
use alloy_rlp::{Buf, BufMut, Decodable, Encodable, Header};

/// Helper trait for managing RLP encoding of transactions inside 2718
Expand Down
2 changes: 1 addition & 1 deletion crates/network/src/ethereum/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ mod tests {
};
use alloy_consensus::{BlobTransactionSidecar, TxEip1559, TxType, TypedTransaction};
use alloy_eips::eip7702::Authorization;
use alloy_primitives::{Address, PrimitiveSignature as Signature};
use alloy_primitives::{Address, Signature};
use alloy_rpc_types_eth::{AccessList, TransactionRequest};
use std::str::FromStr;

Expand Down
2 changes: 1 addition & 1 deletion crates/rpc-types-eth/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ impl TransactionResponse for Transaction {
#[cfg(test)]
mod tests {
use super::*;
use alloy_primitives::PrimitiveSignature as AlloySignature;
use alloy_primitives::Signature as AlloySignature;
use arbitrary::Arbitrary;
use core::str::FromStr;
use rand::Rng;
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc-types-eth/src/transaction/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ where
}
}

impl TryFrom<Signature> for alloy_primitives::PrimitiveSignature {
impl TryFrom<Signature> for alloy_primitives::Signature {
type Error = alloy_primitives::SignatureError;

fn try_from(value: Signature) -> Result<Self, Self::Error> {
Expand Down
2 changes: 1 addition & 1 deletion crates/signer-local/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use alloy_consensus::SignableTransaction;
use alloy_network::{TxSigner, TxSignerSync};
use alloy_primitives::{Address, ChainId, PrimitiveSignature as Signature, B256};
use alloy_primitives::{Address, ChainId, Signature, B256};
use alloy_signer::{sign_transaction_with_chain_id, Result, Signer, SignerSync};
use async_trait::async_trait;
use k256::ecdsa::{self, signature::hazmat::PrehashSigner, RecoveryId};
Expand Down
2 changes: 1 addition & 1 deletion crates/signer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub use signer::{Signer, SignerSync};

pub mod utils;

pub use alloy_primitives::PrimitiveSignature as Signature;
pub use alloy_primitives::Signature;
pub use k256;

/// Utility to get and set the chain ID on a transaction and the resulting signature within a
Expand Down
4 changes: 1 addition & 3 deletions crates/signer/src/signer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use crate::Result;
use alloy_primitives::{
eip191_hash_message, Address, ChainId, PrimitiveSignature as Signature, B256,
};
use alloy_primitives::{eip191_hash_message, Address, ChainId, Signature, B256};
use async_trait::async_trait;
use auto_impl::auto_impl;

Expand Down

0 comments on commit 58d4cc4

Please sign in to comment.