-32602 Invalid UserOperation

More about the -32602 Invalid UserOperation error code

This code indicates that the user operation sent to the bundler is invalid.

Check that all fields of your user operation are correct. The fields in a user operation are:

FieldTypeDescription
senderaddressThe address of the smart account sending the User Operation.
nonceuint256Anti-replay protection.
initCodebytesCode used to deploy the sender if not yet on-chain.
callDatabytesData that's passed to the sender for execution.
callGasLimituint256Gas limit for the execution phase.
verificationGasLimituint256Gas limit for the verification phase.
preVerificationGasuint256Gas to compensate the bundler for the overhead to submit the User Operation.
maxFeePerGasuint256Similar to EIP-1559 maxFeePerGas
maxPriorityFeePerGasuint256Similar to EIP-1559 maxPriorityFeePerGas.
paymasterAndDatabytesPaymaster contract address and any extra data the paymaster contract needs for verification and execution. When set to 0x or the zero address, no paymaster is used.
signaturebytesUsed to validate a User Operation during verification.