Convert amounts between Zenith EVM and Canton
gateway_convertConverts Gateway token amounts between EVM and Canton using the correct crossing rules, ensuring exact results without silent rounding.
Instructions
Exact amount conversion for a Gateway token, in either direction, with the crossing rules applied: one EVM base unit is 1e-10 on Canton, 18-decimal tokens show 10^8 times larger on Canton (DORIGe-8), ZTH crosses in multiples of 10^8 wei and wZTH back in whole gwei. Never rounds silently.
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": {
"token": "<token>",
"direction": "<direction>",
"amount": "<amount>"
},
"name": "gateway_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | For to-canton: whole tokens or EVM base units | token |
| token | Yes | Token: "ZTH", a symbol (e.g. DevUSD, DORIG), a Canton instrument ID or an ERC-20 address | |
| amount | Yes | ||
| direction | Yes |