Reference
Custom Errors
All custom errors across Raycash contracts.
| Error | Condition |
|---|
SenderNotAllowed(address sender, euint64 amount) | Caller does not have FHE ACL on the encrypted input |
ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed) | Sender balance too low (inherited from OpenZeppelin IERC20Errors) |
ERC20InvalidApprover(address) | Approver is address(0) |
ERC20InvalidSpender(address) | Spender is address(0) |
ERC20InvalidSender(address) | Sender is address(0) |
ERC20InvalidReceiver(address) | Receiver is address(0) |
| Error | Condition |
|---|
ZeroAmount() | initWrap called with amount == 0 |
ZeroAddress() | Constructor with _underlying == address(0); finalizeWrap with recipient == address(0); initUnwrap with destination == address(0) |
InvalidUnwrapHandle() | finalizeUnwrap called with unknown/consumed handle |
InvalidMinDecoys() | Constructor called with minDecoys == 0 |
TooFewDecoys() | finalizeWrap called with fewer indices than minDecoys |
InvalidDepositIndex() | Deposit index out of bounds |
DuplicateDepositIndex() | Deposit indices not strictly increasing |
AccessControlUnauthorizedAccount(address, bytes32) | Caller lacks the required role (OZ AccessControl) — DEFAULT_ADMIN_ROLE for hook setters, OPERATOR_ROLE for initWrap() |
InsufficientConfidentialBalance() | initUnwrap called with uninitialized balance |
TransferHookReverted(address hook, bytes reason) | Transfer hook reverted during _update |
InvalidCommitment() | withdraw called with a secret that does not match the committed hash for the depositor |
EmptyBatch() | initWrap(DeployParams[]) called with an empty array |
ExternalWrapNotSupported() | wrap(), onTransferReceived(), unwrap() called directly — disabled; deposits must go through initWrap, unwraps through initUnwrap |
| Error | Condition |
|---|
UnauthorizedAttester() | Attestation/revocation attempted by non-attester |
ActiveAttestationExists(address recipient) | New attestation for recipient who already has active one |
| Error | Condition |
|---|
KycNotVerified(address account) | Account lacks valid KYC attestation |
ZeroResolver() | Resolver address is zero in constructor |
| Error | Condition |
|---|
OnlyAdmin() | Caller is not the admin |
OnlyAdminOrDestination() | Caller is neither admin nor pending settlement destination |
ZeroAmount() | Amount parameter is zero |
ZeroAddress() | Address parameter is address(0) |
PendingSettlementExists() | A settlement is already in flight |
NoPendingSettlement() | No settlement to finalize |
| Error | Condition |
|---|
OnlyWrapper() | sweep() caller is not the deploying wrapper |
Was this page helpful?