Paymaster Errors
A guide to common errors for Stackup's ERC-4337 paymaster
General error messages
Stackup's paymaster parses User Operation data before approving to sponsor gas.
Message | Description |
---|---|
-32521 Execution reverted | The paymaster simulated the user operation to estimate the gas cost and found that the execution will revert. To troubleshoot this error, we recommend double-checking the logic that you used to create the user operation's callData . If you are batching calls, test each call separately to identify the culprit. If you are unable to quickly identify the issue, you may need to simulate the user operation. |
userOp: invalid sender | The sender field of the user operation is not a valid address. |
userOp: invalid nonce | The nonce field of the user operation is not in a valid format. |
userOp: invalid initCode | The initCode field of the user operation is not in a valid format. |
userOp: invalid callData | The callData field of the user operation is not in a valid format. |
userOp: invalid callGasLimit | The callGasLimit field of the user operation is not in a valid format. |
userOp: invalid verificationGasLimit | The verificationGasLimit field of the user operation is not in a valid format. |
userOp: invalid preVerificationGas | The preVerificationGas field of the user operation is not in a valid format. |
userOp: invalid maxFeePerGas | The maxFeePerGas field of the user operation is not in a valid format. |
userOp: invalid maxPriorityFeePerGas | The maxPriorityFeePerGas field of the user operation is not in a valid format. |
userOp: invalid paymasterAndData | The paymasterAndData field of the user operation is not in a valid format. |
userOp: invalid signature | The signature field of the user operation is not in a valid format. |
userOp: incorrect number of fields | The user operation does not contain the expected number of fields. |
params: not a valid tuple of UserOperation and EntryPoint address | The parameters sent with pm_sponsorUserOperation is not in the expected format. |
entryPoint: not a valid address | The Entry Point address in the pm_sponsorUserOperation call is not valid. |
Paymaster RPC errors
An overview of custom JSON-RPC error responses related to the Paymaster API.
Code | Message | Description |
---|---|---|
-32031 | simulation: insufficient token payments | Simulation has failed to show that the paymaster was compensated a sufficient amount of tokens for an erc20token call to pm_sponsorUserOperation . Ensure that the paymaster address has been approved for an appropriate amount. |
Updated 9 months ago