Documentation ¶
Index ¶
- type CoinRes
- type Keeper
- func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
- func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (q Keeper) GetCoinPrice(coin string) (float64, error)
- func (q Keeper) GetPairPrice(pair [2]string) ([2]float64, error)
- func (k Keeper) IsHostEnabled(ctx sdk.Context) bool
- func (k Keeper) MarshalDenomTrace(denomTrace types.DenomTrace) ([]byte, error)
- func (k Keeper) MustMarshalDenomTrace(denomTrace types.DenomTrace) []byte
- func (k Keeper) MustUnmarshalDenomTrace(bz []byte) types.DenomTrace
- func (k Keeper) OnChanOpenTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) error
- func (k Keeper) UnmarshalDenomTrace(bz []byte) (types.DenomTrace, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the IBC price keeper
func NewKeeper ¶
func NewKeeper( paramSpace paramtypes.Subspace, channelKeeper icptypes.ChannelKeeper, portKeeper icptypes.PortKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, ) Keeper
NewKeeper creates a new IBC price Keeper instance
func (Keeper) AuthenticateCapability ¶
func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function
func (Keeper) ClaimCapability ¶
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
ClaimCapability wraps the scopedKeeper's ClaimCapability function
func (Keeper) GetCoinPrice ¶
get price of one coin get price over ibc packet
func (Keeper) GetPairPrice ¶
get price of both coins
func (Keeper) IsHostEnabled ¶
IsHostEnabled retrieves the host enabled boolean from the paramstore. True is returned if the host submodule is enabled.
func (Keeper) MarshalDenomTrace ¶
func (k Keeper) MarshalDenomTrace(denomTrace types.DenomTrace) ([]byte, error)
MarshalDenomTrace attempts to encode an DenomTrace object and returns the raw encoded bytes.
func (Keeper) MustMarshalDenomTrace ¶
func (k Keeper) MustMarshalDenomTrace(denomTrace types.DenomTrace) []byte
MustMarshalDenomTrace attempts to encode an DenomTrace object and returns the raw encoded bytes. It panics on error.
func (Keeper) MustUnmarshalDenomTrace ¶
func (k Keeper) MustUnmarshalDenomTrace(bz []byte) types.DenomTrace
MustUnmarshalDenomTrace attempts to decode and return an DenomTrace object from raw encoded bytes. It panics on error.
func (Keeper) OnChanOpenTry ¶
func (k Keeper) OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version, counterpartyVersion string, ) error
OnChanOpenTry performs basic validation of the ICP channel and registers a new interchain account (if it doesn't exist).
func (Keeper) UnmarshalDenomTrace ¶
func (k Keeper) UnmarshalDenomTrace(bz []byte) (types.DenomTrace, error)
UnmarshalDenomTrace attempts to decode and return an DenomTrace object from raw encoded bytes.