toWei

Converts the specified number of tokens to Wei.

Example

import { toWei } from "thirdweb/utils";
toWei("1");
// 1000000000000000000n
function toWei(tokens: string): bigint;

Parameters

The number of tokens to convert.

Type

let tokens: string;

Returns

let returnType: bigint;

The converted value in Wei.