Description
Questions/comments from @JohnGuilding:
-
Why did you opt to build an executor and a validator? As opposed to keeping all logic in the validator?
-
When running
SIMULATE=true forge test --ffi
, I get two failures:Failing tests: Encountered 2 failing tests in test/integration/IntegrationTest.t.sol:IntegrationTest [FAIL: revert: UserOperation simulation failed] test_BalanceTransferSingleMemberInitiateTx() (gas: 1789088023) [FAIL: revert: UserOperation simulation failed] test_TxCallMultiMembersInitiateTxSignTxExecuteTx() (gas: 1789747216)
SIMULATE=true
tests against 4337 validation rules (not all of them last I checked but this may have changed) https://github.com/rhinestonewtf/modulekit?tab=readme-ov-file#testing-modulesFor completion of the project, we should make sure that the validator is indeed 4337 compatible and do a full e2e test
-
For the following comment:
//TODO: what is a good way to delete entries associated with `acctTxCount[account]`, // The following line will make the compiler fail. // delete acctTxCount[account];
You could use a mechanism similar to an enumerable map, where you can loop over all the txHashs associated with an account https://docs.openzeppelin.com/contracts/5.x/api/utils#EnumerableMap. Since Solidity doesn't have generics and you are using a custom struct, you could explore a custom enumerable map too https://github.com/zkemail/email-recovery/blob/main/src/libraries/EnumerableGuardianMap.sol