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
I have an ABI that has a uint256 parameter input (tokenQuantity).
In Typescript, writeContract translate that uint256 to bigint.
However, the content of tokenQuantity is larger than bigint (eg 10,000,000 * (10^18) --I use Decimal to calculate that).
How do I pass this as arg in writeContract? I tried tokenQuantity.toFixed() to convert it to string first. However, writeContract complains that it needs a bigint instead of a string.
There must be something simple I am missing as this is very basic to pass uint256 (quantity) as part of a parameter.
Please help. I am stuck :'(
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have an ABI that has a uint256 parameter input (tokenQuantity).
In Typescript, writeContract translate that uint256 to bigint.
However, the content of tokenQuantity is larger than bigint (eg 10,000,000 * (10^18) --I use Decimal to calculate that).
How do I pass this as arg in writeContract? I tried tokenQuantity.toFixed() to convert it to string first. However, writeContract complains that it needs a bigint instead of a string.
There must be something simple I am missing as this is very basic to pass uint256 (quantity) as part of a parameter.
Please help. I am stuck :'(
Beta Was this translation helpful? Give feedback.
All reactions