Skip to content

Errors and rejection behavior

Treat unsupported capabilities as explicit failures and inspect the offending input.

Use symbolic errors from the matching build. Numeric Anchor error assignments are not presented as a stable deployed API.

Core validation

Error familyCheck
InvalidMintOrderDistinct mint keys in canonical byte order
InvalidTickSpacing, InvalidRange, InvalidPriceDomain, alignment, endpoint order, fixed-point units
InvalidFee, InvalidFeeSplitCap, denominators, unique beneficiaries, exact share sum
UnsupportedPoolMode, UnsupportedHookWhether the requested mode/profile exists
InvalidHookTarget, InvalidHookAccountsConfigured executable, exact extra-account classes, owners, keys, and protected aliases
InvalidHookPermission, InvalidHookContextPer-phase privileges, declared programs, bounded accounts, and phase/intent/settlement consistency
MissingHookResponseReturn data and actual producer program
PoolEnteredWhether the operation attempts nested entry
PositionNotEmptyRemaining liquidity or fee claims before close
SlippageExceededUser limits against actual token amounts
InvalidTickDirectory, InvalidTickArrayCanonical owner/PDA, spacing, layout, and ordered unique pages
MissingTickArray, TickMissingRequired initialized page or boundary absent
TickArrayCapacity, TickArrayLimit, TickTraversalLimitReserved record capacity, 16-page budget, and bounded traversal
ArithmeticFailure, MathFailureWidth, overflow, underflow, and math-domain errors

Source: programs/grapl-amm/src/errors.rs.

Hook replies

Malformed tags, unsupported versions, wrong phases, denied permission, invalid fee shape, and cap violations are errors. A failure must not become an implicit acknowledgement or default fee.

Source: programs/grapl-amm/src/hooks/abi/wire.rs and reply.rs.

Client errors

Amount utilities throw RangeError with the supplied value and expected shape. Validate decimal precision before serialization; do not cast a negative value into an unsigned representation.

If a quote is possible but a wallet is ineligible, that is an execution-policy failure, not proof that the route is safe. See troubleshooting.

Issuance, curves, and composition

InvalidTokenIssuance rejects invalid factory supply or final authority. InvalidCurve rejects invalid reserve plans, insufficient real backing, premature or repeated graduation, and unauthorized remainder collection. Swap and zap limits use SlippageExceeded; ExactOut does not turn a failed exact target into a partial success. Account substitutions and hook denials still use the generic validation families above.