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
{ Error: invalid BigNumber value (argument="value", value=null, code=INVALID_ARGUMENT, version=bignumber/5.0.8)
at Logger.makeError (/home/hatch/projects/sb/startrail/app/node_modules/@ethersproject/logger/src.ts/index.ts:205:28)
at Logger.throwError (/home/hatch/projects/sb/startrail/app/node_modules/@ethersproject/logger/src.ts/index.ts:217:20)
at Logger.throwArgumentError (/home/hatch/projects/sb/startrail/app/node_modules/@ethersproject/logger/src.ts/index.ts:221:21)
at Function.BigNumber.from (/home/hatch/projects/sb/startrail/app/node_modules/@ethersproject/bignumber/src.ts/bignumber.ts:268:23)
at Formatter.number (/home/hatch/projects/sb/startrail/app/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/formatter.ts:168:26)
at Function.Formatter.check (/home/hatch/projects/sb/startrail/app/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/formatter.ts:416:42)
at Formatter.filterLog (/home/hatch/projects/sb/startrail/app/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/formatter.ts:409:26)
at /home/hatch/projects/sb/startrail/app/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/formatter.ts:451:29
at Array.forEach ()
at /home/hatch/projects/sb/startrail/app/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/formatter.ts:450:19
reason: 'invalid BigNumber value',
code: 'INVALID_ARGUMENT',
argument: 'value',
value: null,
checkKey: 'logIndex',
checkValue: null }
The text was updated successfully, but these errors were encountered:
Summary
hardhat: 2.0.3
ForkBlockchain.getLogs calls toRpcLogOutput with result logs here
index
is always undefined and sologIndex
is always set to null hereThe problem I face with this is that ethers.provider.getLogs will throw when formatting the logs response (see Ethers error below).
I wonder could output.ts simply do something like
numberToRpcQuantity(log.indexOf)
instead of using theindex
argument...Reproduce
Start hardhat node in mainnet forking mode.
Run the following script with
hardhat run
:Ethers Error
{ Error: invalid BigNumber value (argument="value", value=null, code=INVALID_ARGUMENT, version=bignumber/5.0.8)
at Logger.makeError (/home/hatch/projects/sb/startrail/app/node_modules/@ethersproject/logger/src.ts/index.ts:205:28)
at Logger.throwError (/home/hatch/projects/sb/startrail/app/node_modules/@ethersproject/logger/src.ts/index.ts:217:20)
at Logger.throwArgumentError (/home/hatch/projects/sb/startrail/app/node_modules/@ethersproject/logger/src.ts/index.ts:221:21)
at Function.BigNumber.from (/home/hatch/projects/sb/startrail/app/node_modules/@ethersproject/bignumber/src.ts/bignumber.ts:268:23)
at Formatter.number (/home/hatch/projects/sb/startrail/app/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/formatter.ts:168:26)
at Function.Formatter.check (/home/hatch/projects/sb/startrail/app/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/formatter.ts:416:42)
at Formatter.filterLog (/home/hatch/projects/sb/startrail/app/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/formatter.ts:409:26)
at /home/hatch/projects/sb/startrail/app/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/formatter.ts:451:29
at Array.forEach ()
at /home/hatch/projects/sb/startrail/app/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/formatter.ts:450:19
reason: 'invalid BigNumber value',
code: 'INVALID_ARGUMENT',
argument: 'value',
value: null,
checkKey: 'logIndex',
checkValue: null }
The text was updated successfully, but these errors were encountered: