Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
Mainly corrects for alloy-rs/alloy#1510 yet also
corrects a missing machete ignore.
  • Loading branch information
kayabaNerve committed Oct 17, 2024
1 parent bbe014c commit 28619fb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions patches/tiny-bip39/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ rust-version = "1.70"
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.cargo-machete]
ignored = ["tiny-bip39"]

[lib]
name = "bip39"
path = "src/lib.rs"
Expand Down
11 changes: 6 additions & 5 deletions processor/src/networks/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -918,16 +918,17 @@ impl<D: Db> Network for Ethereum<D> {
.into(),
};

use ethereum_serai::alloy::{primitives::Signature, consensus::SignableTransaction};
use ethereum_serai::alloy::{
primitives::{Parity, Signature},
consensus::SignableTransaction,
};
let sig = k256::ecdsa::SigningKey::from(k256::elliptic_curve::NonZeroScalar::new(key).unwrap())
.sign_prehash_recoverable(tx.signature_hash().as_ref())
.unwrap();

let mut bytes = vec![];
tx.encode_with_signature_fields(
&Signature::from(sig).with_chain_id(self.provider.get_chain_id().await.unwrap()),
&mut bytes,
);
let parity = Parity::NonEip155(Parity::from(sig.1).y_parity());
tx.encode_with_signature_fields(&Signature::from(sig).with_parity(parity), &mut bytes);
let pending_tx = self.provider.send_raw_transaction(&bytes).await.ok().unwrap();

// Mine an epoch containing this TX
Expand Down
5 changes: 3 additions & 2 deletions tests/processor/src/networks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ impl Wallet {
use std::sync::Arc;
use ethereum_serai::{
alloy::{
primitives::{U256, Signature, TxKind},
primitives::{U256, Parity, Signature, TxKind},
sol_types::SolCall,
simple_request_transport::SimpleRequest,
consensus::{TxLegacy, SignableTransaction},
Expand Down Expand Up @@ -389,7 +389,8 @@ impl Wallet {
.unwrap();

let mut bytes = vec![];
tx.encode_with_signature_fields(&Signature::from(sig), &mut bytes);
let parity = Parity::NonEip155(Parity::from(sig.1).y_parity());
tx.encode_with_signature_fields(&Signature::from(sig).with_parity(parity), &mut bytes);

// We drop the bottom 10 decimals
(
Expand Down

0 comments on commit 28619fb

Please sign in to comment.