convert_wei_to_formatted
Convert wei amounts to human-readable formats by specifying token decimals, enabling clear crypto transaction value representation for trading agents.
Instructions
Convert wei amounts to human-readable format using ethers.js
Input Schema
Name | Required | Description | Default |
---|---|---|---|
amount | Yes | Amount in wei (as string to handle large numbers) | |
decimals | Yes | Number of decimal places for the token (e.g., 18 for ETH, 6 for USDC) |
Input Schema (JSON Schema)
{
"properties": {
"amount": {
"description": "Amount in wei (as string to handle large numbers)",
"type": "string"
},
"decimals": {
"description": "Number of decimal places for the token (e.g., 18 for ETH, 6 for USDC)",
"type": "integer"
}
},
"required": [
"amount",
"decimals"
],
"type": "object"
}