Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions contracts/invoice-escrow/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,49 @@ pub enum Error {
AlreadyFinalised = 18,
/// Caller is not the blacklisted payer.
NotBlacklistedPayer = 19,
/// Co-signer list is empty, has duplicates, exceeds the maximum, or the
/// threshold is outside `1..=signers.len()`.
InvalidCosignerConfig = 20,
/// Caller is not one of the invoice's configured co-signers.
NotCosigner = 21,
/// Co-signer has already approved or rejected this invoice.
AlreadyVoted = 22,
/// Release requires co-signer approval that has not yet reached threshold.
ApprovalRequired = 23,
/// Co-signers rejected the release; threshold can no longer be reached.
ApprovalRejected = 24,
/// Co-signer has not voted, so there is nothing to revoke.
NotVoted = 25,
/// Co-signer configuration cannot change once voting has started.
CosignersLocked = 26,
/// No co-signer approval is configured for this invoice.
NoCosigners = 27,
/// Oracle condition is malformed (non-positive threshold, zero staleness
/// window, or fallback identical to the primary oracle).
InvalidOracleConfig = 28,
/// No oracle could be reached or none returned a price for the asset.
OracleUnavailable = 29,
/// The oracle price is older than the condition's staleness window.
OracleStalePrice = 30,
/// The oracle returned a non-positive price or a future timestamp.
OracleInvalidPrice = 31,
/// The oracle price does not satisfy the release condition.
OracleConditionNotMet = 32,
/// No oracle condition is configured for this invoice.
NoOracleCondition = 33,
/// Schedule is malformed: `release_at` not in the future, or the ledger
/// delay exceeds the maximum / overflows.
InvalidSchedule = 34,
/// The scheduled release time has not been reached yet.
ReleaseNotYetDue = 35,
/// The scheduled minimum ledger count has not elapsed yet.
ScheduleLedgerNotReached = 36,
/// No active release schedule exists for this invoice.
ScheduleNotFound = 37,
/// The refund grace period is still running; refund is not permitted yet.
RefundGraceActive = 38,
/// Grace period exceeds `MAX_REFUND_GRACE_SECS`.
InvalidGracePeriod = 39,
/// The refund grace period has already elapsed or been waived.
RefundGraceElapsed = 40,
}
Loading