keeper

package
v0.0.0-...-2da98db Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 14 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.

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.Codec,
	storeKey,
	memKey storetypes.StoreKey,
	govAddr sdk.AccAddress,
) Keeper

NewKeeper creates new instances of the authority Keeper

func (Keeper) Authorization

Authorization returns the authorization for a given message URL

func (Keeper) AuthorizationList

AuthorizationList returns the list of authorizations

func (Keeper) ChainInfo

ChainInfo queries chain info

func (Keeper) CheckAuthorization

func (k Keeper) CheckAuthorization(ctx sdk.Context, msg sdk.Msg) error

CheckAuthorization uses both the authorization list and the policies to check if the signer is authorized

func (Keeper) GetAdditionalChainList

func (k Keeper) GetAdditionalChainList(ctx sdk.Context) []chains.Chain

GetAdditionalChainList returns the list of chains in chain info object additional chains are additional static chain information stored on-chain used in addition with the default chain information this list allow to add new chain support without doing an upgrade returns empty list if no chains are present

func (Keeper) GetAuthorizationList

func (k Keeper) GetAuthorizationList(ctx sdk.Context) (val types.AuthorizationList, found bool)

GetAuthorizationList returns the authorization list from the store

func (Keeper) GetChainInfo

func (k Keeper) GetChainInfo(ctx sdk.Context) (val types.ChainInfo, found bool)

GetChainInfo returns the policies from the store

func (Keeper) GetCodec

func (k Keeper) GetCodec() codec.Codec

GetCodec returns the codec for authority

func (Keeper) GetMemKey

func (k Keeper) GetMemKey() storetypes.StoreKey

GetMemKey returns the mem key to the store for authority

func (Keeper) GetPolicies

func (k Keeper) GetPolicies(ctx sdk.Context) (val types.Policies, found bool)

GetPolicies returns the policies from the store

func (Keeper) GetStoreKey

func (k Keeper) GetStoreKey() storetypes.StoreKey

GetStoreKey returns the key to the store for authority

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) Policies

Policies queries policies

func (Keeper) SetAuthorizationList

func (k Keeper) SetAuthorizationList(ctx sdk.Context, list types.AuthorizationList)

SetAuthorizationList sets the authorization list to the store.It returns an error if the list is invalid.

func (Keeper) SetChainInfo

func (k Keeper) SetChainInfo(ctx sdk.Context, chainInfo types.ChainInfo)

SetChainInfo sets the chain info to the store

func (Keeper) SetPolicies

func (k Keeper) SetPolicies(ctx sdk.Context, policies types.Policies)

SetPolicies sets the policies to the store

type Migrator

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

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator for the authority module.

func (Migrator) Migrate1to2

func (m Migrator) Migrate1to2(ctx sdk.Context) error

Migrate1to2 migrates the authority store from consensus version 1 to 2

Jump to

Keyboard shortcuts

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