I am using this code(https://github.com/laishawadhwa/Gasless-NFT-Minting-BCNMY/blob/main/nft_mint_usdc_paymaster/src/index.ts) to mint an NFT by paying gas fees in ERC 20 token (contrcat address: 0xda5289fcaaf71d52a80a254da614a192b693e977)
I am running into this issue
error received { code: -32501, message: ‘AA34 signature error’ }
My private key is correctly configured and the smart contrat account was generated without any hassle
What could be the underlying issue?
and how to troubleshoot this?
My wallet has enough USDC token available to pay the fee
Hi Laisha, I looked at your code.
I see you’re sending flag calculateGasLimits: true
in this case,
// Returned gas limits must be replaced in your op as you update paymasterAndData.
// Because these are the limits paymaster service signed on to generate paymasterAndData
so I suggest making following change,
below this line, finalUserOp.paymasterAndData = paymasterAndDataWithLimits.paymasterAndData;
please add
finalUserOp.callGasLimit = paymasterAndDataResponse.callGasLimit;
finalUserOp.verificationGasLimit =
paymasterAndDataResponse.verificationGasLimit;
finalUserOp.preVerificationGas =
paymasterAndDataResponse.preVerificationGas;