Documentation ¶
Index ¶
- Constants
- Variables
- func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState
- func InitGenesis(ctx sdk.Context, k Keeper, gs types.GenesisState)
- func NewHandler(k Keeper) sdk.Handler
- type AccountKeeper
- type AllowedPool
- type AllowedPools
- type AppModule
- func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (AppModule) Route() string
- func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GenerateGenesisState(simState *module.SimulationState)
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent
- func (AppModuleBasic) RandomizedParams(r *rand.Rand) []sim.ParamChange
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type BasePool
- type DenominatedPool
- type DepositsQueryResult
- type DepositsQueryResults
- type GenesisState
- type Keeper
- type MsgDeposit
- type MsgSwapExactForTokens
- type MsgSwapForExactTokens
- type MsgWithDeadline
- type MsgWithdraw
- type Params
- type PoolRecord
- type PoolRecords
- type PoolStatsQueryResult
- type PoolStatsQueryResults
- type QueryDepositsParams
- type QueryPoolParams
- type ShareRecord
- type ShareRecords
- type SupplyKeeper
- type SwapHooks
Constants ¶
const ( AttributeKeyDepositor = types.AttributeKeyDepositor AttributeKeyExactDirection = types.AttributeKeyExactDirection AttributeKeyFeePaid = types.AttributeKeyFeePaid AttributeKeyOwner = types.AttributeKeyOwner AttributeKeyPoolID = types.AttributeKeyPoolID AttributeKeyRequester = types.AttributeKeyRequester 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 ¶
var ( // function aliases AllInvariants = keeper.AllInvariants NewKeeper = keeper.NewKeeper NewQuerier = keeper.NewQuerier PoolRecordsInvariant = keeper.PoolRecordsInvariant PoolReservesInvariant = keeper.PoolReservesInvariant RegisterInvariants = keeper.RegisterInvariants DefaultGenesisState = types.DefaultGenesisState DefaultParams = types.DefaultParams NewAllowedPool = types.NewAllowedPool NewAllowedPools = types.NewAllowedPools NewBasePool = types.NewBasePool NewDenominatedPool = types.NewDenominatedPool 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 ParamKeyTable = types.ParamKeyTable PoolID = types.PoolID PoolIDFromCoins = types.PoolIDFromCoins PoolKey = types.PoolKey RegisterCodec = types.RegisterCodec // variable aliases DefaultAllowedPools = types.DefaultAllowedPools DefaultPoolRecords = types.DefaultPoolRecords DefaultSwapFee = types.DefaultSwapFee ErrDeadlineExceeded = types.ErrDeadlineExceeded ErrDepositNotFound = types.ErrDepositNotFound ErrInsufficientLiquidity = types.ErrInsufficientLiquidity ErrInvalidCoin = types.ErrInvalidCoin ErrInvalidDeadline = types.ErrInvalidDeadline ErrInvalidPool = types.ErrInvalidPool 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 ¶
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 ¶
func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
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) NewHandler ¶
NewHandler module handler
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler returns no sdk.Querier.
func (AppModule) QuerierRoute ¶
QuerierRoute module querier route name
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants register module invariants
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) ProposalContents ¶
func (AppModuleBasic) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent
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 DenominatedPool ¶
type DenominatedPool = types.DenominatedPool
type DepositsQueryResult ¶
type DepositsQueryResult = types.DepositsQueryResult
type DepositsQueryResults ¶
type DepositsQueryResults = types.DepositsQueryResults
type GenesisState ¶
type GenesisState = types.GenesisState
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 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