-
Describe the bug Reproduction steps
from this TS code
and get this error Environment: Search Terms
but it still throws with NONCE_EXPIRED. Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You don't need to keep reconnecting to the same const managedSigner = new NonceManager(this.signer);
contract = new ethers.Contract(contract_address, ERC1155.abi, managedSigner)
await contract.mint(this.signer.address, 1)
await contract.mint(this.signer.address, 2)
await contract.mint(this.signer.address, 3) My only guess is you have a transaction left over from the previous execution of the script. |
Beta Was this translation helpful? Give feedback.
-
Oh, just completely got it!
There were collisions between snapshots nonces. Be careful with evm_snapshot/evm_revert |
Beta Was this translation helpful? Give feedback.
Oh, just completely got it!
I used
snapshot = await ethers.provider.send('evm_snapshot')
in mocha's beforeAll()await ethers.provider.send('evm_revert', [snapshot])
in mocha's afterAll()There were collisions between snapshots nonces. Be careful with evm_snapshot/evm_revert