Skip to content

Commit

Permalink
chore: clippy / fmt (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evalir authored Oct 19, 2024
1 parent 73f8af8 commit 33044f8
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/fill/alloy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl Tx for Signed<alloy::consensus::TxLegacy> {
authorization_list,
} = tx_env;
*caller = self.recover_signer().unwrap();
*gas_limit = self.tx().gas_limit as u64;
*gas_limit = self.tx().gas_limit;
*gas_price = U256::from(self.tx().gas_price);
*transact_to = self.tx().to;
*value = self.tx().value;
Expand Down Expand Up @@ -55,7 +55,7 @@ impl Tx for Signed<alloy::consensus::TxEip2930> {
authorization_list,
} = tx_env;
*caller = self.recover_signer().unwrap();
*gas_limit = self.tx().gas_limit as u64;
*gas_limit = self.tx().gas_limit;
*gas_price = U256::from(self.tx().gas_price);
*transact_to = self.tx().to;
*value = self.tx().value;
Expand Down Expand Up @@ -88,7 +88,7 @@ impl Tx for Signed<alloy::consensus::TxEip1559> {
authorization_list,
} = tx_env;
*caller = self.recover_signer().unwrap();
*gas_limit = self.tx().gas_limit as u64;
*gas_limit = self.tx().gas_limit;
*gas_price = U256::from(self.tx().max_fee_per_gas);
*transact_to = self.tx().to;
*value = self.tx().value;
Expand Down Expand Up @@ -121,7 +121,7 @@ impl Tx for Signed<alloy::consensus::TxEip4844> {
authorization_list,
} = tx_env;
*caller = self.recover_signer().unwrap();
*gas_limit = self.tx().gas_limit as u64;
*gas_limit = self.tx().gas_limit;
*gas_price = U256::from(self.tx().max_fee_per_gas);
*transact_to = self.tx().to.into();
*value = self.tx().value;
Expand Down Expand Up @@ -154,7 +154,7 @@ impl Tx for Signed<alloy::consensus::TxEip4844WithSidecar> {
authorization_list,
} = tx_env;
*caller = self.recover_signer().unwrap();
*gas_limit = self.tx().tx.gas_limit as u64;
*gas_limit = self.tx().tx.gas_limit;
*gas_price = U256::from(self.tx().tx.max_fee_per_gas);
*transact_to = self.tx().tx.to.into();
*value = self.tx().tx.value;
Expand Down Expand Up @@ -191,7 +191,7 @@ impl Tx for Signed<alloy::consensus::TxEip4844Variant> {
alloy::consensus::TxEip4844Variant::TxEip4844WithSidecar(tx) => &tx.tx,
};
*caller = self.recover_signer().unwrap();
*gas_limit = tx.gas_limit as u64;
*gas_limit = tx.gas_limit;
*gas_price = U256::from(tx.max_fee_per_gas);
*transact_to = tx.to.into();
*value = tx.value;
Expand Down Expand Up @@ -240,7 +240,7 @@ impl Block for alloy::consensus::Header {
*prevrandao = if self.difficulty.is_zero() { Some(self.mix_hash) } else { None };

if let Some(excess_blob_gas) = self.excess_blob_gas {
block_env.set_blob_excess_gas_and_price(excess_blob_gas as u64);
block_env.set_blob_excess_gas_and_price(excess_blob_gas);
}
}

Expand Down Expand Up @@ -268,8 +268,7 @@ impl Block for alloy::rpc::types::eth::Header {
*basefee = U256::from(self.base_fee_per_gas.unwrap_or_default());
*difficulty = U256::from(self.difficulty);
*prevrandao = self.mix_hash;
*blob_excess_gas_and_price =
self.blob_gas_used.map(|ebg| BlobExcessGasAndPrice::new(ebg as u64));
*blob_excess_gas_and_price = self.blob_gas_used.map(BlobExcessGasAndPrice::new);
}
}

Expand Down

0 comments on commit 33044f8

Please sign in to comment.