Web3JS Online
Viem Online
Webhooks, Alerts, and a simple API.
The parseUnits function is used to multiply a string representation of a number by a given exponent of base 10 (10^exponent). It is imported from the 'viem' library, which is a TypeScript Ethereum library. The function takes two arguments: value, a string representing the number to multiply, and exponent, a number representing the exponent of base 10 to apply.
Here's an example of how to use the parseUnits function:
In this example, the function multiplies the string '420' by the exponent 9, resulting in the BigInt value 420,000,000,000n.