Documentation
¶
Index ¶
- Constants
- func ErrInsufficientSwapCoins(codespace sdk.CodespaceType, rval sdk.Int) sdk.Error
- func ErrRecursiveSwap(codespace sdk.CodespaceType, denom string) sdk.Error
- func ErrUnknownDenomination(codespace sdk.CodespaceType, denom string) sdk.Error
- func NewHandler(k Keeper) sdk.Handler
- type Keeper
- type SwapMsg
Constants ¶
View Source
const ( DefaultCodespace sdk.CodespaceType = "MARKET" CodeInsufficientSwap sdk.CodeType = 1 CodeUnknownDenom sdk.CodeType = 2 CodeRecursiveSwap sdk.CodeType = 3 )
Oracle errors reserve 1101-1199
Variables ¶
This section is empty.
Functions ¶
func ErrInsufficientSwapCoins ¶
ErrInsufficientSwapCoins called when not enough coins are being requested for a swap
func ErrRecursiveSwap ¶
func ErrRecursiveSwap(codespace sdk.CodespaceType, denom string) sdk.Error
ErrRecursiveSwap called when Ask and Offer coin denominatioins are equal
func ErrUnknownDenomination ¶
func ErrUnknownDenomination(codespace sdk.CodespaceType, denom string) sdk.Error
ErrUnknownDenomination called when the signer of a Msg is not a validator
func NewHandler ¶
NewHandler creates a new handler for all market type messages.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
nolint
type SwapMsg ¶
type SwapMsg struct { Trader sdk.AccAddress // Address of the trader OfferCoin sdk.Coin // Coin being offered AskDenom string // Denom of the coin to swap to }
SwapMsg defines the msg of a trader containing terra coin to be swapped with luna coin, or luna coin to be swapped with the terra coin
func NewSwapMsg ¶
NewSwapMsg creates a SwapMsg instance
func (SwapMsg) GetSigners ¶
func (msg SwapMsg) GetSigners() []sdk.AccAddress
GetSigners Implements Msg
func (SwapMsg) ValidateBasic ¶
ValidateBasic Implements Msg
Click to show internal directories.
Click to hide internal directories.