2018-08-09 01:06:34 +00:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
2022-11-14 19:40:14 +00:00
|
|
|
errorsmod "cosmossdk.io/errors"
|
2018-08-09 01:06:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2020-04-16 15:47:39 +00:00
|
|
|
// RootCodespace is the codespace for all errors defined in this package
|
|
|
|
RootCodespace = "ethermint"
|
2018-08-09 01:06:34 +00:00
|
|
|
)
|
|
|
|
|
2020-05-05 16:54:03 +00:00
|
|
|
// NOTE: We can't use 1 since that error code is reserved for internal errors.
|
|
|
|
|
2020-04-16 15:47:39 +00:00
|
|
|
var (
|
|
|
|
// ErrInvalidValue returns an error resulting from an invalid value.
|
2022-11-14 19:40:14 +00:00
|
|
|
ErrInvalidValue = errorsmod.Register(RootCodespace, 2, "invalid value")
|
2019-09-18 13:51:18 +00:00
|
|
|
|
2020-04-16 15:47:39 +00:00
|
|
|
// ErrInvalidChainID returns an error resulting from an invalid chain ID.
|
2022-11-14 19:40:14 +00:00
|
|
|
ErrInvalidChainID = errorsmod.Register(RootCodespace, 3, "invalid chain ID")
|
2019-09-18 13:51:18 +00:00
|
|
|
|
2021-04-17 10:00:07 +00:00
|
|
|
// ErrMarshalBigInt returns an error resulting from marshaling a big.Int to a string.
|
2022-11-14 19:40:14 +00:00
|
|
|
ErrMarshalBigInt = errorsmod.Register(RootCodespace, 5, "cannot marshal big.Int to string")
|
2021-04-17 10:00:07 +00:00
|
|
|
|
|
|
|
// ErrUnmarshalBigInt returns an error resulting from unmarshaling a big.Int from a string.
|
2022-11-14 19:40:14 +00:00
|
|
|
ErrUnmarshalBigInt = errorsmod.Register(RootCodespace, 6, "cannot unmarshal big.Int from string")
|
2020-04-16 15:47:39 +00:00
|
|
|
)
|