2

In a dApp, I want the users to be able to do N number of transactions.

Those N transactions will be batched in a batchAll call. If N exceeds the maximum benchmarked amount of transactions in one batch, let's say x, it will create multiple batchAll transactions for the user to sign.

I would like to know what's the correct way, if there is one, for the user to sign 1 transaction on the UI instead of N divided by x.

2 Answers 2

3

If your batch call must be split over multiple extrinsics, there is really not a way to avoid the user having to sign multiple calls unless you have the private key, and do a non-interactive message signing.

You can imagine that if a developer could force a user to sign multiple extrinsics at once, that would be really easy to attack the user.

I would suggest, as a part of your user experience, you notify the user how many transactions you are expecting them to sign before you start prompting them for signatures, and that could at least make them aware of what is happening.

Otherwise, you probably can create a local application which does this, but again, you would need to give direct access to the private key to do a non-interactive signing process.

1
  • Thank you for your answer, that's what I kinda guessed too, I'll simply follow your suggestion.
    – Leouarz
    Jun 30, 2022 at 8:16
0

You already have the solution: just sign the batchAll call.

1
  • Yeah, the problem comes when the user want to do so many transactions, that it cannot be included in a sigle batchAll call.
    – Leouarz
    Jun 30, 2022 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.