Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

errors.gno

1.06 Kb · 23 lines
 1package staker
 2
 3import (
 4	ufmt "gno.land/p/nt/ufmt/v0"
 5)
 6
 7const (
 8	errDataNotFound           = "[GNOSWAP-GOV_STAKER-001] requested data not found"
 9	errInvalidAmount          = "[GNOSWAP-GOV_STAKER-002] invalid amount"
10	errNoDelegatedAmount      = "[GNOSWAP-GOV_STAKER-003] zero delegated amount"
11	errNotEnoughDelegated     = "[GNOSWAP-GOV_STAKER-004] not enough delegated"
12	errInvalidAddress         = "[GNOSWAP-GOV_STAKER-005] invalid address"
13	errNotEnoughBalance       = "[GNOSWAP-GOV_STAKER-006] not enough balance"
14	errLessThanMinimum        = "[GNOSWAP-GOV_STAKER-007] cannot delegate less than minimum amount"
15	errInvalidSnapshotTime    = "[GNOSWAP-GOV_STAKER-008] invalid snapshot time"
16	errSameDelegatee          = "[GNOSWAP-GOV_STAKER-009] cannot redelegate to same address"
17	errWithdrawNotCollectable = "[GNOSWAP-GOV_STAKER-010] withdraw is not collectable"
18	errSpoofedRealm           = "[GNOSWAP-GOV_STAKER-011] rlm does not match the current crossing frame"
19)
20
21func makeErrorWithDetails(message string, detail string) error {
22	return ufmt.Errorf("%s || %s", message, detail)
23}