keeper

package
v1.6.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 21 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 Hooks

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

Hooks wrapper struct for slashing keeper

func (Hooks) AfterDelegationModified

func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (Hooks) AfterProposalActive

func (h Hooks) AfterProposalActive(ctx sdk.Context, proposalID uint64)

func (Hooks) AfterProposalDeposit

func (h Hooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress)

func (Hooks) AfterProposalFailedMinDeposit

func (h Hooks) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64)

func (Hooks) AfterProposalInactive

func (h Hooks) AfterProposalInactive(ctx sdk.Context, proposalID uint64)

func (Hooks) AfterProposalSubmission

func (h Hooks) AfterProposalSubmission(ctx sdk.Context, proposalID uint64)

func (Hooks) AfterProposalVote

func (h Hooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress)

func (Hooks) AfterProposalVotingPeriodEnded

func (h Hooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64)

func (Hooks) AfterUnbondingInitiated added in v1.5.0

func (h Hooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error

func (Hooks) AfterValidatorBeginUnbonding

func (h Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error

func (Hooks) AfterValidatorBonded

func (h Hooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error

func (Hooks) AfterValidatorCreated

func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error

func (Hooks) AfterValidatorRemoved

func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error

func (Hooks) BeforeDelegationCreated

func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (Hooks) BeforeDelegationRemoved

func (h Hooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (Hooks) BeforeDelegationSharesModified

func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (Hooks) BeforeValidatorModified

func (h Hooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error

func (Hooks) BeforeValidatorSlashed

func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error

type Keeper

type Keeper struct {
	AuthKeeper    authkeeper.AccountKeeper
	BankKeeper    bankkeeper.Keeper
	StakingKeeper *stakingkeeper.Keeper
	DistrKeeper   *distrkeeper.Keeper
	// contains filtered or unexported fields
}

func (Keeper) AfterDelegationModified

func (k Keeper) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)

func (Keeper) AfterProposalVote

func (k Keeper) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress)

func (Keeper) ClaimCoinsForAction

func (k Keeper) ClaimCoinsForAction(ctx sdk.Context, addr sdk.AccAddress, action types.Action) (sdk.Coin, sdk.Coin, error)

ClaimCoinsForAction remove claimable amount entry and transfer it to user's account

func (Keeper) ClaimRecord

ClaimRecord returns claimable amount per user

func (Keeper) ClaimableForAction

ClaimableForAction returns the claimable for an action

func (Keeper) CreateModuleAccount

func (k Keeper) CreateModuleAccount(ctx sdk.Context, amount sdk.Coin)

CreateModuleAccount create the module account

func (Keeper) EndAirdrop

func (k Keeper) EndAirdrop(ctx sdk.Context) error

func (Keeper) GetAirdropAccount

func (k Keeper) GetAirdropAccount(ctx sdk.Context) sdk.AccAddress

func (Keeper) GetAirdropAccountBalance

func (k Keeper) GetAirdropAccountBalance(ctx sdk.Context) sdk.Coin

GetAirdropAccountBalance gets the airdrop coin balance of module account

func (Keeper) GetClaimRecord

func (k Keeper) GetClaimRecord(ctx sdk.Context, addr sdk.AccAddress) (types.ClaimRecord, error)

GetClaimRecord returns the claim record for a specific address

func (Keeper) GetClaimRecords

func (k Keeper) GetClaimRecords(ctx sdk.Context) []types.ClaimRecord

GetClaimRecords get claimables for genesis export

func (Keeper) GetClaimableAmountForAction

func (k Keeper) GetClaimableAmountForAction(ctx sdk.Context, addr sdk.AccAddress, action types.Action) (sdk.Coin, sdk.Coin, error)

GetClaimableAmountForAction returns claimable amount (free, vested) for a specific action done by an address

func (Keeper) GetParams

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

GetParams Get the in-store params

func (Keeper) GetUserTotalClaimable

func (k Keeper) GetUserTotalClaimable(ctx sdk.Context, addr sdk.AccAddress) (sdk.Coin, sdk.Coin, error)

GetUserTotalClaimable returns total claimable amounts for an address

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

func (Keeper) Logger

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

func (Keeper) ModuleAccountBalance

ModuleAccountBalance returns module account's balance

func (Keeper) Params

Params returns params of the mint module.

func (Keeper) SetClaimRecord

func (k Keeper) SetClaimRecord(ctx sdk.Context, claimRecord types.ClaimRecord) error

SetClaimRecord sets a claim record for an address in store

func (Keeper) SetClaimRecords

func (k Keeper) SetClaimRecords(ctx sdk.Context, claimRecords []types.ClaimRecord) error

SetClaimRecords set claimable amount from balances object

func (Keeper) SetParams

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

SetParams Set the in-store params

func (Keeper) TotalClaimable

TotalClaimable returns total claimable

type Migrator added in v1.0.4

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

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

func NewMigrator added in v1.0.4

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate2to3 added in v1.0.4

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

Migrate2to3 migrates from version 2 to 3.

Jump to

Keyboard shortcuts

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