keeper

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCreateRootNameProposal

func HandleCreateRootNameProposal(ctx sdk.Context, k Keeper, p *types.CreateRootNameProposal) error

HandleCreateRootNameProposal is a handler for executing a passed create root name proposal

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Keeper

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

Keeper defines the name module Keeper

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	key storetypes.StoreKey,
	paramSpace paramtypes.Subspace,
) Keeper

NewKeeper returns a name keeper. It handles: - managing a hierarchy of names - enforcing permissions for name creation/deletion

CONTRACT: the parameter Subspace must have the param key table already initialized

func (Keeper) DeleteInvalidAddressIndexEntries added in v1.16.0

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

DeleteInvalidAddressIndexEntries is only for the rust upgrade. It goes over all the address -> name entries and deletes any that are no longer accurate.

func (Keeper) DeleteRecord added in v1.0.0

func (k Keeper) DeleteRecord(ctx sdk.Context, name string) error

DeleteRecord removes a name record from the kvstore.

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

ExportGenesis exports the current keeper state of the name module.

func (Keeper) GetAllowUnrestrictedNames

func (k Keeper) GetAllowUnrestrictedNames(ctx sdk.Context) (enabled bool)

GetAllowUnrestrictedNames returns the current unrestricted names allowed parameter (or default if unset)

func (Keeper) GetAuthority added in v1.14.0

func (k Keeper) GetAuthority() string

func (Keeper) GetMaxNameLevels

func (k Keeper) GetMaxNameLevels(ctx sdk.Context) (max uint32)

GetMaxNameLevels returns the current maximum number of name segments allowed (or default if unset)

func (Keeper) GetMaxSegmentLength

func (k Keeper) GetMaxSegmentLength(ctx sdk.Context) (max uint32)

GetMaxSegmentLength returns the current maximum length allowed for a name segment (or default if unset)

func (Keeper) GetMinSegmentLength

func (k Keeper) GetMinSegmentLength(ctx sdk.Context) (min uint32)

GetMinSegmentLength returns the current minimum allowed name segment length (or default if unset)

func (Keeper) GetParams

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

GetParams returns the total set of name parameters with fall thorugh to default values.

func (Keeper) GetRecordByName

func (k Keeper) GetRecordByName(ctx sdk.Context, name string) (record *types.NameRecord, err error)

GetRecordByName resolves a record by name.

func (Keeper) GetRecordsByAddress

func (k Keeper) GetRecordsByAddress(ctx sdk.Context, address sdk.AccAddress) (types.NameRecords, error)

GetRecordsByAddress looks up all names bound to an address.

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)

InitGenesis creates the initial genesis state for the name module.

func (Keeper) IterateRecords

func (k Keeper) IterateRecords(ctx sdk.Context, prefix []byte, handle func(record types.NameRecord) error) error

IterateRecords iterates over all the stored name records and passes them to a callback function.

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) NameExists added in v1.0.0

func (k Keeper) NameExists(ctx sdk.Context, name string) bool

NameExists returns true if store contains a record for the given name.

func (Keeper) Normalize

func (k Keeper) Normalize(ctx sdk.Context, name string) (string, error)

Normalize returns a name is storage format.

func (Keeper) Params

Params queries params of distribution module

func (Keeper) Resolve

Resolve returns the address a name resolves to or an error.

func (Keeper) ResolvesTo

func (k Keeper) ResolvesTo(ctx sdk.Context, name string, addr sdk.AccAddress) bool

ResolvesTo to determines whether a name resolves to a given address.

func (Keeper) ReverseLookup

ReverseLookup gets all names bound to an address.

func (*Keeper) SetAttributeKeeper added in v1.15.0

func (k *Keeper) SetAttributeKeeper(ak types.AttributeKeeper)

SetAttributeKeeper sets the attribute keeper

func (Keeper) SetNameRecord added in v1.0.0

func (k Keeper) SetNameRecord(ctx sdk.Context, name string, addr sdk.AccAddress, restrict bool) error

SetNameRecord binds a name to an address.

func (Keeper) SetParams

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

SetParams sets the distribution parameters to the param space.

func (Keeper) UpdateNameRecord added in v1.14.0

func (k Keeper) UpdateNameRecord(ctx sdk.Context, name string, addr sdk.AccAddress, restrict bool) error

UpdateNameRecord updates the owner address and restricted flag on a name.

type Migrator added in v1.7.0

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

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

func NewMigrator added in v1.7.0

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

Jump to

Keyboard shortcuts

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