AA13 initCode failed or OOG
The initCode
failed to create the account or ran out of gas.
The initCode
failed to create the account or ran out of gas. "OOG" is an abbreviation for Out-Of-Gas.
There are two causes:
- The
initCode
ran out of gas - The
initCode
has an error.
Solutions
- Check the account has ETH to pay for its creation if you aren't using a paymaster.
- If you are using a paymaster, verify the paymaster is set.
- Check that the first 20 bytes of the
initCode
are the factory address. - Verify that the
verificationGasLimit
is high enough to pay for theinitCode
.- Simple user operations should be between 50,000 and 100,000 gas, while more complex user operations can be as much as 2 million gas.
- Check your
verificationGasLimit
against the values returned byeth_estimateUserOperationGas
andpm_sponsorUserOperation
API methods. - If you are hard-coding the
verificationGasLimit
, consider using theeth_estimateUserOperationGas
limit.
- Investigate why the
initCode
used more gas than expected using tools like userop.dev, Tenderly, or the ERC-4337 Devnet. - Reach out to your bundler provider or ask a question in the Stackup Discord server for help. Be sure to include the user operation and any relevant information about how you're building it.
Updated 8 months ago