1

Right now I have to call the approval function on every single token. Is there a way I can do this in fewer transactions?

2
  • Assuming that you're using openzeppeling contracts; it depends on who is the owner of the token; only the token owner can approve an address as operator of the token
    – Casareafer
    Commented Dec 6, 2022 at 3:03
  • for EOA(Externally Owned Account) it is not possible, because you cannot batch transactions. I think a workaround is to use a multi-sig wallet with 1 signer (EOA) and this wallet will be the owner of the tokens
    – Majd TL
    Commented Dec 6, 2022 at 10:19

2 Answers 2

0

You can submit multiple transactions at once using Gnosis' multisend lib: https://github.com/gnosis/ethers-multisend

You can find some higher level explanations here: https://help.gnosis-safe.io/en/articles/4680071-transaction-builder

1
  • Multisend requires on delegateCall. You cannot use delegateCall when approving erc20 and erc721 tokens. Commented Dec 9, 2022 at 20:05
0

If you want a quick solution for this we've made a quick front-end called BlockBucket which is a simple Token MultiSender which batches your transactions from a CSV upload.

Created a bit of a walkthrough video on how to use it here: https://youtu.be/OFOnIUXMbWE

Your Answer

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

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