convert_to_base_units
Convert token amounts from human-readable units to their smallest base unit like wei, for EVM tokens or native currency. Specify chain and token address for accurate decimals.
Instructions
Convert a token amount from human-readable units to its smallest unit (e.g., wei).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | The amount to convert (in human-readable units). | |
| chainId | No | Optional EVM chain ID to run this tool on (e.g. 1 for Ethereum, 8453 for Base, 42161 for Arbitrum). Defaults to the active wallet chain. | |
| tokenAddress | No | Optional: The contract address of the token. If omitted, native currency decimals are used. |