Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

errors.gno

1.67 Kb · 43 lines
 1package limit
 2
 3import (
 4	"errors"
 5)
 6
 7var (
 8	// ErrInvalidMakingAmount is returned when makingAmount is not positive.
 9	ErrInvalidMakingAmount = errors.New("invalid making amount (must be > 0)")
10
11	// ErrInvalidTakingAmount is returned when takingAmount is not positive.
12	ErrInvalidTakingAmount = errors.New("invalid taking amount (must be > 0)")
13
14	// ErrInvalidSlippage is returned when slippageBps is outside [0, BpsDenominator].
15	ErrInvalidSlippage = errors.New("invalid slippage")
16
17	// ErrInvalidExpiresAt is returned when expiresAt is not positive.
18	ErrInvalidExpiresAt = errors.New("invalid expiresAt (must be > 0)")
19
20	// ErrOrderNotActive is returned when no input remains to fill.
21	ErrOrderNotActive = errors.New("order is not active")
22
23	// ErrOrderExpired is returned when filling an order at or after its deadline.
24	ErrOrderExpired = errors.New("order has expired")
25
26	// ErrInsufficientOutput is returned when a fill reports no output.
27	ErrInsufficientOutput = errors.New("insufficient output amount")
28
29	// ErrInvalidFillAmount is returned when a fill input is not in (0, remaining input].
30	ErrInvalidFillAmount = errors.New("invalid fill amount")
31
32	// ErrAmountOverflow is returned when an amount, including cumulative
33	// gross output, would exceed MaxInt64.
34	ErrAmountOverflow = errors.New("amount exceeds int64")
35
36	// ErrSlippageExceeded is returned when a fill's owner-net output is below
37	// the order's proportional minimum.
38	ErrSlippageExceeded = errors.New("slippage exceeded, output less than minimum")
39
40	// ErrInvalidExecutionFeeRate is returned when an execution fee rate is outside
41	// [0, MaxExecutionFeeRate].
42	ErrInvalidExecutionFeeRate = errors.New("invalid execution fee rate")
43)