Documentation ¶
Index ¶
- func DefaultGenesisState() *coinswaptypes.GenesisState
- func ExportGenesis(ctx sdk.Context, k Keeper) coinswaptypes.GenesisState
- func GetGenesisStateFromAppState(cdc *codec.LegacyAmino, appState map[string]json.RawMessage) coinswaptypes.GenesisState
- func InitGenesis(ctx sdk.Context, k Keeper, data coinswaptypes.GenesisState) []abci.ValidatorUpdate
- func NewMsgServerImpl(keeper Keeper) coinswaptypes.MsgServer
- func NewQuerier(keeper Keeper, cdc *codec.LegacyAmino) sdk.Querier
- type Keeper
- func (k Keeper) ExchangeDenom(ctx sdk.Context, fromDenom, toDenom string, amt sdk.Coin, ...) error
- func (k Keeper) GetDecParam(ctx sdk.Context, key []byte) (res sdk.Dec)
- func (k Keeper) GetExchanges(ctx sdk.Context) (res []coinswaptypes.Exchange)
- func (k Keeper) GetInitialRate(ctx sdk.Context) (rate sdk.Dec)
- func (k Keeper) GetParams(ctx sdk.Context) (params coinswaptypes.Params)
- func (k Keeper) GetRate(ctx sdk.Context, fromDenom, toDenom string, ...) (sdk.Dec, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetExchanges(ctx sdk.Context, value []coinswaptypes.Exchange)
- func (k Keeper) SetInitialRate(ctx sdk.Context, value sdk.Dec)
- func (k Keeper) SetParams(ctx sdk.Context, value coinswaptypes.Params)
- type Querier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultGenesisState ¶
func DefaultGenesisState() *coinswaptypes.GenesisState
DefaultGenesisState returns the default oracle genesis state.
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) coinswaptypes.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func GetGenesisStateFromAppState ¶
func GetGenesisStateFromAppState(cdc *codec.LegacyAmino, appState map[string]json.RawMessage) coinswaptypes.GenesisState
GetGenesisStateFromAppState returns x/coinswap GenesisState given raw application genesis state.
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, data coinswaptypes.GenesisState) []abci.ValidatorUpdate
InitGenesis performs genesis initialization for the oracle module.
func NewMsgServerImpl ¶
func NewMsgServerImpl(keeper Keeper) coinswaptypes.MsgServer
NewMsgServerImpl returns an implementation of the coinswap MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(keeper Keeper, cdc *codec.LegacyAmino) sdk.Querier
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key sdk.StoreKey, subspace paramstypes.Subspace, bk coinswaptypes.BankKeeper, dk coinswaptypes.DistrKeeper, ok coinswaptypes.OracleKeeper) Keeper
func (Keeper) ExchangeDenom ¶
func (k Keeper) ExchangeDenom( ctx sdk.Context, fromDenom, toDenom string, amt sdk.Coin, requester sdk.AccAddress, additionalExchangeRates ...coinswaptypes.Exchange, ) error
ExchangeDenom exchanges given amount
func (Keeper) GetDecParam ¶
GetDecParam returns the parameter as specified by key as sdk.Dec
func (Keeper) GetExchanges ¶
func (k Keeper) GetExchanges(ctx sdk.Context) (res []coinswaptypes.Exchange)
func (Keeper) GetParams ¶
func (k Keeper) GetParams(ctx sdk.Context) (params coinswaptypes.Params)
GetParams returns all current parameters as a types.Params instance.
func (Keeper) GetRate ¶
func (k Keeper) GetRate( ctx sdk.Context, fromDenom, toDenom string, additionalExchangeRates ...coinswaptypes.Exchange, ) (sdk.Dec, error)
GetRate returns the exchange rate for the given pair
func (Keeper) SetExchanges ¶
func (k Keeper) SetExchanges(ctx sdk.Context, value []coinswaptypes.Exchange)
type Querier ¶
type Querier struct {
Keeper
}
func (Querier) Params ¶
func (q Querier) Params(c context.Context, _ *coinswaptypes.QueryParamsRequest) (*coinswaptypes.QueryParamsResponse, error)
func (Querier) Rate ¶
func (q Querier) Rate(c context.Context, request *coinswaptypes.QueryRateRequest) (*coinswaptypes.QueryRateResponse, error)
Click to show internal directories.
Click to hide internal directories.