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.
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>"
},
"name": "to_wei"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| decimals | No |