keeper

package
v0.2.1-hf.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: AGPL-3.0 Imports: 17 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,
	bankKeeper types.BankKeeper,
	accountKeeper types.AccountKeeper,
	spKeeper types.SpKeeper,
	authority string,
) *Keeper

func (Keeper) ApplyStreamRecordChanges

func (k Keeper) ApplyStreamRecordChanges(ctx sdk.Context, streamRecordChanges []types.StreamRecordChange) error

ApplyStreamRecordChanges assume StreamRecordChange is unique by Addr

func (Keeper) ApplyUserFlowsList added in v0.0.7

func (k Keeper) ApplyUserFlowsList(ctx sdk.Context, userFlowsList []types.UserFlows) (err error)

ApplyUserFlowsList

func (Keeper) AutoSettle

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

func (Keeper) CheckStreamRecord added in v0.0.7

func (k Keeper) CheckStreamRecord(streamRecord *types.StreamRecord)

func (Keeper) DerivePaymentAccountAddress added in v0.0.10

func (k Keeper) DerivePaymentAccountAddress(owner sdk.AccAddress, index uint64) sdk.AccAddress

func (Keeper) ForceSettle

func (k Keeper) ForceSettle(ctx sdk.Context, streamRecord *types.StreamRecord) error

func (Keeper) GetAllAutoSettleRecord

func (k Keeper) GetAllAutoSettleRecord(ctx sdk.Context) (list []types.AutoSettleRecord)

GetAllAutoSettleRecord returns all autoSettleRecord

func (Keeper) GetAllPaymentAccount

func (k Keeper) GetAllPaymentAccount(ctx sdk.Context) (list []types.PaymentAccount)

GetAllPaymentAccount returns all paymentAccount

func (Keeper) GetAllPaymentAccountCount

func (k Keeper) GetAllPaymentAccountCount(ctx sdk.Context) (list []types.PaymentAccountCount)

GetAllPaymentAccountCount returns all paymentAccountCount

func (Keeper) GetAllStreamRecord

func (k Keeper) GetAllStreamRecord(ctx sdk.Context) (list []types.StreamRecord)

GetAllStreamRecord returns all streamRecord

func (Keeper) GetAuthority added in v0.2.0

func (k Keeper) GetAuthority() string

func (Keeper) GetAutoSettleRecord

func (k Keeper) GetAutoSettleRecord(
	ctx sdk.Context,
	timestamp int64,
	addr sdk.AccAddress,
) (val *types.AutoSettleRecord, found bool)

GetAutoSettleRecord returns a autoSettleRecord from its index

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetPaymentAccount

func (k Keeper) GetPaymentAccount(
	ctx sdk.Context,
	addr sdk.AccAddress,
) (val *types.PaymentAccount, found bool)

GetPaymentAccount returns a paymentAccount from its index

func (Keeper) GetPaymentAccountCount

func (k Keeper) GetPaymentAccountCount(
	ctx sdk.Context,
	owner sdk.AccAddress,
) (val *types.PaymentAccountCount, found bool)

GetPaymentAccountCount returns a paymentAccountCount from its index

func (Keeper) GetStoragePrice added in v0.0.7

func (k Keeper) GetStoragePrice(ctx sdk.Context, params types.StoragePriceParams) (price types.StoragePrice, err error)

func (Keeper) GetStreamRecord

func (k Keeper) GetStreamRecord(
	ctx sdk.Context,
	account sdk.AccAddress,
) (val *types.StreamRecord, found bool)

GetStreamRecord returns a streamRecord from its index

func (Keeper) IsPaymentAccountOwner

func (k Keeper) IsPaymentAccountOwner(ctx sdk.Context, addr, owner sdk.AccAddress) bool

func (Keeper) Logger

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

func (Keeper) MergeOutFlows added in v0.0.7

func (k Keeper) MergeOutFlows(flows []types.OutFlow) []types.OutFlow

MergeOutFlows merge flows with same address

func (Keeper) MergeStreamRecordChanges

func (k Keeper) MergeStreamRecordChanges(changes []types.StreamRecordChange) []types.StreamRecordChange

MergeStreamRecordChanges merge changes with same address

func (Keeper) MergeUserFlows added in v0.0.7

func (k Keeper) MergeUserFlows(userFlowsList []types.UserFlows) []types.UserFlows

MergeUserFlows merge flows with same From address

func (Keeper) Params

func (Keeper) QueryDynamicBalance added in v0.0.10

func (k Keeper) QueryDynamicBalance(ctx sdk.Context, addr sdk.AccAddress) (amount sdkmath.Int, err error)

func (Keeper) RemoveAutoSettleRecord

func (k Keeper) RemoveAutoSettleRecord(
	ctx sdk.Context,
	timestamp int64,
	addr sdk.AccAddress,
)

RemoveAutoSettleRecord removes a autoSettleRecord from the store

func (Keeper) RemovePaymentAccountCount

func (k Keeper) RemovePaymentAccountCount(
	ctx sdk.Context,
	owner sdk.AccAddress,
)

RemovePaymentAccountCount removes a paymentAccountCount from the store

func (Keeper) SetAutoSettleRecord

func (k Keeper) SetAutoSettleRecord(ctx sdk.Context, autoSettleRecord *types.AutoSettleRecord)

SetAutoSettleRecord set a specific autoSettleRecord in the store from its index

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetPaymentAccount

func (k Keeper) SetPaymentAccount(ctx sdk.Context, paymentAccount *types.PaymentAccount)

SetPaymentAccount set a specific paymentAccount in the store from its index

func (Keeper) SetPaymentAccountCount

func (k Keeper) SetPaymentAccountCount(ctx sdk.Context, paymentAccountCount *types.PaymentAccountCount)

SetPaymentAccountCount set a specific paymentAccountCount in the store from its index

func (Keeper) SetStreamRecord

func (k Keeper) SetStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord)

SetStreamRecord set a specific streamRecord in the store from its index

func (Keeper) TryResumeStreamRecord added in v0.0.7

func (k Keeper) TryResumeStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord, depositBalance sdkmath.Int) error

func (Keeper) UpdateAutoSettleRecord

func (k Keeper) UpdateAutoSettleRecord(ctx sdk.Context, addr sdk.AccAddress, oldTime, newTime int64)

func (Keeper) UpdateStreamRecord

func (k Keeper) UpdateStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord, change *types.StreamRecordChange, autoSettle bool) error

func (Keeper) UpdateStreamRecordByAddr

func (k Keeper) UpdateStreamRecordByAddr(ctx sdk.Context, change *types.StreamRecordChange) (ret *types.StreamRecord, err error)

func (Keeper) Withdraw added in v0.0.10

func (k Keeper) Withdraw(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amount sdkmath.Int) error

Jump to

Keyboard shortcuts

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