Replies: 1 comment
-
You can use NonceManager. import { NonceManager } from "@ethersproject/experimental";
const walletSigner = new ethers.Wallet('0xprivatekey');
const walletWithNonceManager = new NonceManager(walletSigner);
// now use the walletWithNonceManager instead of walletSigner On a side note, if you want to make 100 erc20 transfers, you can consider using Multisender contract (blog), as it will save a lot of intrinsic gas for you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://ethereum.org/fr/developers/tutorials/send-token-etherjs/
From the above example, I can have function to send ERC20 tokens, function is called
send_token
. If I have an array of 100 wallet addresses and I try to send tokens to all of them in for loop// wallets = [ addresses ] for (let i = 0; i < wallets.length; i++) { send_token(wallets[i]) }
then it fails because of nonce mismatch. Does
contract.transfer
function takes care of nonce?Beta Was this translation helpful? Give feedback.
All reactions