From 4b7dc2c191affffaa26b8f171e1a878ee34e39af Mon Sep 17 00:00:00 2001 From: 69starman Date: Sun, 31 May 2026 09:27:10 +0000 Subject: [PATCH] chore: align contract error codes for amount/fee validation (400-404) --- CONTRACT_ERROR_SPEC.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CONTRACT_ERROR_SPEC.md b/CONTRACT_ERROR_SPEC.md index ab67bbcc1..a15733b08 100644 --- a/CONTRACT_ERROR_SPEC.md +++ b/CONTRACT_ERROR_SPEC.md @@ -21,9 +21,11 @@ This document defines the standard error codes used by the SkillSync smart contr | 13 | `TokenExpired` | Token has expired | | 14 | `TokenRevoked` | Token has been revoked | | 15 | `InvalidToken` | Token is invalid | -| 21 | `InsufficientBalance` | Insufficient funds for operation | -| 22 | `NegativeAmount` | Amount cannot be negative | -| 23 | `Overflow` | Arithmetic overflow occurred | +| 400 | `InvalidAmount` | Amount is zero or negative | +| 401 | `InsufficientBalance` | Insufficient funds for operation | +| 402 | `FeeTooHigh` | Fee exceeds maximum (1000 bps) | +| 403 | `InvalidSplit` | Dispute split does not sum to amount | +| 404 | `Overflow` | Arithmetic overflow occurred | | 24 | `InvalidAsset` | Asset is not supported | | 31 | `MentorNotFound` | Mentor profile not found | | 32 | `MenteeNotFound` | Mentee profile not found |