Errors

unit_mismatch

Match the Balance netuid to the operation's currency

View as Markdown

Two amounts denominated in different currencies were combined.

Every Balance carries the netuid whose currency it denominates: netuid 0 is TAO, any other netuid is that subnet's alpha. arithmetic between different netuids raises instead of silently mixing currencies, because 1 alpha on one subnet is not worth 1 alpha on another.

Construct the amount in the operation's own currency: Balance.from_tao for TAO, Balance.from_alpha(amount, netuid) for a subnet's alpha.

Remediation

Match the Balance netuid to the operation's currency

Chain errors

No chain error classifies to this code — it is raised client-side by the SDK before or after the call reaches the chain.

The same explanation is available in the terminal: btcli explain unit_mismatch (or btcli explain <ChainErrorName> for one exact chain error).