keeper

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitExtendTopLevelDomainExpirationDateEvent added in v0.1.0

func EmitExtendTopLevelDomainExpirationDateEvent(ctx sdk.Context, domain types.TopLevelDomain, fee types.TopLevelDomainFee)

Extend top-level-domain expiration date event

func EmitRegisterSecondLevelDomainEvent added in v0.1.0

func EmitRegisterSecondLevelDomainEvent(ctx sdk.Context, domain types.SecondLevelDomain, fee sdk.Coin)

Register second-level-domain event

func EmitRegisterTopLevelDomainEvent added in v0.1.0

func EmitRegisterTopLevelDomainEvent(ctx sdk.Context, domain types.TopLevelDomain, fee types.TopLevelDomainFee)

Register top-level-domain event

func EmitUpdateDnsRecordEvent added in v0.1.0

func EmitUpdateDnsRecordEvent(ctx sdk.Context, msg types.MsgUpdateDnsRecord)

Update dns record event

func EmitUpdateTextRecordEvent added in v0.1.2

func EmitUpdateTextRecordEvent(ctx sdk.Context, msg types.MsgUpdateTextRecord)

Update dns record event

func EmitUpdateTopLevelDomainRegistrationPolicyEvent added in v0.1.2

func EmitUpdateTopLevelDomainRegistrationPolicyEvent(ctx sdk.Context, domain types.TopLevelDomain)

Update top-level-domain registration policy

func EmitUpdateWalletRecordEvent added in v0.1.0

func EmitUpdateWalletRecordEvent(ctx sdk.Context, msg types.MsgUpdateWalletRecord)

Update wallet record event

func EmitWithdrawRegistrationFeeEvent added in v0.1.0

func EmitWithdrawRegistrationFeeEvent(ctx sdk.Context, msg types.MsgWithdrawRegistrationFee, fee sdk.Coins)

Withdraw fees event

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Hooks added in v0.1.0

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

Hooks is the wrapper struct for the incentives keeper.

func (Hooks) AfterEpochEnd added in v0.1.0

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

AfterEpochEnd is the epoch end hook.

func (Hooks) BeforeEpochStart added in v0.1.0

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

BeforeEpochStart is the epoch start hook.

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,

	bankKeeper types.BankKeeper,
	distributionKeeper types.DistributionKeeper,
	mintKeeper types.MintKeeper,
	furnaceKeeper types.FurnaceKeeper,
) *Keeper

func (Keeper) AfterEpochEnd added in v0.1.0

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

AfterEpochEnd is the epoch end hook.

func (Keeper) AppendToOwnedDomain

func (k Keeper) AppendToOwnedDomain(ctx sdk.Context, owner string, name string, parent string)

Append to owned domain

func (Keeper) BeforeEpochStart added in v0.1.0

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

BeforeEpochStart is the epoch start hook.

func (Keeper) ExtendTopLevelDomainExpirationDate added in v0.1.0

func (k Keeper) ExtendTopLevelDomainExpirationDate(ctx sdk.Context, creator string, domainName string, extensionPeriodInYear uint64) (topLevelDomain types.TopLevelDomain, fee types.TopLevelDomainFee, err error)

Extend expiration date

func (Keeper) GetAllDomainOwnership

func (k Keeper) GetAllDomainOwnership(ctx sdk.Context) (list []types.DomainOwnership)

GetAllDomainOwnership returns all domainOwnership

func (Keeper) GetAllSecondLevelDomain added in v0.1.0

func (k Keeper) GetAllSecondLevelDomain(ctx sdk.Context) (list []types.SecondLevelDomain)

GetAllSecondLevelDomain returns all second-level-domain

func (Keeper) GetAllTopLevelDomain added in v0.1.0

func (k Keeper) GetAllTopLevelDomain(ctx sdk.Context) (list []types.TopLevelDomain)

GetAllTopLevelDomain returns all topLevelDomain

func (Keeper) GetBurnWeight added in v0.1.0

func (k Keeper) GetBurnWeight(ctx sdk.Context) (weight math.LegacyDec, err error)

Get burn weight

func (Keeper) GetDomainOwnership

func (k Keeper) GetDomainOwnership(
	ctx sdk.Context,
	owner string,
) (val types.DomainOwnership, found bool)

GetDomainOwnership returns a domainOwnership from its index

func (Keeper) GetIsSecondLevelDomainAlreadyTaken added in v0.1.0

func (k Keeper) GetIsSecondLevelDomainAlreadyTaken(ctx sdk.Context, domain types.SecondLevelDomain) (isDomainAlreadyTaken bool)

Get is second-level-domain already taken

func (Keeper) GetIsTopLevelDomainAlreadyTaken added in v0.1.0

func (k Keeper) GetIsTopLevelDomainAlreadyTaken(ctx sdk.Context, domain types.TopLevelDomain) (isDomainAlreadyTaken bool)

Get is top-level-domain already taken

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetSecondLevelDomain added in v0.1.0

func (k Keeper) GetSecondLevelDomain(
	ctx sdk.Context,
	name string,
	parent string,
) (val types.SecondLevelDomain, found bool)

GetSecondLevelDomain returns a second-level-domain from its index

func (Keeper) GetSecondLevelDomainParent added in v0.1.0

func (k Keeper) GetSecondLevelDomainParent(ctx sdk.Context, domain types.SecondLevelDomain) (parentDomain types.TopLevelDomain, found bool)

Get parent domain

func (Keeper) GetSecondLevelDomainParentsSubdomainConfig added in v0.1.0

func (k Keeper) GetSecondLevelDomainParentsSubdomainConfig(ctx sdk.Context, domain types.SecondLevelDomain) types.SubdomainConfig

