Skip to content

Commit baa9fa6

Browse files
committed
test: add comprehensive BTT tests for TOB-KERNEL-1 fix
1 parent 14cb24f commit baa9fa6

File tree

4 files changed

+1238
-3
lines changed

4 files changed

+1238
-3
lines changed

src/policies/TimelockPolicy.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ contract TimelockPolicy is PolicyBase, IStatelessValidator, IStatelessValidatorW
225225

226226
emit ProposalCreated(account, id, userOpKey, validAfter, validUntil);
227227

228-
// Return success with validUntil=0 to persist storage but prevent execution
229-
// EntryPoint will reject because block.timestamp > 0 (validUntil)
228+
// Return success (validationData = 0) to allow the proposal creation to persist
229+
// EntryPoint treats validationData == 0 as valid (no time range check)
230230
return _packValidationData(0, 0);
231231
}
232232

test/TimelockPolicy.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ contract TimelockPolicyTest is PolicyTestBase, StatelessValidatorTestBase, State
284284
uint256 result = policyModule.checkUserOpPolicy(policyId(), userOp);
285285
vm.stopPrank();
286286

287-
// Returns success with validUntil=0 (expired) - state persists but execution fails
287+
// Returns success (validationData = 0) - valid indefinitely per ERC-4337
288288
// This allows proposal creation via UserOp without external caller
289289
assertEq(result, 0);
290290

0 commit comments

Comments
 (0)