swap

package
v0.15.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AttributeKeyDepositor      = types.AttributeKeyDepositor
	AttributeKeyExactDirection = types.AttributeKeyExactDirection
	AttributeKeyFeePaid        = types.AttributeKeyFeePaid
	AttributeKeyOwner          = types.AttributeKeyOwner
	AttributeKeyPoolID         = types.AttributeKeyPoolID
	AttributeKeyRequester      = types.AttributeKeyRequester
	AttributeKeyShares         = types.AttributeKeyShares
	AttributeKeySwapInput      = types.AttributeKeySwapInput
	AttributeKeySwapOutput     = types.AttributeKeySwapOutput
	AttributeValueCategory     = types.AttributeValueCategory
	DefaultParamspace          = types.DefaultParamspace
	EventTypeSwapDeposit       = types.EventTypeSwapDeposit
	EventTypeSwapTrade         = types.EventTypeSwapTrade
	EventTypeSwapWithdraw      = types.EventTypeSwapWithdraw
	ModuleAccountName          = types.ModuleAccountName
	ModuleName                 = types.ModuleName
	PoolIDSep                  = types.PoolIDSep
	QuerierRoute               = types.QuerierRoute
	QueryGetDeposits           = types.QueryGetDeposits
	QueryGetParams             = types.QueryGetParams
	QueryGetPool               = types.QueryGetPool
	QueryGetPools              = types.QueryGetPools
	RouterKey                  = types.RouterKey
	StoreKey                   = types.StoreKey
)

Variables

View Source
var (
	// function aliases
	AllInvariants                        = keeper.AllInvariants
	NewKeeper                            = keeper.NewKeeper
	NewQuerier                           = keeper.NewQuerier
	PoolRecordsInvariant                 = keeper.PoolRecordsInvariant
	PoolReservesInvariant                = keeper.PoolReservesInvariant
	PoolSharesInvariant                  = keeper.PoolSharesInvariant
	RegisterInvariants                   = keeper.RegisterInvariants
	ShareRecordsInvariant                = keeper.ShareRecordsInvariant
	DefaultGenesisState                  = types.DefaultGenesisState
	DefaultParams                        = types.DefaultParams
	DepositorPoolSharesKey               = types.DepositorPoolSharesKey
	NewAllowedPool                       = types.NewAllowedPool
	NewAllowedPools                      = types.NewAllowedPools
	NewBasePool                          = types.NewBasePool
	NewBasePoolWithExistingShares        = types.NewBasePoolWithExistingShares
	NewDenominatedPool                   = types.NewDenominatedPool
	NewDenominatedPoolWithExistingShares = types.NewDenominatedPoolWithExistingShares
	NewDepositsQueryResult               = types.NewDepositsQueryResult
	NewGenesisState                      = types.NewGenesisState
	NewMsgDeposit                        = types.NewMsgDeposit
	NewMsgSwapExactForTokens             = types.NewMsgSwapExactForTokens
	NewMsgSwapForExactTokens             = types.NewMsgSwapForExactTokens
	NewMsgWithdraw                       = types.NewMsgWithdraw
	NewParams                            = types.NewParams
	NewPoolRecord                        = types.NewPoolRecord
	NewPoolRecordFromPool                = types.NewPoolRecordFromPool
	NewPoolStatsQueryResult              = types.NewPoolStatsQueryResult
	NewQueryDepositsParams               = types.NewQueryDepositsParams
	NewQueryPoolParams                   = types.NewQueryPoolParams
	NewShareRecord                       = types.NewShareRecord
	ParamKeyTable                        = types.ParamKeyTable
	PoolID                               = types.PoolID
	PoolIDFromCoins                      = types.PoolIDFromCoins
	PoolKey                              = types.PoolKey
	RegisterCodec                        = types.RegisterCodec

	// variable aliases
	DefaultAllowedPools       = types.DefaultAllowedPools
	DefaultPoolRecords        = types.DefaultPoolRecords
	DefaultShareRecords       = types.DefaultShareRecords
	DefaultSwapFee            = types.DefaultSwapFee
	DepositorPoolSharesPrefix = types.DepositorPoolSharesPrefix
	ErrDeadlineExceeded       = types.ErrDeadlineExceeded
	ErrDepositNotFound        = types.ErrDepositNotFound
	ErrInsufficientLiquidity  = types.ErrInsufficientLiquidity
	ErrInvalidCoin            = types.ErrInvalidCoin
	ErrInvalidDeadline        = types.ErrInvalidDeadline
	ErrInvalidPool            = types.ErrInvalidPool
	ErrInvalidShares          = types.ErrInvalidShares
	ErrInvalidSlippage        = types.ErrInvalidSlippage
	ErrNotAllowed             = types.ErrNotAllowed
	ErrNotImplemented         = types.ErrNotImplemented
	ErrSlippageExceeded       = types.ErrSlippageExceeded
	KeyAllowedPools           = types.KeyAllowedPools
	KeySwapFee                = types.KeySwapFee
	MaxSwapFee                = types.MaxSwapFee
	ModuleCdc                 = types.ModuleCdc
	PoolKeyPrefix             = types.PoolKeyPrefix
)

