keeper

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 16 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
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	paramSpace paramstypes.Subspace,
	bankKeeper types.BankKeeper,
) Keeper

func (Keeper) AddReferral added in v0.0.4

func (k Keeper) AddReferral(ctx sdk.Context, fromAddr sdk.AccAddress, code string) (referral types.Referral, err error)

func (Keeper) AddRevenue added in v0.0.4

func (k Keeper) AddRevenue(ctx sdk.Context, referral types.Referral, coins sdk.Coins) (revenue types.Revenue, err error)

func (Keeper) CreateRevenue added in v0.0.4

func (k Keeper) CreateRevenue(ctx sdk.Context, referral types.Referral) (revenue types.Revenue, err error)

func (Keeper) DeleteReferral added in v0.0.4

func (k Keeper) DeleteReferral(ctx sdk.Context, referral types.Referral)

func (Keeper) DeleteReferralByAddrIndex added in v0.0.4

func (k Keeper) DeleteReferralByAddrIndex(ctx sdk.Context, addr sdk.AccAddress)

func (Keeper) DeleteReferralByCodeIndex added in v0.0.4

func (k Keeper) DeleteReferralByCodeIndex(ctx sdk.Context, code string)

func (Keeper) ExportGenesis

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

ExportGenesis returns the module's exported genesis

func (Keeper) GetAllReferrals added in v0.0.4

func (k Keeper) GetAllReferrals(ctx sdk.Context) (referrals []types.Referral)

func (Keeper) GetAllRevenues added in v0.0.4

func (k Keeper) GetAllRevenues(ctx sdk.Context) (revenues []types.Revenue)

func (Keeper) GetLastReferralID added in v0.0.4

func (k Keeper) GetLastReferralID(ctx sdk.Context) uint64

func (Keeper) GetMaxParentDepth added in v0.0.4

func (k Keeper) GetMaxParentDepth(ctx sdk.Context) (maxParentDepth sdk.Int)

GetMaxParentDepth returns the maximum parent depth for bonus distribution parameter.

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetReferral added in v0.0.4

func (k Keeper) GetReferral(ctx sdk.Context, referralID uint64) (referral types.Referral, found bool)

func (Keeper) GetReferralByAddr added in v0.0.4

func (k Keeper) GetReferralByAddr(ctx sdk.Context, addr sdk.AccAddress) (referral types.Referral, found bool)

func (Keeper) GetReferralByCode added in v0.0.4

func (k Keeper) GetReferralByCode(ctx sdk.Context, code string) (referral types.Referral, found bool)

func (Keeper) GetRevenue added in v0.0.4

func (k Keeper) GetRevenue(ctx sdk.Context, revenueID uint64) (revenue types.Revenue, found bool)

func (Keeper) GetSwapFeeReferralRate added in v0.0.4

func (k Keeper) GetSwapFeeReferralRate(ctx sdk.Context) (swapFeeReferralRate sdk.Dec)

GetMaxParentDepth returns the maximum parent depth for bonus distribution parameter.

func (Keeper) InitGenesis

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

InitGenesis initializes the module's state from a provided genesis state.

func (Keeper) InputOutputCoinsByReferral added in v0.0.4

func (k Keeper) InputOutputCoinsByReferral(ctx sdk.Context, inputs []banktypes.Input, outputs []banktypes.Output) error

func (Keeper) IterateAllReferrals added in v0.0.4

func (k Keeper) IterateAllReferrals(ctx sdk.Context, cb func(referral types.Referral) (stop bool))

func (Keeper) IterateAllRevenues added in v0.0.4

func (k Keeper) IterateAllRevenues(ctx sdk.Context, cb func(revenue types.Revenue) (stop bool))

func (Keeper) Logger

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

func (Keeper) SetLastReferralID added in v0.0.4

func (k Keeper) SetLastReferralID(ctx sdk.Context, lastReferralID uint64)

func (Keeper) SetMaxParentDepth added in v0.0.4

func (k Keeper) SetMaxParentDepth(ctx sdk.Context, i sdk.Int)

SetMaxParentDepth sets the maximum parent depth for bonus distribution.

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetParent added in v0.0.4

func (k Keeper) SetParent(ctx sdk.Context, fromAddr sdk.AccAddress, parent string) (referral types.Referral, err error)

func (Keeper) SetReferral added in v0.0.4

func (k Keeper) SetReferral(ctx sdk.Context, referral types.Referral)

func (Keeper) SetReferralByAddrIndex added in v0.0.4

func (k Keeper) SetReferralByAddrIndex(ctx sdk.Context, addr sdk.AccAddress, referralID uint64)

func (Keeper) SetReferralByCodeIndex added in v0.0.4

func (k Keeper) SetReferralByCodeIndex(ctx sdk.Context, code string, referralID uint64)

func (Keeper) SetRevenue added in v0.0.4

func (k Keeper) SetRevenue(ctx sdk.Context, revenue types.Revenue)

type Querier

type Querier struct {
	Keeper
}

func NewQuerier

func NewQuerier(k Keeper) Querier

func (Querier) Params

func (Querier) Referral added in v0.0.4

func (Querier) ReferralByAddr added in v0.0.4

func (Querier) ReferralByCode added in v0.0.4

func (Querier) Referrals added in v0.0.4

func (Querier) Revenues added in v0.0.4

Jump to

Keyboard shortcuts

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