diff --git a/crates/builder/src/transaction_tracker.rs b/crates/builder/src/transaction_tracker.rs index 65430ba07..87f99fce2 100644 --- a/crates/builder/src/transaction_tracker.rs +++ b/crates/builder/src/transaction_tracker.rs @@ -806,7 +806,6 @@ mod tests { from: Address::ZERO, to: None, contract_address: None, - state_root: None, authorization_list: None, })) }); diff --git a/crates/provider/src/alloy/entry_point/v0_7.rs b/crates/provider/src/alloy/entry_point/v0_7.rs index 957e8522d..15e30ab97 100644 --- a/crates/provider/src/alloy/entry_point/v0_7.rs +++ b/crates/provider/src/alloy/entry_point/v0_7.rs @@ -538,11 +538,11 @@ fn get_handle_ops_call, T: Transport + Clone>( .map(|op| { if let Some(authorization) = &op.authorization_tuple { authorization_list.push(SignedAuthorization::from(authorization.clone())); - let contract_address = authorization.address.clone(); + let contract_address = authorization.address; add_simulations_7702_override( &mut override_7702, contract_address, - op.sender().clone(), + op.sender(), ); } op.pack() @@ -552,27 +552,22 @@ fn get_handle_ops_call, T: Transport + Clone>( signature: uoa.signature, }) .collect(); + let mut txn_request: TransactionRequest; if ops_per_aggregator.len() == 1 && ops_per_aggregator[0].aggregator == Address::ZERO { - ( - entry_point - .handleOps(ops_per_aggregator.swap_remove(0).userOps, beneficiary) - .gas(gas) - .into_transaction_request() - .transaction_type(alloy_eips::eip7702::constants::EIP7702_TX_TYPE_ID) - .with_authorization_list(authorization_list), - override_7702, - ) + txn_request = entry_point + .handleOps(ops_per_aggregator.swap_remove(0).userOps, beneficiary) + .gas(gas) + .into_transaction_request(); } else { - ( - entry_point - .handleAggregatedOps(ops_per_aggregator, beneficiary) - .gas(gas) - .into_transaction_request() - .transaction_type(alloy_eips::eip7702::constants::EIP7702_TX_TYPE_ID) - .with_authorization_list(authorization_list), - override_7702, - ) + txn_request = entry_point + .handleAggregatedOps(ops_per_aggregator, beneficiary) + .gas(gas) + .into_transaction_request(); + } + if !authorization_list.is_empty() { + txn_request = txn_request.with_authorization_list(authorization_list); } + (txn_request, override_7702) } fn decode_validation_revert_payload(err: ErrorPayload) -> ValidationRevert { diff --git a/crates/rpc/src/eth/events/mod.rs b/crates/rpc/src/eth/events/mod.rs index 0355992cd..ad7549554 100644 --- a/crates/rpc/src/eth/events/mod.rs +++ b/crates/rpc/src/eth/events/mod.rs @@ -246,7 +246,6 @@ mod tests { from: Address::ZERO, to: None, contract_address: None, - state_root: None, authorization_list: None, } } diff --git a/crates/sim/src/simulation/unsafe_sim.rs b/crates/sim/src/simulation/unsafe_sim.rs index 8209f0969..92e6656dc 100644 --- a/crates/sim/src/simulation/unsafe_sim.rs +++ b/crates/sim/src/simulation/unsafe_sim.rs @@ -118,10 +118,12 @@ where None }; - if validation_result.return_info.account_sig_failed - || validation_result.return_info.paymaster_sig_failed - { - violations.push(SimulationViolation::InvalidSignature); + if validation_result.return_info.account_sig_failed { + violations.push(SimulationViolation::InvalidAccountSignature); + } + + if validation_result.return_info.paymaster_sig_failed { + violations.push(SimulationViolation::InvalidPaymasterSignature); } if !violations.is_empty() { diff --git a/crates/types/src/user_operation/v0_6.rs b/crates/types/src/user_operation/v0_6.rs index 36b149078..971e21dc3 100644 --- a/crates/types/src/user_operation/v0_6.rs +++ b/crates/types/src/user_operation/v0_6.rs @@ -475,17 +475,14 @@ impl UserOperationOptionalGas { super::default_if_none_or_equal(self.verification_gas_limit, max_verification_gas, 0); let pvg = super::default_if_none_or_equal(self.pre_verification_gas, max_call_gas, 0); - let authorization_tuple = match self.contract_address { - Some(address) => Some(Authorization { - chain_id: chain_spec.id, - address: address, - nonce: 0, - y_parity: 0, - r: U256::from(0), - s: U256::from(0), - }), - None => None, - }; + let authorization_tuple = self.contract_address.map(|address| Authorization { + chain_id: chain_spec.id, + address, + nonce: 0, + y_parity: 0, + r: U256::from(0), + s: U256::from(0), + }); let required = UserOperationRequiredFields { sender: self.sender, nonce: self.nonce, @@ -501,7 +498,7 @@ impl UserOperationOptionalGas { max_priority_fee_per_gas: self.max_priority_fee_per_gas.unwrap_or_default(), }; let extended = ExtendedUserOperation { - authorization_tuple: authorization_tuple, + authorization_tuple, }; UserOperationBuilder::new(chain_spec, required, extended)