keeper

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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 maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec, storeKey sdk.StoreKey, stakeKeeper types.StakingKeeper, consensusNeeded float64,
) Keeper

NewKeeper creates new instances of the oracle Keeper

func (Keeper) AddOracleWhiteList

func (k Keeper) AddOracleWhiteList(ctx sdk.Context, validator sdk.ValAddress)

AddOracleWhiteList add new validator to whitelist

func (Keeper) EnsureAddressIsInWhitelist

func (k Keeper) EnsureAddressIsInWhitelist(ctx sdk.Context, validatorAddress string) error

func (Keeper) Exists

func (k Keeper) Exists(ctx sdk.Context, key []byte) bool

Exists check if the key exists

func (Keeper) ExistsOracleWhiteList

func (k Keeper) ExistsOracleWhiteList(ctx sdk.Context) bool

func (Keeper) GetAdminAccount

func (k Keeper) GetAdminAccount(ctx sdk.Context) (adminAccount sdk.AccAddress)

func (Keeper) GetOracleWhiteList

func (k Keeper) GetOracleWhiteList(ctx sdk.Context) []sdk.ValAddress

func (Keeper) GetProphecies

func (k Keeper) GetProphecies(ctx sdk.Context) []types.Prophecy

func (Keeper) GetProphecy

func (k Keeper) GetProphecy(ctx sdk.Context, id string) (types.Prophecy, bool)

GetProphecy gets the entire prophecy data struct for a given id

func (Keeper) GetProphecyIterator added in v0.15.0

func (k Keeper) GetProphecyIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) IsAdminAccount

func (k Keeper) IsAdminAccount(ctx sdk.Context, adminAccount sdk.AccAddress) bool

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) ProcessClaim

func (k Keeper) ProcessClaim(ctx sdk.Context, claim types.Claim) (types.Status, error)

func (Keeper) ProcessUpdateWhiteListValidator

func (k Keeper) ProcessUpdateWhiteListValidator(ctx sdk.Context, cosmosSender sdk.AccAddress, validator sdk.ValAddress, operationtype string) error

ProcessUpdateWhiteListValidator processes the update whitelist validator from admin

func (Keeper) RemoveOracleWhiteList

func (k Keeper) RemoveOracleWhiteList(ctx sdk.Context, validator sdk.ValAddress)

RemoveOracleWhiteList remove a validator from whitelist

func (Keeper) SetAdminAccount

func (k Keeper) SetAdminAccount(ctx sdk.Context, adminAccount sdk.AccAddress)

func (Keeper) SetDBProphecy

func (k Keeper) SetDBProphecy(ctx sdk.Context, prophecy types.DBProphecy)

func (Keeper) SetOracleWhiteList

func (k Keeper) SetOracleWhiteList(ctx sdk.Context, validatorList []sdk.ValAddress)

func (Keeper) SetProphecy

func (k Keeper) SetProphecy(ctx sdk.Context, prophecy types.Prophecy) error

SetProphecy saves a prophecy with an initial claim

func (Keeper) ValidateAddress

func (k Keeper) ValidateAddress(ctx sdk.Context, address sdk.ValAddress) bool

ValidateAddress is a validator in whitelist

Jump to

Keyboard shortcuts

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