Open zhangxf55 opened 1 year ago
Can you share the ganache logs (you'll need to omit the -D
flag)?
ganache logs below:
eth_chainId
eth_getTransactionCount
eth_chainId
eth_estimateGas
eth_chainId
eth_chainId
eth_getBlockByNumber
eth_gasPrice
eth_blockNumber
eth_sendRawTransaction
eth_chainId
Transaction: 0x0b0f788ac61ddb6fec97079bf5967ed5577856d4ba513260effb31a217e26cdf
Gas usage: 46602
Block number: 138252503
Block time: Sat Oct 07 2023 09:10:06 GMT+0800 (China Standard Time)
eth_call
eth_chainId
eth_chainId
eth_estimateGas
eth_chainId
eth_chainId
eth_sendRawTransaction
eth_chainId
Exception:
[root@zhangxf55 unirouter1]# node local/testrpc.js
true
/data/unirouter1/node_modules/ethers/lib.commonjs/utils/errors.js:125
error = new Error(message);
^
Error: could not coalesce error (error={ "code": -32000, "message": "the tx doesn't have the correct nonce. account has nonce of: 24 tx has nonce of: 23", "stack": "Error: the tx doesn't have the correct nonce. account has nonce of: 24 tx has nonce of: 23\n at TransactionPool.prepareTransaction (/root/.nvm/versions/node/v18.17.1/lib/node_modules/ganache/dist/node/1.js:2:188489)" }, payload={ "id": 18, "jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": [ "0x02f89082053917843b9aca0084413182b482730e949935113fdbce1650efe9879266fac13556df1de080a45c60f226000000000000000000000000d3dfa878b32204cb7de5297a3d785b4bd38f995ec080a09d5f5d2f738c62a502bede8c810d5327ad80e4604418e7ad7eaa50789be52eb4a06f3482c709411fa9e011fb21043452261f4196afcc7aec98fb27e4268cff0997" ] }, code=UNKNOWN_ERROR, version=6.7.1)
at makeError (/data/unirouter1/node_modules/ethers/lib.commonjs/utils/errors.js:125:21)
at JsonRpcProvider.getRpcError (/data/unirouter1/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:653:41)
at /data/unirouter1/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:268:45
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'UNKNOWN_ERROR',
error: {
message: "the tx doesn't have the correct nonce. account has nonce of: 24 tx has nonce of: 23",
stack: "Error: the tx doesn't have the correct nonce. account has nonce of: 24 tx has nonce of: 23\n" +
' at TransactionPool.prepareTransaction (/root/.nvm/versions/node/v18.17.1/lib/node_modules/ganache/dist/node/1.js:2:188489)',
code: -32000
},
payload: {
method: 'eth_sendRawTransaction',
params: [
'0x02f89082053917843b9aca0084413182b482730e949935113fdbce1650efe9879266fac13556df1de080a45c60f226000000000000000000000000d3dfa878b32204cb7de5297a3d785b4bd38f995ec080a09d5f5d2f738c62a502bede8c810d5327ad80e4604418e7ad7eaa50789be52eb4a06f3482c709411fa9e011fb21043452261f4196afcc7aec98fb27e4268cff0997'
],
id: 18,
jsonrpc: '2.0'
}
}
Node.js v18.17.1
contract Authorizor {
}
Error: could not coalesce error (error={ "code": -32000, "message": "the tx doesn't have the correct nonce. account has nonce of: 44 tx has nonce of: 43", "stack": "Error: the tx doesn't have the correct nonce. account has nonce of: 44 tx has nonce of: 43\n at TransactionPool.prepareTransaction (/root/.nvm/versions/node/v18.17.1/lib/node_modules/ganache/dist/node/1.js:2:188489)" }, payload={ "id": 18, "jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": [ "0x02f8908205392b843b9aca0084f8cde7b282730094548de337842af790d92ddf93f52b3e9a87e1da0b80a45c60f226000000000000000000000000d3dfa878b32204cb7de5297a3d785b4bd38f995ec080a0b567e71468c74b71693239a722d3c5215eac1d19643a80e8982fe6b71c654fcda072d6169dc2146fbafc961d9f1756078df9766434a1b456cf857034c6c43f11b0" ] }, code=UNKNOWN_ERROR, version=6.7.1) at makeError (/data/unirouter1/node_modules/ethers/lib.commonjs/utils/errors.js:125:21) at JsonRpcProvider.getRpcError (/data/unirouter1/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:653:41) at /data/unirouter1/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:268:45 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'UNKNOWN_ERROR', error: { message: "the tx doesn't have the correct nonce. account has nonce of: 44 tx has nonce of: 43", stack: "Error: the tx doesn't have the correct nonce. account has nonce of: 44 tx has nonce of: 43\n" + ' at TransactionPool.prepareTransaction (/root/.nvm/versions/node/v18.17.1/lib/node_modules/ganache/dist/node/1.js:2:188489)', code: -32000 }, payload: { method: 'eth_sendRawTransaction', params: [ '0x02f8908205392b843b9aca0084f8cde7b282730094548de337842af790d92ddf93f52b3e9a87e1da0b80a45c60f226000000000000000000000000d3dfa878b32204cb7de5297a3d785b4bd38f995ec080a0b567e71468c74b71693239a722d3c5215eac1d19643a80e8982fe6b71c654fcda072d6169dc2146fbafc961d9f1756078df9766434a1b456cf857034c6c43f11b0' ], id: 18, jsonrpc: '2.0' } }
Node.js v18.17.1