can we do a [eth_gettransactioncount](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactioncount) on boot or regularly, store that number and then manually increment the nonce everytime we've sent a transaction?
something like (pseudo code):
```js
let nonce = await provider.getTransactionCount('pending');
nonce++;
[contirbution1, contribution2].forEach(c => {
await kredits.Contribution.add(attrs, {nonce});
nonce++;
})
```
we could maybe use ether.js's waitForTransaction to wait until the transaction is mined and then increment the nonce (or do a provider.getTransactionCount('pending') again) and then do the next transaction.
we could maybe use ether.js's `waitForTransaction` to wait until the transaction is mined and then increment the nonce (or do a `provider.getTransactionCount('pending')` again) and then do the next transaction.
raucao
added the bug label 2025-01-23 21:26:16 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
See
dcbce66796for hotfix that doesn't really fix the underlying issue with ethers.js' wallet nonce management.can we do a eth_gettransactioncount on boot or regularly, store that number and then manually increment the nonce everytime we've sent a transaction?
something like (pseudo code):
we could maybe use ether.js's
waitForTransactionto wait until the transaction is mined and then increment the nonce (or do aprovider.getTransactionCount('pending')again) and then do the next transaction.