keeper

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: AGPL-3.0 Imports: 20 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,
	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) AutoResume added in v0.2.3

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

func (Keeper) AutoSettle

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

func (Keeper) AutoSettleRecords added in v0.2.4

func (Keeper) CheckStreamRecord added in v0.0.7

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

func (Keeper) DelayedWithdrawal added in v0.2.5

func (Keeper) DeleteOutFlow added in v0.2.3

func (k Keeper) DeleteOutFlow(ctx sdk.Context, key []byte)

DeleteOutFlow set a specific OutFlow from the store

func (Keeper) DerivePaymentAccountAddress added in v0.0.10

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

func (Keeper) ExistsAutoResumeRecord added in v0.2.3

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

ExistsAutoResumeRecord checks whether there exists a autoResumeRecord

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) GetAutoResumeRecord added in v0.2.3

func (k Keeper) GetAutoResumeRecord(
	ctx sdk.Context,
	timestamp int64,
	addr sdk.AccAddress,
) (*types.AutoResumeRecord, bool)

GetAutoResumeRecord returns a autoResumeRecord from its index

func (Keeper) GetDelayedWithdrawalRecord added in v0.2.5

func (k Keeper) GetDelayedWithdrawalRecord(
	ctx sdk.Context,
	addr sdk.AccAddress,
) (*types.DelayedWithdrawalRecord, bool)

GetDelayedWithdrawalRecord returns a delayedWithdrawal from its index

func (Keeper) GetOutFlow added in v0.2.3

func (k Keeper) GetOutFlow(ctx sdk.Context, addr sdk.AccAddress, status types.OutFlowStatus, toAddr sdk.AccAddress) *types.OutFlow

GetOutFlow get a specific OutFlow in the store from its index

func (Keeper) GetOutFlows added in v0.2.3

func (k Keeper) GetOutFlows(ctx sdk.Context, addr sdk.AccAddress) []types.OutFlow

GetOutFlows get OutFlows for a specific from address

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) 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) GetVersionedParamsWithTs added in v0.2.3

func (k Keeper) GetVersionedParamsWithTs(ctx sdk.Context, ts int64) (verParams types.VersionedParams, err error)

GetVersionedParamsWithTs find the latest params before and equal than the specific timestamp

func (Keeper) IsEmptyNetFlow added in v0.2.3

func (k Keeper) IsEmptyNetFlow(ctx sdk.Context, account sdk.AccAddress) bool

func (Keeper) IsPaymentAccount added in v0.2.5

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

IsPaymentAccount returns is the account address a payment account

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) MergeActiveOutFlows added in v0.2.3

func (k Keeper) MergeActiveOutFlows(ctx sdk.Context, addr sdk.AccAddress, outFlows []types.OutFlow) int

MergeActiveOutFlows merge active OutFlows and save them in the store

func (Keeper) MergeFrozenOutFlows added in v0.2.3

func (k Keeper) MergeFrozenOutFlows(ctx sdk.Context, addr sdk.AccAddress, outFlows []types.OutFlow) int

MergeFrozenOutFlows merge frozen OutFlows and save them in the store

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) OutFlows added in v0.2.3

func (Keeper) Params

func (Keeper) ParamsByTimestamp added in v0.2.3

func (Keeper) PaymentAccountCounts added in v0.2.4

func (Keeper) PaymentAccounts added in v0.2.4

func (Keeper) PaymentAccountsByOwner added in v0.2.4

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) RemoveAutoResumeRecord added in v0.2.3

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

RemoveAutoResumeRecord removes a autoResumeRecord from the store

func (Keeper) RemoveAutoSettleRecord

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

RemoveAutoSettleRecord removes a autoSettleRecord from the store

func (Keeper) RemoveDelayedWithdrawalRecord added in v0.2.5

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

RemoveDelayedWithdrawalRecord removes a delayedWithdrawal from the store

func (Keeper) SetAutoResumeRecord added in v0.2.3

func (k Keeper) SetAutoResumeRecord(ctx sdk.Context, autoResumeRecord *types.AutoResumeRecord)

SetAutoResumeRecord set a specific autoResumeRecord in the store from its index

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) SetDelayedWithdrawalRecord added in v0.2.5

func (k Keeper) SetDelayedWithdrawalRecord(ctx sdk.Context, delayedWithdrawalRecord *types.DelayedWithdrawalRecord)

SetDelayedWithdrawalRecord set a specific delayedWithdrawal in the store from its index

func (Keeper) SetOutFlow added in v0.2.3

func (k Keeper) SetOutFlow(ctx sdk.Context, addr sdk.AccAddress, outFlow *types.OutFlow)

SetOutFlow set a specific OutFlow 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) SetVersionedParamsWithTs added in v0.2.3

func (k Keeper) SetVersionedParamsWithTs(ctx sdk.Context, verParams types.VersionedParams) error

func (Keeper) StreamRecords added in v0.2.4

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) UpdateFrozenStreamRecord added in v0.2.2

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

UpdateFrozenStreamRecord updates frozen streamRecord in `force delete` scenarios it only handles the lock balance change and ignore the other changes(since the streams are already changed and the accumulated OutFlows are changed outside this function)

func (Keeper) UpdateStreamRecord

func (k Keeper) UpdateStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord, change *types.StreamRecordChange) 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

type Migrator added in v0.2.5

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

func NewMigrator added in v0.2.5

func NewMigrator(keeper Keeper) Migrator

func (Migrator) MigrateV1toV2 added in v0.2.5

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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