Airdrop · Errors · 4@tokenops/sdk/fhe-airdrop
Airdrop errors you can catch by class.
EIP-712-gated claims surface specific replay + validity errors. Most are recoverable without a fresh signature; some demand a re-signed Claim.
For the catch-ladder pattern + how SDK-level and generic-fallback errors fit alongside these, read Concepts › Typed errors + recovery.
| Class | When thrown | Recovery |
|---|---|---|
| AlreadyClaimedError | The Claim signature was already redeemed on this clone, same signature submitted twice, or recipient retrying after a successful first claim. | Signatures are single-use by design: the clone stores the struct hash of (recipient, encryptedAmount). A top-up to the same recipient needs a fresh Claim over a re-encrypted amount handle. useAirdropIsSignatureClaimed pre-checks before gas. useAirdropIsSignatureClaimed |
| ClaimNotStartedError | useClaim called before the claim window opens (before startTime). Distinct from ClaimWindowClosedError; carries code TOKENOPS_CLAIM_NOT_STARTED. | err.context.startsAt carries the open timestamp (Unix seconds). Render a countdown and pre-check with useAirdropHasClaimStarted before paying gas. useAirdropHasClaimStarted |
| ClaimWindowClosedError | useClaim called after the window has closed (past endTime). | err.context.endedAt carries the timestamp. Render a countdown or surface the window-closed banner. useAirdropIsClaimWindowActive |
| InvalidSignatureError | EIP-712 signature does not recover to a holder of DEFAULT_ADMIN_ROLE on this clone. | Either the admin lost the role mid-flight or the recipient is using a signature for a different airdrop. Pre-check with useAirdropIsSignatureValid before paying gas. useAirdropIsSignatureValid |
TokenOpsSdkError and carries the offending values under err.context — render specific messages instead of generic "transaction failed."Read the catch ladder