Reputation: 103
In my paymaster contract, I want to carry out validation (in _validatePaymasterUserOp) of the userop signature for certain operations. To do this I'm executing ECDSA.recover(ECDSA.toEthSignedMessageHash(userOpHash), op.signature) and comparing the result to an address I've stored in the contract.
However, during the gas estimation phase the signature is just some (recommended) dummy - given that the userOpHash can't be calculated until after estimating the gas and providing the gas figures in the userOperation.
How can I distinguish between gas estimate phase and actual validation phase during the execution of _validatePaymasterUserOp?
Upvotes: 1
Views: 25