convert_formatted_to_wei
Convert human-readable cryptocurrency amounts to wei units for blockchain transactions. Specify token decimals to ensure accurate conversions in DeFi trading operations.
Instructions
Convert formatted amounts to wei using ethers.js
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"amount": "<amount>",
"decimals": "<decimals>"
},
"name": "convert_formatted_to_wei"
}
}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) |