Skip to main content
KuruSdkError contains a stable code and optional cause. Current codes cover missing or invalid addresses, hex and byte lengths, signatures, integer widths, missing wallet clients, signer and nonce resolution, unsupported signers, wallet-intent validation, and contract-error decoding.
Use decodeKuruContractError(revertData) for Kuru custom errors. Preserve the original viem error and transaction inputs in logs; decoded names alone may omit the failing call context. Separate four states in application logic:
  1. local input validation failed;
  2. simulation reverted;
  3. submission failed or was replaced;
  4. transaction was included and either succeeded or reverted.
Do not retry writes blindly. Re-read nonce, slot order ID, balance, allowance, deadline, and receipt state before rebuilding an action.