keeper

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func Pow10

func Pow10(decimal uint64) (value sdk.Dec)

Types

type Hooks

type Hooks struct {
	// contains filtered or unexported fields
}

Hooks wrapper struct

func (Hooks) AfterEpochEnd

func (h Hooks) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)

func (Hooks) BeforeEpochStart

func (h Hooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)

epochs hooks

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	authority string,
	ps paramtypes.Subspace,
	channelKeeper types.ChannelKeeper,
	portKeeper types.PortKeeper,
	scopedKeeper exported.ScopedKeeper,
) *Keeper

func (Keeper) AfterEpochEnd

func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)

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) BandPriceResult

BandPriceResult returns the BandPrice result by RequestId

func (Keeper) BeforeEpochStart

func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)

func (Keeper) BindPort

func (k Keeper) BindPort(ctx sdk.Context, portID string) error

BindPort defines a wrapper function for the port Keeper's function in order to expose it to module's InitGenesis function

func (Keeper) ChanCloseInit

func (k Keeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error

ChanCloseInit defines a wrapper function for the channel Keeper's function.

func (Keeper) ClaimCapability

func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error

ClaimCapability allows the IBC app module to claim a capability that core IBC passes to it

func (Keeper) EndBlock

func (k Keeper) EndBlock(ctx sdk.Context)

func (Keeper) GetAllAssetInfo

func (k Keeper) GetAllAssetInfo(ctx sdk.Context) (list []types.AssetInfo)

GetAllAssetInfo returns all assetInfo

func (Keeper) GetAllPrice

func (k Keeper) GetAllPrice(ctx sdk.Context) (list []types.Price)

GetAllPrice returns all price

func (Keeper) GetAllPriceFeeder

func (k Keeper) GetAllPriceFeeder(ctx sdk.Context) (list []types.PriceFeeder)

GetAllPriceFeeder returns all priceFeeder

func (Keeper) GetAssetInfo

func (k Keeper) GetAssetInfo(ctx sdk.Context, denom string) (val types.AssetInfo, found bool)

GetAssetInfo returns a assetInfo from its index

func (Keeper) GetAssetPrice

func (k Keeper) GetAssetPrice(ctx sdk.Context, asset string) (types.Price, bool)

func (Keeper) GetAssetPriceFromDenom

func (k Keeper) GetAssetPriceFromDenom(ctx sdk.Context, denom string) sdk.Dec

func (Keeper) GetBandPriceResult

func (k Keeper) GetBandPriceResult(ctx sdk.Context, id types.OracleRequestID) (types.BandPriceResult, error)

GetBandPriceResult returns the BandPrice by requestId

func (Keeper) GetBandRequest

func (k Keeper) GetBandRequest(ctx sdk.Context, id types.OracleRequestID) (types.BandPriceCallData, error)

SetBandRequest returns band request waiting for responses

func (Keeper) GetLastBandRequestId

func (k Keeper) GetLastBandRequestId(ctx sdk.Context) int64

GetLastBandRequestId return the id from the last BandPrice request

func (Keeper) GetLatestPriceFromAnySource

func (k Keeper) GetLatestPriceFromAnySource(ctx sdk.Context, asset string) (val types.Price, found bool)

func (Keeper) GetLatestPriceFromAssetAndSource

func (k Keeper) GetLatestPriceFromAssetAndSource(ctx sdk.Context, asset, source string) (val types.Price, found bool)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams get all parameters as types.Params

func (Keeper) GetPort

func (k Keeper) GetPort(ctx sdk.Context) string

GetPort returns the portID for the IBC app module. Used in ExportGenesis

func (Keeper) GetPrice

func (k Keeper) GetPrice(ctx sdk.Context, asset, source string, timestamp uint64) (val types.Price, found bool)

GetPrice returns a price from its index

func (Keeper) GetPriceFeeder

func (k Keeper) GetPriceFeeder(ctx sdk.Context, feeder string) (val types.PriceFeeder, found bool)

GetPriceFeeder returns a priceFeeder from its index

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

func (Keeper) IsBound

func (k Keeper) IsBound(ctx sdk.Context, portID string) bool

IsBound checks if the IBC app module is already bound to the desired port

func (Keeper) LastBandRequestId

LastBandRequestId returns the last BandPrice request Id

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MigrateAllLegacyPrices added in v0.29.19

func (k Keeper) MigrateAllLegacyPrices(ctx sdk.Context)

MigrateAllLegacyPrices migrates all legacy prices

func (Keeper) Params

func (Keeper) RemoveAssetInfo

func (k Keeper) RemoveAssetInfo(ctx sdk.Context, denom string)

RemoveAssetInfo removes a assetInfo from the store

func (Keeper) RemovePrice

func (k Keeper) RemovePrice(ctx sdk.Context, asset, source string, timestamp uint64)

RemovePrice removes a price from the store

func (Keeper) RemovePriceFeeder

func (k Keeper) RemovePriceFeeder(ctx sdk.Context, feeder string)

RemovePriceFeeder removes a priceFeeder from the store

func (Keeper) SetAssetInfo

func (k Keeper) SetAssetInfo(ctx sdk.Context, assetInfo types.AssetInfo)

SetAssetInfo set a specific assetInfo in the store from its index

func (Keeper) SetBandPriceResult

func (k Keeper) SetBandPriceResult(ctx sdk.Context, requestID types.OracleRequestID, result types.BandPriceResult)

SetBandPriceResult saves the BandPrice result

func (Keeper) SetBandRequest

func (k Keeper) SetBandRequest(ctx sdk.Context, requestID types.OracleRequestID, result types.BandPriceCallData)

SetBandRequest saves band request waiting for responses

func (Keeper) SetLastBandRequestId

func (k Keeper) SetLastBandRequestId(ctx sdk.Context, id types.OracleRequestID)

SetLastBandRequestId saves the id from the last BandPrice request

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetPort

func (k Keeper) SetPort(ctx sdk.Context, portID string)

SetPort sets the portID for the IBC app module. Used in InitGenesis

func (Keeper) SetPrice

func (k Keeper) SetPrice(ctx sdk.Context, price types.Price)

SetPrice set a specific price in the store from its index

func (Keeper) SetPriceFeeder

func (k Keeper) SetPriceFeeder(ctx sdk.Context, priceFeeder types.PriceFeeder)

SetPriceFeeder set a specific priceFeeder in the store from its index

Jump to

Keyboard shortcuts

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