Closed francelwebdev closed 8 months ago
I'm getting this error on : await primeSdk.estimate()
checking nonce... 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.ErrorHandler = void 0; 4 | const constants_1 = require("./constants"); 5 | class ErrorHandler extends Error { 6 | constructor(error, code) { 7 | super(error); ^ error: AA21 didn't pay prefund code: "-32500"
This is a valid error which means the wallet you are using doesn't have enough balance to pay for the gas. I suggest you look at examples provided in https://github.com/etherspot/etherspot-prime-sdk/examples
and work from there.
Please refer to https://etherspot.fyi/contracts/error-codes that lists all the common error codes.
ok thanks
I thought that even if there is no balance on the SCW address it would still send me the estimate of the gas cost for the transaction.
I'm building a hybrid dapps (web2 and web3). I have a vuejs frontend and a nodejs backend. When a user registers on the frontend with email and password I create a SCW for him and the user will have to deposit for example USDT OR USDC on the SCW address to be sold.
It is a p2p platform for buying and selling cryptocurrency.
When a buyer purchases and pays, the purchased USDT or USDC will be transferred from the seller's SCW automatically to the buyer's EOA address.
so I need a SCW for sellers and a way to pay transaction fees with for example USDT or USDC or cover transaction fees via a paymasters.
so there must be a balance on the SCW address before you can know the cost of gas for a transaction?
Describe the bug
I'm getting this error on : await primeSdk.estimate()
checking nonce... 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.ErrorHandler = void 0; 4 | const constants_1 = require("./constants"); 5 | class ErrorHandler extends Error { 6 | constructor(error, code) { 7 | super(error); ^ error: AA21 didn't pay prefund code: "-32500"
Expected behavior
Work well inserver side nodejs
Steps to reproduce
No response
Additional context
No response
Operating system
Linux
Prime SDK version or commit hash
latest