Parses a given value into the appropriate token units based on the specified chain and token.
The client instance to use for the operation.
The parsed token value in base units.
const link = await parseUnitsAsToken(client, { value: '1', chain: ETH_SEPOLIA,});// => 1000000000000000000n Copy
const link = await parseUnitsAsToken(client, { value: '1', chain: ETH_SEPOLIA,});// => 1000000000000000000n
const link = await parseUnitsAsToken(client, { value: '1', chain: ETH_SEPOLIA, token: ETH_SEPOLIA.contracts.USDC,});// => 1000000n Copy
const link = await parseUnitsAsToken(client, { value: '1', chain: ETH_SEPOLIA, token: ETH_SEPOLIA.contracts.USDC,});// => 1000000n
Parses a given value into the appropriate token units based on the specified chain and token.