Get parent domain's subdomain config

func (Keeper) GetSecondLevelDomainRole added in v0.1.1

func (k Keeper) GetSecondLevelDomainRole(ctx sdk.Context, name, parent, address string) (role types.DomainRole, found bool)

Get Role of the second-level domain

func (Keeper) GetTopLevelDomain added in v0.1.0

func (k Keeper) GetTopLevelDomain(
	ctx sdk.Context,
	name string,
) (val types.TopLevelDomain, found bool)

GetTopLevelDomain returns a topLevelDomain from its index

func (Keeper) GetTopLevelDomainFee added in v0.1.0

func (k Keeper) GetTopLevelDomainFee(ctx sdk.Context, topLevelDomain types.TopLevelDomain, registrationPeriodInYear uint64) (topLevelDomainFee types.TopLevelDomainFee, err error)

Get top-level-domain fee

func (Keeper) GetTopLevelDomainRole added in v0.1.1

func (k Keeper) GetTopLevelDomainRole(ctx sdk.Context, name, address string) (role types.DomainRole, found bool)

Get Role of the domain

func (Keeper) GetValidSecondLevelDomain added in v0.1.0

func (k Keeper) GetValidSecondLevelDomain(ctx sdk.Context, name string, parent string) (secondLevelDomain types.SecondLevelDomain, err error)

Get valid second-level-domain

func (Keeper) GetValidTopLevelDomain added in v0.1.0

func (k Keeper) GetValidTopLevelDomain(ctx sdk.Context, name string) (topLevelDomain types.TopLevelDomain, err error)

Get valid-top-level domain

func (Keeper) Hooks added in v0.1.0

func (k Keeper) Hooks() Hooks

Hooks returns the hook wrapper struct.

func (Keeper) IncrementParentsSubdomainCount added in v0.1.0

func (k Keeper) IncrementParentsSubdomainCount(ctx sdk.Context, domain types.SecondLevelDomain)

Increment parents subdomain count

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) PaySecondLevelDomainRegstrationFee added in v0.1.0

func (k Keeper) PaySecondLevelDomainRegstrationFee(ctx sdk.Context, payer sdk.AccAddress, domain types.SecondLevelDomain, registrationPeriodInYear uint64) (fee sdk.Coin, err error)

Pay SLD registration fee

func (Keeper) PayTopLevelDomainFee added in v0.1.0

func (k Keeper) PayTopLevelDomainFee(ctx sdk.Context, payer sdk.AccAddress, domain types.TopLevelDomain, registrationPeriodInYear uint64) (registrationFee types.TopLevelDomainFee, err error)

Pay top-level-domain registration fee

func (Keeper) RegisterSecondLevelDomain added in v0.1.0

func (k Keeper) RegisterSecondLevelDomain(ctx sdk.Context, secondLevelDomain types.SecondLevelDomain, owner sdk.AccAddress, registrationPeriodIYear uint64) (err error)

Register second level domain

func (Keeper) RegisterTopLevelDomain added in v0.1.0

func (k Keeper) RegisterTopLevelDomain(ctx sdk.Context, creator string, domainName string, registrationPeriodInYear uint64) (topLevelDomain types.TopLevelDomain, fee types.TopLevelDomainFee, err error)

Register top-level-domain

func (Keeper) RemoveDomainOwnership

func (k Keeper) RemoveDomainOwnership(
	ctx sdk.Context,
	owner string,
)

RemoveDomainOwnership removes a domainOwnership from the store

func (Keeper) RemoveSecondLevelDomain added in v0.1.0

func (k Keeper) RemoveSecondLevelDomain(
	ctx sdk.Context,
	name string,
	parent string,
)

RemoveSecondLevelDomain removes a second-level-domain from the store

func (Keeper) RemoveTopLevelDomain added in v0.1.0

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

RemoveTopLevelDomain removes a topLevelDomain from the store

func (Keeper) Role added in v0.1.1

func (Keeper) SecondLevelDomain added in v0.1.0

func (Keeper) SecondLevelDomainAll added in v0.1.0

func (Keeper) SetDomainOwnership

func (k Keeper) SetDomainOwnership(ctx sdk.Context, domainOwnership types.DomainOwnership)

SetDomainOwnership set a specific domainOwnership in the store from its index

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetSecondLevelDomain added in v0.1.0

func (k Keeper) SetSecondLevelDomain(ctx sdk.Context, domain types.SecondLevelDomain)

SetSecondLevelDomain set a specific second-level-domain in the store from its index

func (Keeper) SetTopLevelDomain added in v0.1.0

func (k Keeper) SetTopLevelDomain(ctx sdk.Context, topLevelDomain types.TopLevelDomain)

SetTopLevelDomain set a specific topLevelDomain in the store from its index

func (Keeper) TopLevelDomain added in v0.1.0

func (Keeper) TopLevelDomainAll added in v0.1.0

func (Keeper) UpdateTopLevelDomainRegistrationPolicy added in v0.1.2

func (k Keeper) UpdateTopLevelDomainRegistrationPolicy(ctx sdk.Context, creator string, domainName string, registrationPolicy string) (err error)

func (Keeper) ValidateSecondLevelDomainIsRegistrable added in v0.1.0

func (k Keeper) ValidateSecondLevelDomainIsRegistrable(ctx sdk.Context, secondLevelDomain types.SecondLevelDomain, sldOwner sdk.AccAddress) error

Validate second-level-domain is registrable

func (Keeper) ValidateTopLevelDomainIsRegistrable added in v0.1.0

func (k Keeper) ValidateTopLevelDomainIsRegistrable(ctx sdk.Context, topLevelDomain types.TopLevelDomain) error

Jump to

Keyboard shortcuts

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