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
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
As soon as typeof null === 'object' is true web3-errors library throws an error above in this code:
if (typeof error.data === 'object') {
let originalError;
if ('originalError' in error.data) {
Error throwed in web3-errors\src\errors\contract_errors.ts:163
Steps to reproduce the behavior
I don't actually know why transaction is reverted. Code throws it randomly.
Logs
root\node_modules\web3-errors\src\errors\contract_errors.ts:163
if ('originalError' in error.data) {
^
TypeError: Cannot use 'in' operator to search for 'originalError' in null
at new Eip838ExecutionError (root\node_modules\web3-errors\src\errors\contract_errors.ts:163:21)
at new ContractExecutionError (root\node_modules\web3-errors\src\errors\contract_errors.ts:225:3)
at Function._isReverted (root\node_modules\web3-core\src\web3_request_manager.ts:432:48)
at Web3RequestManager._processJsonRpcResponse (root\node_modules\web3-core\src\web3_request_manager.ts:361:35)
at Web3RequestManager.<anonymous> (root\node_modules\web3-core\src\web3_request_manager.ts:206:16)
at Generator.next (<anonymous>)
at fulfilled (root\node_modules\web3-core\lib\commonjs\web3_request_manager.js:21:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Environment
npm - 9.8.1
node - 18.17.1
web3 - 4.1.1
OS - Windows 10