to_wei
Converts a decimal amount to base units, preventing floating-point rounding errors. Specify the number of decimals for accurate conversion.
Instructions
Convert a decimal amount to base units without floating-point rounding.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| decimals | No |