Skip to content

Commit

Permalink
feat: cleanup uo interface to be safer to modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
dancoombs committed Feb 14, 2025
1 parent fdfb2f3 commit 7701bf9
Show file tree
Hide file tree
Showing 26 changed files with 1,103 additions and 799 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

##@ Test

UNIT_TEST_ARGS := --locked --workspace --all-features
UNIT_TEST_ARGS := --locked --workspace --all-features --no-fail-fast
PROFILE ?= release
DOCKER_IMAGE_NAME ?= alchemyplatform/rundler
BIN_DIR = "dist/bin"
Expand Down
10 changes: 5 additions & 5 deletions crates/aggregators/pbh/src/pbh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use rundler_types::{
AggregatorCosts, SignatureAggregator, SignatureAggregatorError, SignatureAggregatorResult,
},
v0_7::UserOperation,
UserOperationVariant,
UserOperation as _, UserOperationVariant,
};

sol! {
Expand Down Expand Up @@ -117,17 +117,17 @@ where
}
let uo: UserOperation = user_op.clone().into();

if uo.signature.len() < PBH_PROOF_LENGTH {
if uo.signature().len() < PBH_PROOF_LENGTH {
return Err(SignatureAggregatorError::InvalidUserOperation(format!(
"User operation signature is not the correct length: {} < {}",
uo.signature.len(),
uo.signature().len(),
PBH_PROOF_LENGTH
)));
}

let proof_start = uo.signature.len() - PBH_PROOF_LENGTH;
let proof_start = uo.signature().len() - PBH_PROOF_LENGTH;
agg_proofs.push(
PBHPayload::abi_decode(&uo.signature[proof_start..], true).map_err(|e| {
PBHPayload::abi_decode(&uo.signature()[proof_start..], true).map_err(|e| {
SignatureAggregatorError::InvalidUserOperation(format!(
"Malformed PBH proof: {}",
e
Expand Down
Loading

0 comments on commit 7701bf9

Please sign in to comment.