ฺ UnhandledPromiseRejectionWarning: Error: invalid BigNumber value #1375
Unanswered
phatwasin01
asked this question in
Q&A
Replies: 2 comments
-
I think it is complaining about one of the values you are passing into the function as well. For any value larger than Number.MAX_SAFE_INTEGER, you must use a big number or string (decimal or hex). Can you console.log the values you are passing in, like |
Beta Was this translation helpful? Give feedback.
0 replies
-
(Moving to discussions) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
const uniswap = new ethers.Contract( '0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F', ['function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts)'], account ); const tx = await uniswap.swapExactETHForTokens( amountOutMin, path, to, deadline, { value, gasPrice: 10e9} );
Also Tried:
ethers.utils.parseUnits('10',9)
(node:17752) UnhandledPromiseRejectionWarning: Error: invalid BigNumber value (argument="value", value=[-312091235,1160519353], code=INVALID_ARGUMENT, version=bignumber/5.0.15)
Beta Was this translation helpful? Give feedback.
All reactions