* Update docs/sdk/clients.md * organize ADR directory like tendermint * docs: move spec-proposals into spec/ * remove lotion, moved to website repo * move getting-started to cosmos-hub, and voyager to website * docs: move lite/ into clients/lite/ * move introduction/ content to website repo * move resources/ content to website repo * mv sdk/clients.md to clients/clients.md * mv validators to cosmos-hub/validators * move deprecated sdk/ content to _attic * sdk/modules.md is duplicate with modules/README.md * consolidate remianing sdk/ files into a single sdk.md * move examples/ to docs/examples/ * mv docs/cosmos-hub to docs/gaia * Add keys/accounts section to localnet docs
32 lines
980 B
Go
32 lines
980 B
Go
package oracle
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
)
|
|
|
|
// Oracle errors reserve 1101-1199
|
|
const (
|
|
CodeNotValidator sdk.CodeType = 1101
|
|
CodeAlreadyProcessed sdk.CodeType = 1102
|
|
CodeAlreadySigned sdk.CodeType = 1103
|
|
CodeUnknownRequest sdk.CodeType = sdk.CodeUnknownRequest
|
|
)
|
|
|
|
// ----------------------------------------
|
|
// Error constructors
|
|
|
|
// ErrNotValidator called when the signer of a Msg is not a validator
|
|
func ErrNotValidator(codespace sdk.CodespaceType, address sdk.AccAddress) sdk.Error {
|
|
return sdk.NewError(codespace, CodeNotValidator, address.String())
|
|
}
|
|
|
|
// ErrAlreadyProcessed called when a payload is already processed
|
|
func ErrAlreadyProcessed(codespace sdk.CodespaceType) sdk.Error {
|
|
return sdk.NewError(codespace, CodeAlreadyProcessed, "")
|
|
}
|
|
|
|
// ErrAlreadySigned called when the signer is trying to double signing
|
|
func ErrAlreadySigned(codespace sdk.CodespaceType) sdk.Error {
|
|
return sdk.NewError(codespace, CodeAlreadySigned, "")
|
|
}
|