coinswap

package
v0.16.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodespace   = types.DefaultCodespace
	ModuleName         = types.ModuleName
	FormatUniABSPrefix = types.FormatUniABSPrefix
)

Variables

View Source
var (
	DefaultParamSpace = types.DefaultParamSpace
	QueryLiquidity    = types.QueryLiquidity

	RegisterCodec = types.RegisterCodec

	NewMsgSwapOrder       = types.NewMsgSwapOrder
	NewMsgAddLiquidity    = types.NewMsgAddLiquidity
	NewMsgRemoveLiquidity = types.NewMsgRemoveLiquidity
	NewKeeper             = keeper.NewKeeper
	NewQuerier            = keeper.NewQuerier

	ErrInvalidDeadline  = types.ErrInvalidDeadline
	ErrNotPositive      = types.ErrNotPositive
	ErrConstraintNotMet = types.ErrConstraintNotMet

	GetUniId                    = types.GetUniId
	GetCoinMinDenomFromUniDenom = types.GetCoinMinDenomFromUniDenom
	GetUniDenom                 = types.GetUniDenom
	GetUniCoinType              = types.GetUniCoinType
	CheckUniDenom               = types.CheckUniDenom
	CheckUniId                  = types.CheckUniId
)

Functions

func HandleMsgAddLiquidity

func HandleMsgAddLiquidity(ctx sdk.Context, msg MsgAddLiquidity, k Keeper) sdk.Result

Handle MsgAddLiquidity. If the reserve pool does not exist, it will be created. The first liquidity provider sets the exchange rate.

func HandleMsgRemoveLiquidity

func HandleMsgRemoveLiquidity(ctx sdk.Context, msg MsgRemoveLiquidity, k Keeper) sdk.Result

HandleMsgRemoveLiquidity handler for MsgRemoveLiquidity

func HandleMsgSwapOrder

func HandleMsgSwapOrder(ctx sdk.Context, msg MsgSwapOrder, k Keeper) sdk.Result

Handle MsgSwapOrder.

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)

InitGenesis new coinswap genesis

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler returns a handler for "coinswap" type messages.

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis - placeholder function

Types

type GenesisState

type GenesisState struct {
	Params types.Params `json:"params"`
}

GenesisState - coinswap genesis state

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState creates a default GenesisState object

func ExportGenesis

func ExportGenesis(ctx sdk.Context, keeper Keeper) GenesisState

ExportGenesis returns a GenesisState for a given context and keeper.

func NewGenesisState

func NewGenesisState(params types.Params) GenesisState

NewGenesisState is the constructor function for GenesisState

type Input

type Input = types.Input

type Keeper

type Keeper = keeper.Keeper

type MsgAddLiquidity

type MsgAddLiquidity = types.MsgAddLiquidity

type MsgRemoveLiquidity

type MsgRemoveLiquidity = types.MsgRemoveLiquidity

type MsgSwapOrder

type MsgSwapOrder = types.MsgSwapOrder

type Output

type Output = types.Output

type Params

type Params = types.Params

type QueryLiquidityParams

type QueryLiquidityParams = types.QueryLiquidityParams

Directories

Path Synopsis
internal
types
Package types nolint nolint
Package types nolint nolint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL