You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a users tries to use Gateway to send transactions with a wallet that has never been used before on a chain, Gateway throws errors because it tried to apply a negative nonce.
Steps To Reproduce
Use a new wallet on a chain
Approve a token, and get error
{
"message": "Unknown error.",
"httpErrorCode": 503,
"errorCode": 1099,
"stack": "Error: invalid hexlify value [ See: https://links.ethers.org/v5-errors-NUMERIC_FAULT ] (operation=\"checkSafeInteger\", fault=\"out-of-safe-range\", value=-1, code=NUMERIC_FAULT, version=bytes/5.7.0)\n at Logger.makeError (/Users/feng/Code/gateway/node_modules/@ethersproject/wallet/node_modules/@ethersproject/logger/lib/index.js:238:21)\n at Logger.throwError (/Users/feng/Code/gateway/node_modules/@ethersproject/wallet/node_modules/@ethersproject/logger/lib/index.js:247:20)\n at Logger.checkSafeUint53 (/Users/feng/Code/gateway/node_modules/@ethersproject/wallet/node_modules/@ethersproject/logger/lib/index.js:285:18)\n at hexlify (/Users/feng/Code/gateway/node_modules/@ethersproject/wallet/node_modules/@ethersproject/bytes/lib/index.js:151:16)\n at /Users/feng/Code/gateway/node_modules/@ethersproject/wallet/node_modules/@ethersproject/transactions/lib/index.js:181:59\n at Array.forEach (<anonymous>)\n at _serialize (/Users/feng/Code/gateway/node_modules/@ethersproject/wallet/node_modules/@ethersproject/transactions/lib/index.js:175:23)\n at serialize (/Users/feng/Code/gateway/node_modules/@ethersproject/wallet/node_modules/@ethersproject/transactions/lib/index.js:246:16)\n at /Users/feng/Code/gateway/node_modules/@ethersproject/wallet/lib/index.js:163:116\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
}
Run /evm/nonce route:
{
"nonce": -2
}
Proposed fix
Adjust /evm/nonce so that it is floored at 0 and make corresponding adjustments to nextNonce, etc
The text was updated successfully, but these errors were encountered:
Describe the bug
If a users tries to use Gateway to send transactions with a wallet that has never been used before on a chain, Gateway throws errors because it tried to apply a negative nonce.
Steps To Reproduce
/evm/nonce
route:Proposed fix
Adjust
/evm/nonce
so that it is floored at 0 and make corresponding adjustments tonextNonce
, etcThe text was updated successfully, but these errors were encountered: