convert_formatted_to_wei
Convert formatted token amounts (e.g., '1.5 ETH') to wei using specified decimals, enabling precise blockchain transactions. Ideal for DeFi trading and token operations.
Instructions
Convert formatted amounts to wei using ethers.js
Input Schema
Name | Required | Description | Default |
---|---|---|---|
amount | Yes | Formatted amount (e.g., '1.5' for 1.5 ETH) | |
decimals | Yes | Number of decimal places for the token (e.g., 18 for ETH, 6 for USDC) |