-
Notifications
You must be signed in to change notification settings - Fork 200
/
errors.go
26 lines (22 loc) · 1.3 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package types
import (
"fmt"
"github.com/cometbft/cometbft/crypto/tmhash"
sdkerrors "cosmossdk.io/errors"
)
// Oracle Errors
var (
ErrInvalidExchangeRate = sdkerrors.Register(ModuleName, 2, "invalid exchange rate")
ErrNoPrevote = sdkerrors.Register(ModuleName, 3, "no prevote")
ErrNoVote = sdkerrors.Register(ModuleName, 4, "no vote")
ErrNoVotingPermission = sdkerrors.Register(ModuleName, 5, "unauthorized voter")
ErrInvalidHash = sdkerrors.Register(ModuleName, 6, "invalid hash")
ErrInvalidHashLength = sdkerrors.Register(ModuleName, 7, fmt.Sprintf("invalid hash length; should equal %d", tmhash.TruncatedSize))
ErrVerificationFailed = sdkerrors.Register(ModuleName, 8, "hash verification failed")
ErrRevealPeriodMissMatch = sdkerrors.Register(ModuleName, 9, "reveal period of submitted vote do not match with registered prevote")
ErrInvalidSaltLength = sdkerrors.Register(ModuleName, 10, "invalid salt length; should be 1~4")
ErrNoAggregatePrevote = sdkerrors.Register(ModuleName, 11, "no aggregate prevote")
ErrNoAggregateVote = sdkerrors.Register(ModuleName, 12, "no aggregate vote")
ErrUnknownPair = sdkerrors.Register(ModuleName, 13, "unknown pair")
ErrNoValidTWAP = sdkerrors.Register(ModuleName, 14, "TWA price not found")
)