Links
Comment on page

Data Validator

The Data Validator is a hook contract that you can enable on a permission. When enabled it performs custom checks on the data you pass to it and returns a boolean to validate the operation.
This can be used to perform additional checks on the current blockchain state like the ownership of a specific ERC721 or a minimum balance of ERC20. The possibilities are endless.
Be careful to respect ERC-4337 storage rules: https://eips.ethereum.org/EIPS/eip-4337#simulation