I've tried adding the option blockTime (as per: https://www.npmjs.com/package/ganache-cli/v/6.4.2) to the Ganache server options, but that resulted in a nonce mismatch error:
Error: the tx doesn't have the correct nonce. account has nonce of: 1 tx has nonce of: 0
at getResult (/app/node_modules/ethers/providers/json-rpc-provider.js:40:21)
at exports.XMLHttpRequest.request.onreadystatechange (/app/node_modules/ethers/utils/web.js:111:30)
at exports.XMLHttpRequest.dispatchEvent (/app/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
at setState (/app/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
at IncomingMessage.<anonymous> (/app/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
at IncomingMessage.emit (events.js:326:22)
at IncomingMessage.EventEmitter.emit (domain.js:483:12)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: -32000,
data: {
stack: "n: the tx doesn't have the correct nonce. account has nonce of: 1 tx has nonce of: 0\n" +
' at i (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:586402)\n' +
' at /app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:586533\n' +
' at x.getQueuedNonce (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:25:120169)\n' +
' at k.createTransactionWithCorrectNonce (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:586213)\n' +
' at k.processTransaction (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:582864)\n' +
' at k.processNextAction (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:579771)\n' +
' at k._queueTransaction (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:578891)\n' +
' at k.queueRawTransaction (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:577344)\n' +
' at b.eth_sendRawTransaction (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:567858)\n' +
' at b.handleRequest (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:564744)\n' +
' at t (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n' +
' at a.handleRequest (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:563051)\n' +
' at t (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n' +
' at c.f.handleRequest (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:556029)\n' +
' at c.handleRequest (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:553855)\n' +
' at t (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n' +
' at s.handleRequest (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:562065)\n' +
' at t (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n' +
' at a.handleRequest (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:561512)\n' +
' at t (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n' +
' at d._handleAsync (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439074)\n' +
' at Timeout._onTimeout (/app/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:438499)',
name: 'n'
}
I've tried adding the option
blockTime(as per: https://www.npmjs.com/package/ganache-cli/v/6.4.2) to theGanacheserver options, but that resulted in a nonce mismatch error: