keeper

package
v0.0.0-...-ea6fe57 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 9 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 oracle MsgServer interface for the provided BaseKeeper.

Types

type BaseKeeper

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

BaseKeeper of this module maintains collections of oracle.

func NewKeeper

func NewKeeper(
	cdc codec.BinaryMarshaler,
	storeKey sdk.StoreKey,
	paramSpace paramtypes.Subspace,
	ak authkeeper.AccountKeeper,
	bk types.BankKeeper,
) BaseKeeper

NewKeeper creates new instances of the oracle BaseKeeper

func (BaseKeeper) GetParams

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

GetParams returns the total set of oracle parameters.

func (BaseKeeper) GetRef

func (k BaseKeeper) GetRef(ctx sdk.Context, symbol string) types.Ref

func (BaseKeeper) GetReferenceData

func (k BaseKeeper) GetReferenceData(ctx sdk.Context, base string, quote string) *types.ReferenceData

func (BaseKeeper) GetReferenceDataBulk

func (k BaseKeeper) GetReferenceDataBulk(ctx sdk.Context, bases []string, quotes []string) []*types.ReferenceData

func (BaseKeeper) GetStore

func (k BaseKeeper) GetStore(ctx sdk.Context) sdk.KVStore

func (BaseKeeper) IsRelayer

func (k BaseKeeper) IsRelayer(ctx sdk.Context, relayer sdk.AccAddress) bool

func (BaseKeeper) Params

func (BaseKeeper) SetParams

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

SetParams set the params

func (BaseKeeper) SetRef

func (k BaseKeeper) SetRef(ctx sdk.Context, symbol string, refData types.Ref)

type Keeper

type Keeper interface {
	// read the stored
	GetRef(ctx sdk.Context, symbol string) types.Ref
	// can only be called by Relay function
	SetRef(ctx sdk.Context, symbol string, refData types.Ref)

	// derive a ReferenceData from base Ref and quote Ref
	GetReferenceData(ctx sdk.Context, base string, quote string) *types.ReferenceData
	GetReferenceDataBulk(ctx sdk.Context, bases []string, quotes []string) []*types.ReferenceData

	GetParams(ctx sdk.Context) types.Params
	// can only be set by a proposal
	SetParams(ctx sdk.Context, params types.Params)

	// check that the relayer has been authorized
	IsRelayer(ctx sdk.Context, relayer sdk.AccAddress) bool

	types.QueryServer
}

Keeper defines a module interface that facilitates the getting and setting of oracle reference data

Jump to

Keyboard shortcuts

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