Functions

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState

ExportGenesis exports the genesis state

func InitGenesis

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

InitGenesis initializes story state from genesis file

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler creates an sdk.Handler for swap messages

Types

type AccountKeeper

type AccountKeeper = types.AccountKeeper

type AllowedPool

type AllowedPool = types.AllowedPool

type AllowedPools

type AllowedPools = types.AllowedPools

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule app module type

func NewAppModule

func NewAppModule(keeper Keeper, accountKeeper types.AccountKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)

BeginBlock module begin-block

func (AppModule) EndBlock

EndBlock module end-block

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis module export genesis

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis module init-genesis

func (AppModule) Name

func (AppModule) Name() string

Name module name

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns no sdk.Querier.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute module querier route name

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants register module invariants

func (AppModule) Route

func (AppModule) Route() string

Route module message route name

func (AppModule) WeightedOperations

func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation

WeightedOperations returns the all the swap module operations with their respective weights.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic app module basics object

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis default genesis state

func (AppModuleBasic) GenerateGenesisState

func (AppModuleBasic) GenerateGenesisState(simState *module.SimulationState)

GenerateGenesisState creates a randomized GenState of the swap module

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

GetQueryCmd returns no root query command for the swap module.

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

GetTxCmd returns the root tx command for the swap module.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name get module name

func (AppModuleBasic) ProposalContents

ProposalContents doesn't return any content functions for governance proposals.

func (AppModuleBasic) RandomizedParams

func (AppModuleBasic) RandomizedParams(r *rand.Rand) []sim.ParamChange

RandomizedParams returns nil because swap has no params.

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

RegisterCodec register module codec

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

RegisterRESTRoutes registers REST routes for the swap module.

func (AppModuleBasic) RegisterStoreDecoder

func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for swap module's types

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

ValidateGenesis module validate genesis

type BasePool

type BasePool = types.BasePool

type DenominatedPool

type DenominatedPool = types.DenominatedPool

type DepositsQueryResult

type DepositsQueryResult = types.DepositsQueryResult

type DepositsQueryResults

type DepositsQueryResults = types.DepositsQueryResults

type GenesisState

type GenesisState = types.GenesisState

type Keeper

type Keeper = keeper.Keeper

type MsgDeposit

type MsgDeposit = types.MsgDeposit

type MsgSwapExactForTokens

type MsgSwapExactForTokens = types.MsgSwapExactForTokens

type MsgSwapForExactTokens

type MsgSwapForExactTokens = types.MsgSwapForExactTokens

type MsgWithDeadline

type MsgWithDeadline = types.MsgWithDeadline

type MsgWithdraw

type MsgWithdraw = types.MsgWithdraw

type Params

type Params = types.Params

type PoolRecord

type PoolRecord = types.PoolRecord

type PoolRecords

type PoolRecords = types.PoolRecords

type PoolStatsQueryResult

type PoolStatsQueryResult = types.PoolStatsQueryResult

type PoolStatsQueryResults

type PoolStatsQueryResults = types.PoolStatsQueryResults

type QueryDepositsParams

type QueryDepositsParams = types.QueryDepositsParams

type QueryPoolParams

type QueryPoolParams = types.QueryPoolParams

type ShareRecord

type ShareRecord = types.ShareRecord

type ShareRecords

type ShareRecords = types.ShareRecords

type SupplyKeeper

type SupplyKeeper = types.SupplyKeeper

type SwapHooks

type SwapHooks = types.SwapHooks

Directories

Path Synopsis
client
cli
legacy

Jump to

Keyboard shortcuts

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