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

errors.gno

0.99 Kb · 26 lines
 1package gnft
 2
 3import (
 4	ufmt "gno.land/p/nt/ufmt/v0"
 5)
 6
 7const (
 8	errCannotSetURI   = "[GNOSWAP-GNFT-001] cannot set URI"
 9	errInvalidAddress = "[GNOSWAP-GNFT-002] invalid address"
10
11	// Transfer errors
12	errNotOwnerOrApproved = "[GNOSWAP-GNFT-003] caller is not token owner or approved"
13	errTokenNotExists     = "[GNOSWAP-GNFT-004] token does not exist"
14	errTransferToSelf     = "[GNOSWAP-GNFT-005] cannot transfer to self"
15
16	errInvalidTokenParams      = "[GNOSWAP-GNFT-006] invalid token parameters"
17	errInvalidTokenParamsRange = "[GNOSWAP-GNFT-007] token parameters out of range"
18	errInvalidColorFormat      = "[GNOSWAP-GNFT-008] invalid color format"
19	errStakedTokenLocked       = "[GNOSWAP-GNFT-009] staked token is locked"
20	errSpoofedRealm            = "[GNOSWAP-GNFT-010] rlm does not match the current crossing frame"
21)
22
23// makeErrorWithDetails creates an error with additional context.
24func makeErrorWithDetails(message string, details string) error {
25	return ufmt.Errorf("%s || %s", message, details)
26}