from to new
This commit is contained in:
parent
94a369b9df
commit
90e25dc6cf
@ -40,8 +40,7 @@ pub enum Error {
|
||||
PayloadIdUnavailable,
|
||||
TransitionConfigurationMismatch,
|
||||
PayloadConversionLogicFlaw,
|
||||
DeserializeTransaction(ssz_types::Error),
|
||||
DeserializeTransactions(ssz_types::Error),
|
||||
SszError(ssz_types::Error),
|
||||
DeserializeWithdrawals(ssz_types::Error),
|
||||
BuilderApi(builder_client::Error),
|
||||
IncorrectStateVariant,
|
||||
@ -89,6 +88,12 @@ impl From<rlp::DecoderError> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ssz_types::Error> for Error {
|
||||
fn from(e: ssz_types::Error) -> Self {
|
||||
Error::SszError(e)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, IntoStaticStr)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum PayloadStatusV1Status {
|
||||
|
@ -2084,7 +2084,6 @@ fn noop<T: EthSpec>(_: &ExecutionLayer<T>, _: &ExecutionPayload<T>) -> Option<Ex
|
||||
fn ethers_tx_to_bytes<T: EthSpec>(
|
||||
transaction: &Transaction,
|
||||
) -> Result<SszTransaction<T::MaxBytesPerTransaction>, ApiError> {
|
||||
|
||||
let tx_type = transaction
|
||||
.transaction_type
|
||||
.ok_or(ApiError::BlobTxConversionError)?
|
||||
@ -2103,22 +2102,23 @@ fn ethers_tx_to_bytes<T: EthSpec>(
|
||||
let gas = std::cmp::min(transaction.gas, Uint256::from(u64::MAX)).as_u64();
|
||||
let to = transaction.to;
|
||||
let value = transaction.value;
|
||||
let data = VariableList::from(transaction.input.to_vec());
|
||||
let data = VariableList::new(transaction.input.to_vec())?;
|
||||
|
||||
let access_list = VariableList::from(
|
||||
let access_list = VariableList::new(
|
||||
transaction
|
||||
.access_list.as_ref()
|
||||
.access_list
|
||||
.as_ref()
|
||||
.ok_or(ApiError::BlobTxConversionError)?
|
||||
.0
|
||||
.iter()
|
||||
.map(|access_tuple| {
|
||||
Ok(AccessTuple {
|
||||
address: access_tuple.address,
|
||||
storage_keys: VariableList::from(access_tuple.storage_keys.clone()),
|
||||
storage_keys: VariableList::new(access_tuple.storage_keys.clone())?,
|
||||
})
|
||||
})
|
||||
.collect::<Result<Vec<AccessTuple>, ApiError>>()?,
|
||||
);
|
||||
)?;
|
||||
let max_fee_per_data_gas = transaction
|
||||
.other
|
||||
.get("max_fee_per_data_gas")
|
||||
|
Loading…
Reference in New Issue
Block a user